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

◆ RepairItem()

bool PluginBase::RepairItem ( EntityAI itemToRepair)
inlineprotected

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

20 {
21 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
22 InventoryLocation repairIl = new InventoryLocation;
23 InventoryLocation currentIl = new InventoryLocation;
24
25 repairIl.SetTemporary(player, itemToRepair);
26 itemToRepair.GetInventory().GetCurrentInventoryLocation(currentIl);
27
28 if(GameInventory.LocationSyncMoveEntity(currentIl, repairIl))
29 {
30 if(currentIl.GetType() == InventoryLocationType.HANDS)
31 {
32 player.OnItemInHandsChanged();
33 }
34 return true;
35 }
36 return false;
37 }
DayZGame g_Game
Определения DayZGame.c:3942
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native void SetTemporary(notnull EntityAI parent, EntityAI e)
proto native int GetType()
returns type of InventoryLocation

Перекрестные ссылки g_Game, InventoryLocation::GetType(), GameInventory::LocationSyncMoveEntity() и InventoryLocation::SetTemporary().

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