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

◆ LoadCharacterData()

void Managed::LoadCharacterData ( vector char_pos,
vector char_rot,
bool default_char = false )
inlineprotected

Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.

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

300 {
301 m_CharacterDta = g_Game.GetMenuData();
302 m_CharacterPos = char_pos;
303 m_CharacterRot = char_rot;
304
305 if (!default_char && m_CharacterDta.GetLastPlayedCharacter() > -1 )
306 {
307 m_CharacterId = m_CharacterDta.GetLastPlayedCharacter();
308 string characterName = g_Game.GetPlayerGameName();
309 m_CharacterDta.GetCharacterName(m_CharacterId, characterName);
310 g_Game.SetPlayerGameName(characterName);
311 }
312
313 // Load all avalible options for character creation; mostly legacy stuff
314 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " gender", m_CharGenderList);
315 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " top", m_CharShirtList);
316 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " bottom", m_CharPantsList);
317 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " shoe", m_CharShoesList);
318
319 // Init character table
320 m_Characters.Clear();
321 m_Characters.Insert( ECharGender.Male, new array<string> );
322 m_Characters.Insert( ECharGender.Female, new array<string> );
323
324 // Sort character by Gender
325 TStringArray characters = g_Game.ListAvailableCharacters();
326 for (int i = 0; i < characters.Count(); i++)
327 {
328 string char_cfg_name = characters.Get(i);
329 if ( g_Game.IsKindOf(char_cfg_name, "SurvivorMale_Base") )
330 {
331 m_Characters[ECharGender.Male].Insert( char_cfg_name );
332 }
333 else
334 {
335 m_Characters[ECharGender.Female].Insert( char_cfg_name );
336 }
337 }
338
339 CreateNewCharacterById(m_CharacterId/*, m_CharacterPos, m_CharacterRot*/);
340
341 if (GetCharacterObj() )
342 {
343 if ( GetCharacterObj().IsMale() )
345 else
347 }
348 }
DayZGame g_Game
Определения DayZGame.c:3942
ECharGender
Определения ECharGender.c:2
PlayerBase GetCharacterObj()
Определения IntroSceneCharacter.c:57
ref TStringArray m_CharGenderList
Определения IntroSceneCharacter.c:10
void SetCharacterGender(ECharGender gender)
Определения IntroSceneCharacter.c:105
void CreateNewCharacterById(int character_id)
Определения IntroSceneCharacter.c:194
ref TStringArray m_CharShirtList
Определения IntroSceneCharacter.c:11
int m_CharacterId
Определения IntroSceneCharacter.c:3
ref TStringArray m_CharPantsList
Определения IntroSceneCharacter.c:12
vector m_CharacterPos
Определения IntroSceneCharacter.c:7
ref map< ECharGender, ref array< string > > m_Characters
Определения IntroSceneCharacter.c:15
MenuData m_CharacterDta
Определения IntroSceneCharacter.c:5
vector m_CharacterRot
Определения IntroSceneCharacter.c:8
ref TStringArray m_CharShoesList
Определения IntroSceneCharacter.c:13
array< string > TStringArray
Определения EnScript.c:712

Перекрестные ссылки CreateNewCharacterById(), g_Game, GetCharacterObj(), m_CharacterDta, m_CharacterId, m_CharacterPos, m_CharacterRot, m_Characters, m_CharGenderList, m_CharPantsList, m_CharShirtList, m_CharShoesList и SetCharacterGender().