DayZ 1.24
Loading...
Searching...
No Matches
HandEventBase Class Reference

Abstracted event, not to be used, only inherited. More...

Collaboration diagram for HandEventBase:
[legend]

Private Member Functions

void HandEventTake (Man p=null, InventoryLocation src=null)
 
override InventoryLocation GetDst ()
 
override bool CheckRequestSrc ()
 
override bool CheckRequest ()
 
override bool CanPerformEventEx (InventoryValidation validation)
 
override bool AcquireInventoryJunctureFromServer (notnull Man player)
 
void HandEventMoveTo (Man p=null, InventoryLocation src=null, InventoryLocation dst=null)
 destination for item in hands
 
override void ReadFromContext (ParamsReadContext ctx)
 
override void WriteToContext (ParamsWriteContext ctx)
 
override InventoryLocation GetDst ()
 
override bool CheckRequestSrc ()
 
override bool CheckRequest ()
 
override bool CanPerformEvent ()
 
override bool AcquireInventoryJunctureFromServer (notnull Man player)
 
override string DumpToString ()
 
override InventoryLocation GetDst ()
 
override bool CheckRequestSrc ()
 
override bool CheckRequest ()
 
override bool CanPerformEvent ()
 
override bool AcquireInventoryJunctureFromServer (notnull Man player)
 
void HandEventSwap (Man p=null, InventoryLocation src=null, InventoryLocation src2=null, InventoryLocation dst=null, InventoryLocation dst2=null)
 
override void ReadFromContext (ParamsReadContext ctx)
 
override void WriteToContext (ParamsWriteContext ctx)
 
override InventoryLocation GetDst ()
 
override EntityAI GetSecondSrcEntity ()
 
override bool CheckRequestSrc ()
 
override bool CheckRequest ()
 
override bool CanPerformEvent ()
 
override bool AcquireInventoryJunctureFromServer (notnull Man player)
 
override string DumpToString ()
 
void CheckAndExecuteForceStandUp ()
 
override bool ReserveInventory ()
 
override void ClearInventoryReservation ()
 
void HandEventDestroy (Man p=null, InventoryLocation src=null)
 
override bool IsServerSideOnly ()
 
void HandEventCreated (Man p=null, InventoryLocation src=null)
 
void HandEventDestroyed (Man p=null, InventoryLocation src=null)
 
void HandEvengReplaceWithNewBase (Man p=null, InventoryLocation src=null, ReplaceItemWithNewLambdaBase lambda=NULL)
 
override void ReadFromContext (ParamsReadContext ctx)
 
override void WriteToContext (ParamsWriteContext ctx)
 
override bool IsServerSideOnly ()
 
override InventoryLocation GetDst ()
 
override string DumpToString ()
 
void HandEventReplaced (Man p=null, InventoryLocation src=null)
 
void HandAnimEventChanged (Man p=null, InventoryLocation src=null)
 
void HandEventHumanCommandActionFinished (Man p=null, InventoryLocation src=null)
 
void HandEventHumanCommandActionAborted (Man p=null, InventoryLocation src=null)
 

Private Attributes

ref InventoryLocation m_Dst
 
ref InventoryLocation m_Src2
 destination for new item (i.e. hands)
 
ref InventoryLocation m_Dst2
 src of old item in hands
 
int m_Animation2ID = -1
 destination for old item that was in hands
 
string m_Type
 
ref ReplaceItemWithNewLambdaBase m_Lambda
 

Detailed Description

Abstracted event, not to be used, only inherited.

represents event that triggers transition from state to state

triggered when animation action aborts

triggered when animation action finishes

Definition at line 190 of file Hand_Events.c.

Member Function Documentation

◆ AcquireInventoryJunctureFromServer() [1/4]

override bool HandEventBase::AcquireInventoryJunctureFromServer ( notnull Man player)
inlineprivate

Definition at line 235 of file Hand_Events.c.

236 {
239 if (src && dst)
241 Error("[hndfsm] HandEventTake. AcquireInventoryJunctureFromServer: no src or dst for ev=" + DumpToString());
242 return JunctureRequestResult.ERROR;
243 }
InventoryLocation GetSrc()
Definition Hand_Events.c:80
JunctureRequestResult
Definition Hand_Events.c:28
bool TryAcquireInventoryJunctureFromServer(notnull Man player, notnull InventoryLocation src, notnull InventoryLocation dst)
Definition Junctures.c:2
override InventoryLocation GetDst()
override string DumpToString()
InventoryLocation.
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References DumpToString(), Error(), GetDst(), GetSrc(), and TryAcquireInventoryJunctureFromServer().

