963 {
964 EntityAI oldOwner = oldLoc.GetParent();
965 EntityAI newOwner = newLoc.GetParent();
967
970
972 {
973 if (oldOwner)
975 else
976 Error(
"EntityAI::EEItemLocationChanged - detached, but oldOwner is null");
977 }
978
980 {
981 if (newOwner)
983 else
984 Error(
"EntityAI::EEItemLocationChanged - attached, but newOwner is null");
985 }
986
987 Man player;
989 {
990 player = Man.Cast(oldOwner);
991 player.OnItemInHandsChanged();
992 player.GetCachedEquipment().OnItemCargoOut(this);
993 }
994
996 {
997 player = Man.Cast(newOwner);
998 player.OnItemInHandsChanged();
999 player.GetCachedEquipment().OnItemCargoIn(this);
1000 }
1001 }
InventoryLocationType
types of Inventory Location
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.