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

◆ DropEntity()

bool GameInventory::DropEntity ( InventoryMode mode,
EntityAI owner,
notnull EntityAI item )
inlineprotected

См. определение в файле 3_Game/DayZ/Systems/Inventory/Inventory.c строка 1266

1267 {
1268 if (LogManager.IsInventoryMoveLogEnable()) inventoryDebugPrint("[inv] I::Drop(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
1269 InventoryLocation src = new InventoryLocation();
1270 if (item.GetInventory().GetCurrentInventoryLocation(src))
1271 {
1272 InventoryLocation dst = new InventoryLocation();
1273 if (!SetGroundPosByOwner(owner, item, dst))
1274 {
1275 OnInventoryFailure(InventoryCommandType.SYNC_MOVE, InventoryValidationReason.DROP_PREVENTED, src, dst);
1276 return false;
1277 }
1278
1279 return TakeToDst(mode, src, dst);
1280 }
1281
1282 Error("DropEntity - No inventory location");
1283 return false;
1284 }
void inventoryDebugPrint(string s)
InventoryCommandType
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
InventoryValidationReason
void OnInventoryFailure(InventoryCommandType type, InventoryValidationReason reason, InventoryLocation src, InventoryLocation dst)
bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
move src to dst
static bool SetGroundPosByOwner(EntityAI owner, notnull EntityAI item, out InventoryLocation ground)
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), inventoryDebugPrint(), LogManager::IsInventoryMoveLogEnable(), OnInventoryFailure(), SetGroundPosByOwner() и TakeToDst().

Используется в SetInactive() и ThrowEntityFromInventory().