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

Закрытые члены

void HandEventDrop (Man p=null, InventoryLocation src=null)
 
override void ReadFromContext (ParamsReadContext ctx)
 
override void WriteToContext (ParamsWriteContext ctx)
 
override bool CheckRequestEx (InventoryValidation validation)
 
override bool CanPerformEventEx (InventoryValidation validation)
 
void HandEventThrow (Man p=null, InventoryLocation src=null)
 
override void ReadFromContext (ParamsReadContext ctx)
 
override void WriteToContext (ParamsWriteContext ctx)
 
void SetForce (vector force)
 
vector GetForce ()
 

Закрытые данные

bool m_CanPerformDrop
 
vector m_Force
 

Подробное описание

Методы

◆ CanPerformEventEx()

override bool CanPerformEventEx ( InventoryValidation validation)
inlineprivate

On multiplayer client, if this is the initial call then we are waiting for the server to setup this event still

Singleplayer or server was initial caller

443 {
444 if (!m_CanPerformDrop)
445 {
446 return false;
447 }
448
450 if (!validation.m_IsJuncture && !validation.m_IsRemote && !GetDst() && (GetGame().IsMultiplayer() && GetGame().IsClient()))
451 {
452 return true;
453 }
454
456 if (!validation.m_IsRemote && !GetDst())
457 {
458 m_Dst = new InventoryLocation();
460
461 if (!m_CanPerformDrop)
462 {
463 validation.m_Reason = InventoryValidationReason.DROP_PREVENTED;
464 return false;
465 }
466 }
467
468 return super.CanPerformEventEx(validation);
469 }
InventoryValidationReason
Definition Inventory.c:37
DayZPlayer m_Player
Definition Hand_Events.c:42
EntityAI GetSrcEntity()
Definition Hand_Events.c:81
InventoryLocation GetDst()
Definition Hand_Events.c:88
script counterpart to engine's class Inventory
Definition Inventory.c:79
static bool SetGroundPosByOwner(EntityAI owner, notnull EntityAI item, out InventoryLocation ground)
Definition Inventory.c:1255
bool m_CanPerformDrop
Definition Hand_Events.c:471
InventoryLocation.
Definition InventoryLocation.c:29
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetDst(), GetGame(), GetSrcEntity(), m_Player и GameInventory::SetGroundPosByOwner().

◆ CheckRequestEx()

override bool CheckRequestEx ( InventoryValidation validation)
inlineprivate

Check to see if this is the initial call from the server (but the event originated from a client)

426 {
428 if (!validation.m_IsJuncture && IsAuthoritative())
429 {
431 }
432
433 if (!m_CanPerformDrop)
434 {
435 validation.m_Reason = InventoryValidationReason.DROP_PREVENTED;
436 return false;
437 }
438
439 return super.CheckRequestEx(validation);
440 }
bool IsAuthoritative()
Definition Hand_Events.c:55

Перекрестные ссылки GetSrcEntity(), IsAuthoritative(), m_Player и GameInventory::SetGroundPosByOwner().

◆ GetForce()

vector GetForce ( )
inlineprivate
524{ return m_Force; }
vector m_Force
Definition Hand_Events.c:526

Перекрестные ссылки m_Force.

◆ HandEventDrop()

void HandEventDrop ( Man p = null,
InventoryLocation src = null )
inlineprivate
400 {
401 m_EventID = HandEventID.DROP;
402 m_CanPerformDrop = true;
403 }
m_EventID
HandEventID
events
Definition Hand_Events.c:7

Перекрестные ссылки m_EventID.

◆ HandEventThrow()

void HandEventThrow ( Man p = null,
InventoryLocation src = null )
inlineprivate
477 {
478 m_EventID = HandEventID.THROW;
479 if( src )
480 {
481 vector mat[4];
483 if (entity)
484 {
485 m_Dst = new InventoryLocation;
486 entity.GetTransform(mat);
487 m_Dst.SetGround(entity, mat);
488 }
489 else
490 {
491 Error("[hndfsm] HandEventThrow src entity null!");
492 }
493 }
494 }
Definition Building.c:6
Definition EnConvert.c:106
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки Error(), GetSrcEntity() и m_EventID.

◆ ReadFromContext() [1/2]

override void ReadFromContext ( ParamsReadContext ctx)
inlineprivate
406 {
407 super.ReadFromContext(ctx);
408
409 ctx.Read(m_CanPerformDrop);
411 if (!m_Dst)
412 {
413 m_Dst = new InventoryLocation();
414 }
415 }
bool OptionalLocationReadFromContext(out InventoryLocation loc, notnull ParamsReadContext ctx)
Definition InventoryLocation.c:662

Перекрестные ссылки OptionalLocationReadFromContext().

◆ ReadFromContext() [2/2]

override void ReadFromContext ( ParamsReadContext ctx)
inlineprivate
497 {
498 super.ReadFromContext(ctx);
499
500 m_Dst = new InventoryLocation;
501 m_Dst.ReadFromContext(ctx);
502
503 float x, y, z;
504 ctx.Read(x);
505 ctx.Read(y);
506 ctx.Read(z);
507 m_Force[0] = x;
508 m_Force[1] = y;
509 m_Force[2] = z;
510 }
Icon x
Icon y
bool ReadFromContext(ParamsReadContext ctx)
Definition InventoryLocation.c:296

Перекрестные ссылки InventoryLocation::ReadFromContext(), x и y.

◆ SetForce()

void SetForce ( vector force)
inlineprivate
523{ m_Force = force; }

◆ WriteToContext() [1/2]

override void WriteToContext ( ParamsWriteContext ctx)
inlineprivate
418 {
419 super.WriteToContext(ctx);
420
421 ctx.Write(m_CanPerformDrop);
423 }
bool OptionalLocationWriteToContext(InventoryLocation loc, notnull ParamsWriteContext ctx)
Definition InventoryLocation.c:640

Перекрестные ссылки OptionalLocationWriteToContext().

◆ WriteToContext() [2/2]

override void WriteToContext ( ParamsWriteContext ctx)
inlineprivate
513 {
514 super.WriteToContext(ctx);
515
516 m_Dst.WriteToContext(ctx);
517
518 ctx.Write(m_Force[0]);
519 ctx.Write(m_Force[1]);
520 ctx.Write(m_Force[2]);
521 }

Поля

◆ m_CanPerformDrop

bool m_CanPerformDrop
private

◆ m_Force

vector m_Force
private

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


Объявления и описания членов класса находятся в файле: