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

◆ EEItemLocationChanged()

void Entity::EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 962

963 {
964 EntityAI oldOwner = oldLoc.GetParent();
965 EntityAI newOwner = newLoc.GetParent();
966 OnItemLocationChanged(oldOwner, newOwner);
967
968 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT && newLoc.GetType() == InventoryLocationType.ATTACHMENT)
969 OnItemAttachmentSlotChanged(oldLoc, newLoc);
970
971 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT)
972 {
973 if (oldOwner)
974 OnWasDetached(oldOwner, oldLoc.GetSlot());
975 else
976 Error("EntityAI::EEItemLocationChanged - detached, but oldOwner is null");
977 }
978
979 if (newLoc.GetType() == InventoryLocationType.ATTACHMENT)
980 {
981 if (newOwner)
982 OnWasAttached(newOwner, newLoc.GetSlot());
983 else
984 Error("EntityAI::EEItemLocationChanged - attached, but newOwner is null");
985 }
986
987 Man player;
988 if (oldLoc.GetType() == InventoryLocationType.HANDS)
989 {
990 player = Man.Cast(oldOwner);
991 player.OnItemInHandsChanged();
992 player.GetCachedEquipment().OnItemCargoOut(this);
993 }
994
995 if (newLoc.GetType() == InventoryLocationType.HANDS)
996 {
997 player = Man.Cast(newOwner);
998 player.OnItemInHandsChanged();
999 player.GetCachedEquipment().OnItemCargoIn(this);
1000 }
1001 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
void OnWasDetached(EntityAI parent, int slot_id)
void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
void OnWasAttached(EntityAI parent, int slot_id)
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки EntityAI(), Error(), OnItemAttachmentSlotChanged(), OnItemLocationChanged(), OnWasAttached() и OnWasDetached().