◆ AcquireInventoryJunctureFromServer() [2/4]

override bool HandEventBase::AcquireInventoryJunctureFromServer ( notnull Man player)
inlineprivate

Definition at line 294 of file Hand_Events.c.

295 {
298 if (src && dst)
300 Error("[hndfsm] HandEventMoveTo. AcquireInventoryJunctureFromServer: no src or dst for ev=" + DumpToString());
301 return JunctureRequestResult.ERROR;
302 }

References DumpToString(), Error(), GetDst(), GetSrc(), and TryAcquireInventoryJunctureFromServer().

◆ AcquireInventoryJunctureFromServer() [3/4]

override bool HandEventBase::AcquireInventoryJunctureFromServer ( notnull Man player)
inlineprivate

Definition at line 350 of file Hand_Events.c.

351 {
354 if (src && dst)
356 Error("[hndfsm] HandEventThrow. AcquireInventoryJunctureFromServer: no src or dst for ev=" + DumpToString());
357 return JunctureRequestResult.ERROR;
358 }

References DumpToString(), Error(), GetDst(), GetSrc(), and TryAcquireInventoryJunctureFromServer().

◆ AcquireInventoryJunctureFromServer() [4/4]

override bool HandEventBase::AcquireInventoryJunctureFromServer ( notnull Man player)
inlineprivate

Definition at line 586 of file Hand_Events.c.

