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

◆ TakeEntityToHandsImpl()

void EntityAI::TakeEntityToHandsImpl ( InventoryMode mode,
EntityAI item )
inlineprotected

См. определение в файле 3_Game/Entities/Man.c строка 187

188 {
189 if (!GetGame().IsDedicatedServer() )
190 {
191 InventoryLocation il = new InventoryLocation;
192 il.SetHands(this, item);
193 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
194 }
195
196 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
198
199 InventoryLocation src_item = new InventoryLocation;
200 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
201 {
202 if (itemInHands == null)
203 {
204 InventoryLocation hand_dst = new InventoryLocation;
205 hand_dst.SetHands(this, item);
206 GetHumanInventory().TakeToDst(mode, src_item, hand_dst);
207 }
208 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
209 GetInventory().SwapEntities(mode, itemInHands, item);
211 }
212 }
void syncDebugPrint(string s)
Определения 3_Game/Systems/Inventory/Debug.c:1
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
void UpdateInventoryMenu()
proto native HumanInventory GetHumanInventory()
proto native EntityAI GetEntityInHands()
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:235
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
override string GetDebugName()
Определения dayzplayer.c:1170
class LOD Object
proto native CGame GetGame()

Перекрестные ссылки GetDebugName(), HumanInventory::GetEntityInHands(), GetGame(), GetHumanInventory(), LogManager::IsSyncLogEnable(), InventoryLocation::SetHands(), syncDebugPrint(), HumanInventory::TakeToDst() и UpdateInventoryMenu().

Используется в JunctureTakeEntityToHands(), LocalTakeEntityToHands(), PredictiveTakeEntityToHands() и ServerTakeEntityToHands().