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

◆ DropEntity()

override bool HumanInventory::DropEntity ( InventoryMode mode,
EntityAI owner,
notnull EntityAI item )
inlineprivate

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

140 {
141 InventoryLocation src = new InventoryLocation();
142 if (item)
143 {
144 GameInventory itemInventory = item.GetInventory();
145 if (itemInventory && itemInventory.GetCurrentInventoryLocation(src))
146 {
147 switch (src.GetType())
148 {
149 case InventoryLocationType.HANDS:
150 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::DropEntity(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
151 HandEvent(mode, new HandEventDrop(GetManOwner(), src));
152 return true;
153
154 default:
155 return super.DropEntity(mode, owner, item);
156 }
157 }
158 }
159
160 Error("No inventory location");
161 return false;
162 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
Man GetManOwner()
Определения HumanInventory.c:102
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
proto native int GetType()
returns type of InventoryLocation
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), GameInventory::GetCurrentInventoryLocation(), GetManOwner(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().

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