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

◆ HandEvent()

override bool HandEvent ( InventoryMode mode,
HandEventBase e )
protected

Let the client know a failure happened

If singleplayer or the client is executing this

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

2301 {
2302 if (!IsProcessing())
2303 {
2304 EntityAI itemInHands = GetEntityInHands();
2305
2307 il.SetHands(GetInventoryOwner(), itemInHands);
2308
2309 InventoryValidation validation = new InventoryValidation();
2310 if (e.CanPerformEventEx(validation))
2311 {
2312 m_DeferredEvent = new DeferredHandEvent(mode, e);
2313 if (m_DeferredEvent.ReserveInventory(this))
2314 {
2315 return true;
2316 }
2317 }
2318
2319 m_DeferredEvent = null;
2320
2322 if (!GetGame().IsMultiplayer() || GetGame().IsClient())
2323 {
2325 OnInventoryFailure(InventoryCommandType.HAND_EVENT, validation.m_Reason, e.GetSrc(), e.GetDst());
2326 }
2327 else
2328 {
2329 ScriptInputUserData serializer();
2330
2332 serializer.Write(validation.m_Reason);
2333
2334 GetDayZPlayerOwner().SendSyncJuncture(DayZPlayerSyncJunctures.SJ_INVENTORY_FAILURE, serializer);
2335 }
2336 }
2337
2338 return false;
2339 }
InventoryCommandType
m_DeferredEvent
bool IsProcessing()
Определения DayZPlayerInventory.c:2471
override void OnInventoryFailure(InventoryCommandType type, InventoryValidationReason reason, InventoryLocation src, InventoryLocation dst)
Определения DayZPlayerInventory.c:665
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:168
void DeferredHandEvent(InventoryMode mode, HandEventBase e)
Определения DayZPlayerInventory.c:127
static const int SJ_INVENTORY_FAILURE
Определения DayZPlayerSyncJunctures.c:32
override InventoryLocation GetDst()
Определения Hand_Events.c:212
override bool CanPerformEventEx(InventoryValidation validation)
Определения Hand_Events.c:235
static void SerializeHandEvent(ParamsWriteContext ctx, HandEventBase e)
hand
Определения InventoryInputUserData.c:72
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
InventoryLocation.
Определения InventoryLocation.c:29
InventoryValidationReason m_Reason
Определения gameplay.c:121
proto native CGame GetGame()

Перекрестные ссылки HandEventBase::CanPerformEventEx(), DeferredHandEvent(), GetDayZPlayerOwner(), HandEventBase::GetDst(), GetGame(), IsProcessing(), m_DeferredEvent, InventoryValidation::m_Reason, OnInventoryFailure(), InventoryInputUserData::SerializeHandEvent(), InventoryLocation::SetHands(), DayZPlayerSyncJunctures::SJ_INVENTORY_FAILURE и Serializer::Write().