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

◆ DropEntity()

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

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

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

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