DayZ 1.27
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 m_CharacterDta.GetCharacterName(m_CharacterId, g_Game.GetPlayerGameName());
309 }
310
311 // Load all avalible options for character creation; mostly legacy stuff
312 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " gender", m_CharGenderList);
313 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " top", m_CharShirtList);
314 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " bottom", m_CharPantsList);
315 g_Game.ConfigGetTextArray("cfgCharacterCreation" + " shoe", m_CharShoesList);
316
317 // Init character table
318 m_Characters.Clear();
319 m_Characters.Insert( ECharGender.Male, new array<string> );
320 m_Characters.Insert( ECharGender.Female, new array<string> );
321
322 // Sort character by Gender
324 for (int i = 0; i < characters.Count(); i++)
325 {
326 string char_cfg_name = characters.Get(i);
327 if ( GetGame().IsKindOf(char_cfg_name, "SurvivorMale_Base") )
328 {
329 m_Characters[ECharGender.Male].Insert( char_cfg_name );
330 }
331 else
332 {
333 m_Characters[ECharGender.Female].Insert( char_cfg_name );
334 }
335 }
336
337 CreateNewCharacterById(m_CharacterId/*, m_CharacterPos, m_CharacterRot*/);
338
339 if (GetCharacterObj() )
340 {
341 if ( GetCharacterObj().IsMale() )
343 else
345 }
346 }
DayZGame g_Game
Определения DayZGame.c:3868
ECharGender
Определения ECharGender.c:2
override TStringArray ListAvailableCharacters()
Определения DayZGame.c:3390
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
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685

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