587 {
589 }
ref InventoryLocation m_Src
Definition Hand_Events.c:43
bool TryAcquireTwoInventoryJuncturesFromServer(notnull Man player, notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
Definition Junctures.c:27
ref InventoryLocation m_Dst2
src of old item in hands
ref InventoryLocation m_Src2
destination for new item (i.e. hands)
ref InventoryLocation m_Dst

References m_Src, and TryAcquireTwoInventoryJuncturesFromServer().

◆ CanPerformEvent() [1/3]

override bool HandEventBase::CanPerformEvent ( )
inlineprivate

Definition at line 281 of file Hand_Events.c.

282 {
284 {
285#ifdef DEVELOPER
287 Debug.InventoryHFSMLog("CANNOT perform", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CanPerformEvent", m_Player.ToString());
288#endif
289 return false;
290 }
291 return true;
292 }
DayZPlayer m_Player
Definition Hand_Events.c:42
HandEventID GetEventID()
Definition Hand_Events.c:53
HandEventID
events
Definition Hand_Events.c:7
Definition Debug.c:14
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:183
script counterpart to engine's class Inventory
Definition Inventory.c:79
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
static bool IsInventoryHFSMLogEnable()
Definition Debug.c:749

References GetDst(), GetEventID(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCanMoveEntity(), and m_Player.

Referenced by CanPerformEventEx().

◆ CanPerformEvent() [2/3]

override bool HandEventBase::CanPerformEvent ( )
inlineprivate

Definition at line 337 of file Hand_Events.c.

338 {
340 {
341#ifdef DEVELOPER
343 Debug.InventoryHFSMLog("CANNOT perform", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CanPerformEvent", m_Player.ToString());
344#endif
345 return false;
346 }
347 return true;
348 }

References GetDst(), GetEventID(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCanMoveEntity(), and m_Player.

◆ CanPerformEvent() [3/3]

override bool HandEventBase::CanPerformEvent ( )
inlineprivate

Definition at line 574 of file Hand_Events.c.

575 {
577 return true;
578
579#ifdef DEVELOPER
581 Debug.InventoryHFSMLog("CANNOT perform", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CanPerformEvent", m_Player.ToString());
582#endif
583 return false;
584 }
EntityAI GetItem()
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
Definition Inventory.c:645

References GameInventory::CanForceSwapEntitiesEx(), GetEventID(), GetItem(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and m_Player.

◆ CanPerformEventEx()

override bool HandEventBase::CanPerformEventEx ( InventoryValidation validation)
inlineprivate

Definition at line 217 of file Hand_Events.c.

218 {
219 if (validation.m_IsJuncture)
220 return true;
221
223 {
224#ifdef DEVELOPER
226 Debug.InventoryHFSMLog("CANNOT perform", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CanPerformEvent", m_Player.ToString());
227#endif
228 //if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[desync] HandleInputData man=" + Object.GetDebugName(m_Player) + " CANNOT perform ev=" + DumpToString());
229 return false;
230 }
231
232 return super.CanPerformEventEx(validation);
233 }

References GetDst(), GetEventID(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCanMoveEntity(), and m_Player.

◆ CheckAndExecuteForceStandUp()

void HandEventBase::CheckAndExecuteForceStandUp ( )
inlineprivate

Definition at line 596 of file Hand_Events.c.

597 {
599 player.ForceStandUpForHeavyItemsSwap(m_Src.GetItem(), m_Src2.GetItem());
600 }

References m_Player, and m_Src.

◆ CheckRequest() [1/4]

override bool HandEventBase::CheckRequest ( )
inlineprivate

Definition at line 212 of file Hand_Events.c.

213 {
215 }
const float c_MaxItemDistanceRadius
anti-cheats
Definition Inventory.c:788
static proto native bool CheckMoveToDstRequest(notnull Man requestingPlayer, notnull InventoryLocation src, notnull InventoryLocation dst, float radius)

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckMoveToDstRequest(), GetDst(), GetSrc(), and m_Player.

Referenced by CheckRequestEx().

◆ CheckRequest() [2/4]

◆ CheckRequest() [3/4]

◆ CheckRequest() [4/4]

override bool HandEventBase::CheckRequest ( )
inlineprivate

Definition at line 552 of file Hand_Events.c.

553 {
555 {
556#ifdef DEVELOPER
558 Debug.InventoryHFSMLog("CheckSwapItemsRequest - failed", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CheckRequest", m_Player.ToString());
559#endif
560 }
561 else if (!m_Player.GetHumanInventory().CanAddSwappedEntity(m_Src, m_Src2, m_Dst, m_Dst2))
562 {
563#ifdef DEVELOPER
565 Debug.InventoryHFSMLog("CanAddSwappedEntity - failed", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CheckRequest", m_Player.ToString());
566#endif
567 }
568 else
569 return true;
570
571 return false;
572 }
static proto native bool CheckSwapItemsRequest(notnull Man requestingPlayer, notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, float radius)

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckSwapItemsRequest(), GetEventID(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), m_Player, and m_Src.

◆ CheckRequestSrc() [1/4]

override bool HandEventBase::CheckRequestSrc ( )
inlineprivate

Definition at line 201 of file Hand_Events.c.

202 {
204 {
205 Debug.InventoryHFSMLog("CANNOT perform", typename.EnumToString(HandEventID, GetEventID()), "n/a", "CheckRequestSrc", m_Player.ToString());
206 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[cheat] HandleInputData man=" + Object.GetDebugName(m_Player) + " failed src1 check with cmd=" + typename.EnumToString(HandEventID, GetEventID()) + " src1=" + InventoryLocation.DumpToStringNullSafe(GetSrc()));
207 return false; // stale packet
208 }
209 return true;
210 }
void syncDebugPrint(string s)
Definition Debug.c:1
static proto native bool CheckRequestSrc(notnull Man requestingPlayer, notnull InventoryLocation src, float radius)
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsSyncLogEnable()
Definition Debug.c:759

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckRequestSrc(), InventoryLocation::DumpToStringNullSafe(), GetEventID(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsSyncLogEnable(), m_Player, and syncDebugPrint().

◆ CheckRequestSrc() [2/4]

override bool HandEventBase::CheckRequestSrc ( )
inlineprivate

Definition at line 266 of file Hand_Events.c.

267 {
269 {
270 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[cheat] HandleInputData man=" + Object.GetDebugName(m_Player) + " failed src1 check with cmd=" + typename.EnumToString(HandEventID, GetEventID()) + " src1=" + InventoryLocation.DumpToStringNullSafe(GetSrc()));
271 return false; // stale packet
272 }
273 return true;
274 }

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckRequestSrc(), InventoryLocation::DumpToStringNullSafe(), GetEventID(), GetSrc(), LogManager::IsSyncLogEnable(), m_Player, and syncDebugPrint().

◆ CheckRequestSrc() [3/4]

override bool HandEventBase::CheckRequestSrc ( )
inlineprivate

Definition at line 319 of file Hand_Events.c.

320 {
322 {
323#ifdef DEVELOPER
325 Debug.InventoryHFSMLog("Check src - failed, src = " + InventoryLocation.DumpToStringNullSafe(GetSrc()), typename.EnumToString(HandEventID, GetEventID()), "n/a", "CheckRequestSrc", m_Player.ToString());
326#endif
327 return false; // stale packet
328 }
329 return true;
330 }

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckRequestSrc(), InventoryLocation::DumpToStringNullSafe(), GetEventID(), GetSrc(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and m_Player.

◆ CheckRequestSrc() [4/4]

override bool HandEventBase::CheckRequestSrc ( )
inlineprivate

Definition at line 535 of file Hand_Events.c.

536 {
537 //return false;
538
540 {
541 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[cheat] HandleInputData man=" + Object.GetDebugName(m_Player) + " failed src1 check with cmd=" + typename.EnumToString(HandEventID, GetEventID()) + " src1=" + InventoryLocation.DumpToStringNullSafe(GetSrc()));
542 return false; // stale packet
543 }
545 {
546 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[cheat] HandleInputData man=" + Object.GetDebugName(m_Player) + " failed src2 check with cmd=" + typename.EnumToString(HandEventID, GetEventID()) + " src2=" + InventoryLocation.DumpToStringNullSafe(m_Src2));
547 return false; // stale packet
548 }
549 return true;
550 }

References GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckRequestSrc(), InventoryLocation::DumpToStringNullSafe(), GetEventID(), GetSrc(), LogManager::IsSyncLogEnable(), m_Player, and syncDebugPrint().

◆ ClearInventoryReservation()

override void HandEventBase::ClearInventoryReservation ( )
inlineprivate

Definition at line 614 of file Hand_Events.c.

615 {
616 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst.GetItem(), m_Dst);
617 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst2.GetItem(), m_Dst2);
618 }

References m_Player.

◆ DumpToString() [1/3]

override string HandEventBase::DumpToString ( )
inlineprivate

Definition at line 304 of file Hand_Events.c.

305 {
306 string res = "{ HandEventMoveTo id=" + typename.EnumToString(HandEventID, GetEventID()) + " pl=" + Object.GetDebugName(m_Player) + " src=" + InventoryLocation.DumpToStringNullSafe(m_Src) + " dst=" + InventoryLocation.DumpToStringNullSafe(m_Dst) + " }";
307 return res;
308 }

References InventoryLocation::DumpToStringNullSafe(), GetEventID(), m_Player, and m_Src.

Referenced by AcquireInventoryJunctureFromServer().

◆ DumpToString() [2/3]

override string HandEventBase::DumpToString ( )
inlineprivate

Definition at line 591 of file Hand_Events.c.

592 {
593 return "{ HandEventSwap id=" + typename.EnumToString(HandEventID, GetEventID()) + " pl=" + Object.GetDebugName(m_Player) + " src1=" + InventoryLocation.DumpToStringNullSafe(m_Src) + " src2=" + InventoryLocation.DumpToStringNullSafe(m_Src2) + " dst1=" + InventoryLocation.DumpToStringNullSafe(m_Dst) + " dst2=" + InventoryLocation.DumpToStringNullSafe(m_Dst2) + " }";
594 }

References InventoryLocation::DumpToStringNullSafe(), GetEventID(), m_Player, and m_Src.

◆ DumpToString() [3/3]

override string HandEventBase::DumpToString ( )
inlineprivate

Definition at line 703 of file Hand_Events.c.

704 {
705 string res = "{ HandEvenReplaceWithNewBase id=" + typename.EnumToString(HandEventID, GetEventID()) + " pl=" + Object.GetDebugName(m_Player) + " src=" + InventoryLocation.DumpToStringNullSafe(GetSrc()) + " lambda=" + m_Lambda + " dst=" + InventoryLocation.DumpToStringNullSafe(GetDst()) + " }";
706 return res;
707 }
ref ReplaceItemWithNewLambdaBase m_Lambda

References InventoryLocation::DumpToStringNullSafe(), GetDst(), GetEventID(), GetSrc(), and m_Player.

◆ GetDst() [1/5]

override InventoryLocation HandEventBase::GetDst ( )
inlineprivate

Definition at line 194 of file Hand_Events.c.

195 {
197 dst.SetHands(m_Player, GetSrcEntity());
198 return dst;
199 }
EntityAI GetSrcEntity()
Definition Hand_Events.c:81

References GetSrcEntity(), and m_Player.

Referenced by AcquireInventoryJunctureFromServer(), CanPerformEvent(), CanPerformEventEx(), CheckRequest(), ClearInventoryReservation(), and ReserveInventory().

◆ GetDst() [2/5]

override InventoryLocation HandEventBase::GetDst ( )
inlineprivate

Definition at line 264 of file Hand_Events.c.

264{ return m_Dst; }

References m_Dst.

◆ GetDst() [3/5]

override InventoryLocation HandEventBase::GetDst ( )
inlineprivate

Definition at line 314 of file Hand_Events.c.

315 {
316 return m_Dst;
317 }

◆ GetDst() [4/5]

override InventoryLocation HandEventBase::GetDst ( )
inlineprivate

Definition at line 525 of file Hand_Events.c.

526 {
527 return m_Dst;
528 }

◆ GetDst() [5/5]

override InventoryLocation HandEventBase::GetDst ( )
inlineprivate

Definition at line 696 of file Hand_Events.c.

697 {
699 dst.SetHands(m_Player, GetSrcEntity());
700 return dst;
701 }

References GetSrcEntity(), and m_Player.

◆ GetSecondSrcEntity()

override EntityAI HandEventBase::GetSecondSrcEntity ( )
inlineprivate

Definition at line 530 of file Hand_Events.c.

531 {
532 return m_Src2.GetItem();
533 }

◆ HandAnimEventChanged()

void HandEventBase::HandAnimEventChanged ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 734 of file Hand_Events.c.

734{ m_EventID = HandEventID.ANIMEVENT_CHANGE_HIDE; }
m_EventID

References m_EventID.

Referenced by HandEventFactory().

◆ HandEvengReplaceWithNewBase()

void HandEventBase::HandEvengReplaceWithNewBase ( Man p = null,
InventoryLocation src = null,
ReplaceItemWithNewLambdaBase lambda = NULL )
inlineprivate

Definition at line 679 of file Hand_Events.c.

679{ m_EventID = HandEventID.REPLACE; m_Lambda = lambda; }

References m_EventID.

◆ HandEventCreated()

void HandEventBase::HandEventCreated ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 666 of file Hand_Events.c.

666{ m_EventID = HandEventID.CREATED; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventDestroy()

void HandEventBase::HandEventDestroy ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 659 of file Hand_Events.c.

659{ m_EventID = HandEventID.DESTROY; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventDestroyed()

void HandEventBase::HandEventDestroyed ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 671 of file Hand_Events.c.

671{ m_EventID = HandEventID.DESTROYED; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventHumanCommandActionAborted()

void HandEventBase::HandEventHumanCommandActionAborted ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 757 of file Hand_Events.c.

757{ m_EventID = HandEventID.HUMANCOMMAND_ACTION_ABORTED; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventHumanCommandActionFinished()

void HandEventBase::HandEventHumanCommandActionFinished ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 751 of file Hand_Events.c.

751{ m_EventID = HandEventID.HUMANCOMMAND_ACTION_FINISHED; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventMoveTo()

void HandEventBase::HandEventMoveTo ( Man p = null,
InventoryLocation src = null,
InventoryLocation dst = null )
inlineprivate

destination for item in hands

Definition at line 250 of file Hand_Events.c.

250{ m_EventID = HandEventID.MOVETO; m_Dst = dst; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventReplaced()

void HandEventBase::HandEventReplaced ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 727 of file Hand_Events.c.

727{ m_EventID = HandEventID.REPLACED; }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventSwap()

void HandEventBase::HandEventSwap ( Man p = null,
InventoryLocation src = null,
InventoryLocation src2 = null,
InventoryLocation dst = null,
InventoryLocation dst2 = null )
inlineprivate

Definition at line 493 of file Hand_Events.c.

494 {
495 m_EventID = HandEventID.SWAP;
496 m_Dst = dst;
497 m_Src2 = src2;
498 m_Dst2 = dst2;
499 }

References m_EventID.

Referenced by HandEventFactory().

◆ HandEventTake()

void HandEventBase::HandEventTake ( Man p = null,
InventoryLocation src = null )
inlineprivate

Definition at line 192 of file Hand_Events.c.

192{ m_EventID = HandEventID.TAKE; }

References m_EventID.

Referenced by HandEventFactory().

◆ IsServerSideOnly() [1/2]

override bool HandEventBase::IsServerSideOnly ( )
inlineprivate

Definition at line 661 of file Hand_Events.c.

661{ return true; }

◆ IsServerSideOnly() [2/2]

override bool HandEventBase::IsServerSideOnly ( )
inlineprivate

Definition at line 694 of file Hand_Events.c.

694{ return true; }

◆ ReadFromContext() [1/3]

override void HandEventBase::ReadFromContext ( ParamsReadContext ctx)
inlineprivate

Definition at line 252 of file Hand_Events.c.

253 {
255 super.ReadFromContext(ctx);
256 m_Dst.ReadFromContext(ctx);
257 }

Referenced by CreateHandEventFromContext().

◆ ReadFromContext() [2/3]

override void HandEventBase::ReadFromContext ( ParamsReadContext ctx)
inlineprivate

Definition at line 501 of file Hand_Events.c.

502 {
503 super.ReadFromContext(ctx);
504
508
509 m_Src2.ReadFromContext(ctx);
510 m_Dst.ReadFromContext(ctx);
511 m_Dst2.ReadFromContext(ctx);
512 ctx.Read(m_Animation2ID);
513 }
int m_Animation2ID
destination for old item that was in hands

◆ ReadFromContext() [3/3]

override void HandEventBase::ReadFromContext ( ParamsReadContext ctx)
inlineprivate

Definition at line 681 of file Hand_Events.c.

682 {
683 super.ReadFromContext(ctx);
684 ctx.Read(m_Type);
685 Error("[hndfsm] HandEventDestroyAndReplaceWithNew - Cannot serialize lambda (read)");
686 }

References Error(), and m_Type.

◆ ReserveInventory()

override bool HandEventBase::ReserveInventory ( )
inlineprivate

Definition at line 602 of file Hand_Events.c.

603 {
604 if (!m_Player.GetHumanInventory().AddInventoryReservationEx(m_Dst.GetItem(), m_Dst, GameInventory.c_InventoryReservationTimeoutShortMS))
605 return false;
606 if (!m_Player.GetHumanInventory().AddInventoryReservationEx(m_Dst2.GetItem(), m_Dst2, GameInventory.c_InventoryReservationTimeoutShortMS))
607 {
608 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst.GetItem(), m_Dst);
609 return false;
610 }
611 return true;
612 }
const int c_InventoryReservationTimeoutShortMS
Definition Inventory.c:688

References GameInventory::c_InventoryReservationTimeoutShortMS, and m_Player.

◆ WriteToContext() [1/3]

override void HandEventBase::WriteToContext ( ParamsWriteContext ctx)
inlineprivate

Definition at line 258 of file Hand_Events.c.

259 {
260 super.WriteToContext(ctx);
261 m_Dst.WriteToContext(ctx);
262 }

◆ WriteToContext() [2/3]

override void HandEventBase::WriteToContext ( ParamsWriteContext ctx)
inlineprivate

Definition at line 515 of file Hand_Events.c.

516 {
517 super.WriteToContext(ctx);
518
519 m_Src2.WriteToContext(ctx);
520 m_Dst.WriteToContext(ctx);
521 m_Dst2.WriteToContext(ctx);
522 ctx.Write(m_Animation2ID);
523 }

◆ WriteToContext() [3/3]

override void HandEventBase::WriteToContext ( ParamsWriteContext ctx)
inlineprivate

Definition at line 687 of file Hand_Events.c.

688 {
689 super.WriteToContext(ctx);
690 ctx.Write(m_Type);
691 Error("[hndfsm] HandEventDestroyAndReplaceWithNew - Cannot serialize lambda (write)");
692 }

References Error(), and m_Type.

Member Data Documentation

◆ m_Animation2ID

int HandEventBase::m_Animation2ID = -1
private

destination for old item that was in hands

Definition at line 491 of file Hand_Events.c.

◆ m_Dst

ref InventoryLocation HandEventBase::m_Dst
private

Definition at line 248 of file Hand_Events.c.

Referenced by GetDst().

◆ m_Dst2

ref InventoryLocation HandEventBase::m_Dst2
private

src of old item in hands

Definition at line 490 of file Hand_Events.c.

◆ m_Lambda

ref ReplaceItemWithNewLambdaBase HandEventBase::m_Lambda
private

Definition at line 677 of file Hand_Events.c.

◆ m_Src2

ref InventoryLocation HandEventBase::m_Src2
private

destination for new item (i.e. hands)

Definition at line 489 of file Hand_Events.c.

◆ m_Type

string HandEventBase::m_Type
private

Definition at line 676 of file Hand_Events.c.


The documentation for this class was generated from the following file: