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

◆ TakeEntityToHandsImpl()

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

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

203 {
204 if (!g_Game.IsDedicatedServer() )
205 {
206 InventoryLocation il = new InventoryLocation;
207 il.SetHands(this, item);
208 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
209 }
210
211 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
212 EntityAI itemInHands = GetEntityInHands();
213
214 InventoryLocation src_item = new InventoryLocation;
215 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
216 {
217 if (itemInHands == null)
218 {
219 InventoryLocation hand_dst = new InventoryLocation;
220 hand_dst.SetHands(this, item);
221 GetHumanInventory().TakeToDst(mode, src_item, hand_dst);
222 }
223 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
224 GetInventory().SwapEntities(mode, itemInHands, item);
226 }
227 }
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:4074
void UpdateInventoryMenu()
proto native EntityAI GetEntityInHands()
Returns the current entity in hands.
proto native HumanInventory GetHumanInventory()
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:243
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
override string GetDebugName()
Определения dayzplayer.c:1191
class LOD Object

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

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