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

◆ EEItemLocationChanged()

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

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

977 {
978 EntityAI oldOwner = oldLoc.GetParent();
979 EntityAI newOwner = newLoc.GetParent();
980 OnItemLocationChanged(oldOwner, newOwner);
981
982 NotifyPlayerLoadChanged(oldOwner);
983 NotifyPlayerLoadChanged(newOwner);
984
985 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT && newLoc.GetType() == InventoryLocationType.ATTACHMENT)
986 OnItemAttachmentSlotChanged(oldLoc, newLoc);
987
988 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT)
989 {
990 if (oldOwner)
991 OnWasDetached(oldOwner, oldLoc.GetSlot());
992 else
993 Error("EntityAI::EEItemLocationChanged - detached, but oldOwner is null");
994 }
995
996 if (newLoc.GetType() == InventoryLocationType.ATTACHMENT)
997 {
998 if (newOwner)
999 OnWasAttached(newOwner, newLoc.GetSlot());
1000 else
1001 Error("EntityAI::EEItemLocationChanged - attached, but newOwner is null");
1002 }
1003
1004 Man player;
1005 if (oldLoc.GetType() == InventoryLocationType.HANDS)
1006 {
1007 player = Man.Cast(oldOwner);
1008 player.OnItemInHandsChanged();
1009 player.GetCachedEquipment().OnItemCargoOut(this);
1010 }
1011
1012 if (newLoc.GetType() == InventoryLocationType.HANDS)
1013 {
1014 player = Man.Cast(newOwner);
1015 player.OnItemInHandsChanged();
1016 player.GetCachedEquipment().OnItemCargoIn(this);
1017 }
1018 }
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 NotifyPlayerLoadChanged(EntityAI owner)
void OnWasAttached(EntityAI parent, int slot_id)
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

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