internal static unsafe byte Invoke(IntPtr obj, PawnAction ActionToAbort) { long *p = stackalloc long[] { 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = ActionToAbort; Main.GetProcessEvent(obj, K2_ForceAbortAction_ptr, new IntPtr(p));; return(*(b + 8)); } }
internal static unsafe bool Invoke(IntPtr obj, PawnAction NewAction, byte Priority, UObject Instigator) { long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = NewAction; *(b + 8) = Priority; *((IntPtr *)(b + 16)) = Instigator; Main.GetProcessEvent(obj, K2_PushAction_ptr, new IntPtr(p));; return(*((bool *)(b + 24))); } }
internal static unsafe bool Invoke(Pawn Pawn, PawnAction Action, byte Priority) { long *p = stackalloc long[] { 0L, 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = Pawn; *((IntPtr *)(b + 8)) = Action; *(b + 16) = Priority; Main.GetProcessEvent(PawnActionsComponent.DefaultObject, K2_PerformAction_ptr, new IntPtr(p));; return(*((bool *)(b + 17))); } }
public void InitializeMonster(MonsterType monsterType, string name, int level, int attack, int magicAttack, int defense, int magicDefense, int HP, int dexterity, int attackRange) { this.monsterType = monsterType; Name = monsterType.ToString(); InitializePawn(PawnType.Monster, name, level, attack, magicAttack, defense, magicDefense, HP, dexterity, attackRange); defaultSkill = 1; equippedSkill = 3; skillsAndPassives = new Dictionary <int, string>(); ReadSkillNames(this); CanDoAction = true; remainedStep = dexterity; actionType = ActionType.Actionable; gm = FindObjectOfType <GameManager>(); pawnAction = gm.gameInteraction.pawnActionPanel; }