DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ConstructEmotes()

bool EmoteConstructor::ConstructEmotes ( PlayerBase player,
out map< int, ref EmoteBase > emoteMap )
inlineprivate

См. определение в файле EmoteConstructor.c строка 3

4 {
5 TTypenameArray emote_array_names = new TTypenameArray;
6 RegisterEmotes(emote_array_names);
7 Sort(emote_array_names,emote_array_names.Count());
8
9 emoteMap = new map<int, ref EmoteBase>;
10 ref EmoteBase new_emote;
11
12 for (int i = 0; i < emote_array_names.Count(); i++)
13 {
14 new_emote = EmoteBase.Cast(emote_array_names[i].Spawn());
15 if (new_emote)
16 {
17 if (new_emote.GetID() < 0)
18 {
19 ErrorEx("Emote " + emote_array_names[i].ToString() + " has an invalid ID, registation failed!");
20 return false;
21 }
22 else if (emoteMap.Contains(new_emote.GetID()))
23 {
24 ErrorEx("Emote " + emote_array_names[i].ToString() + " has a duplicate ID, registation failed!");
25 return false;
26 }
27 else
28 {
29 new_emote.SetOwnerPlayer(player);
30 emoteMap.Insert(new_emote.GetID(), new_emote);
31 }
32 }
33 }
34 return true;
35 }
void Spawn()
spawn damage trigger
Определения AreaDamageManager.c:70
map
Определения ControlsXboxNew.c:4
proto string ToString()
void RegisterEmotes(TTypenameArray emotes)
Определения EmoteConstructor.c:37
enum ShapeType ErrorEx
proto void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
array< typename > TTypenameArray
Определения EnScript.c:693

Перекрестные ссылки ErrorEx, RegisterEmotes(), Sort(), Spawn() и ToString().

Используется в ConstructData().