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

◆ EquipDefaultCharacter()

void MenuDefaultCharacterData::EquipDefaultCharacter ( Man player)
inlineprivate

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

1036 {
1037 if (!player)
1038 {
1039 ErrorEx("WARNING - trying to equip non-existent object! | MenuDefaultCharacterData::EquipDefaultCharacter");
1040 return;
1041 }
1042
1043 int slot_ID;
1044 string attachment_type;
1045 string current_attachment_type;
1046 EntityAI current_attachment_object;
1047
1048 for (int i = 0; i < m_AttachmentsMap.Count(); i++)
1049 {
1050 attachment_type = "";
1051 current_attachment_type = "";
1052 slot_ID = m_AttachmentsMap.GetKey(i);
1053 attachment_type = m_AttachmentsMap.GetElement(i); //Get(i)
1054 current_attachment_object = player.GetInventory().FindAttachment(slot_ID);
1055
1056 if (current_attachment_object)
1057 {
1058 current_attachment_type = current_attachment_object.GetType();
1059 }
1060 if (current_attachment_type != attachment_type)
1061 {
1062 if (current_attachment_object)
1063 g_Game.ObjectDelete(current_attachment_object);
1064 if (attachment_type != "")
1065 player.GetInventory().CreateAttachmentEx(attachment_type,slot_ID);
1066 }
1067 }
1068 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3868
ref map< int, string > m_AttachmentsMap
Определения gameplay.c:990
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, g_Game и m_AttachmentsMap.

Используется в UIScriptedMenu::BottomChanged(), Managed::CreateNewCharacter(), UIScriptedMenu::SetCharacter(), UIScriptedMenu::ShoesChanged() и UIScriptedMenu::TopChanged().