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

◆ EquipCharacter()

void MissionBase::EquipCharacter ( MenuDefaultCharacterData char_data)
inlineprotected

Spawns character equip from received data. Checks validity against config, randomizes if invalid value and config array not empty.

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

453 {
454 int slot_ID;
455 string attachment_type;
456 for (int i = 0; i < DefaultCharacterCreationMethods.GetAttachmentSlotsArray().Count(); i++)
457 {
458 slot_ID = DefaultCharacterCreationMethods.GetAttachmentSlotsArray().Get(i);
459 attachment_type = "";
460 if (m_RespawnMode != GameConstants.RESPAWN_MODE_CUSTOM || !char_data.GetAttachmentMap().Find(slot_ID,attachment_type) || !VerifyAttachmentType(slot_ID,attachment_type)) //todo insert verification fn here
461 {
462 //randomize
463 if (DefaultCharacterCreationMethods.GetConfigArrayCountFromSlotID(slot_ID) > 0)
464 {
465 attachment_type = DefaultCharacterCreationMethods.GetConfigAttachmentTypes(slot_ID).GetRandomElement();
466 }
467 else //undefined, moving on
468 continue;
469 }
470
471 if (attachment_type != "")
472 {
473 m_player.GetInventory().CreateAttachmentEx(attachment_type,slot_ID);
474 }
475 }
476
478 }
@ Count
Определения RandomGeneratorSyncManager.c:8
map< int, string > GetAttachmentMap()
Определения gameplay.c:1125
int m_RespawnMode
Определения missionServer.c:14
bool VerifyAttachmentType(int slot_ID, string attachment_type)
Определения missionServer.c:485
void StartingEquipSetup(PlayerBase player, bool clothesChosen)
can be overriden to manually set up starting equip. 'clothesChosen' is legacy parameter,...
Определения missionServer.c:481
PlayerBase m_player
Определения missionServer.c:54

Перекрестные ссылки Count, MenuDefaultCharacterData::GetAttachmentMap(), m_player, m_RespawnMode, GameConstants::RESPAWN_MODE_CUSTOM, StartingEquipSetup() и VerifyAttachmentType().

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