public void Update() { if (PtrEntity != 0) { try { this.IsDead = Convert.ToBoolean(Memory.ReadByte(Process.handle, (uint)(PtrEntity + 0x8))); this.X = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x2C)); this.Y = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x30)); this.Z = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x34)); this.coords = Memory.ReadUInt(Process.handle, (uint)(PtrEntity + 0xAC)); //64? this._PtrEntity = (int)Memory.ReadUInt(Process.handle, (uint)(PtrEntity + 0x1D4)); if (this._PtrEntity != 0 && this._PtrEntity != -842150451) { this.Name = Memory.ReadString(Process.handle, (uint)(_PtrEntity + 0x3A), 40, true); if (Name != "") { this.Attitude = (eAttitude)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1C)); this.ID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x28)); this.GatherID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x32)); this.Level = Memory.ReadByte(Process.handle, (uint)(_PtrEntity + 0x36)); this.Health = Memory.ReadByte(Process.handle, (uint)(_PtrEntity + 0x38)); this.PetOwner = Memory.ReadString(Process.handle, (uint)(_PtrEntity + 0xC0), 32, true); this._Type18 = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x18)); this._Type168 = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1A8)); this.Class = (eClass)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1DC)); this.TargetID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x2D4)); this._Stance = (eStance)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x258)); this.DP = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x320)); this.RankID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0xE7C)); this.HealthHP = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1034)); this.HealthHPMax = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1038)); //4 } } } catch (Exception) { Clear(); } } else { Clear(); } }
/// <summary> /// Sets all struct values to 0. /// </summary> private void SetZero() { this._PtrEntity = 0; this.Name = ""; this.Level = 0; this.Health = 0; this._Type18 = 0; this._Type168 = 0; this.Attitude = 0; this.ID = 0; this.IsDead = false; this.TargetID = 0; this.X = 0; this.Y = 0; this.Z = 0; this._Stance = 0; }
/// <summary> /// Reads values from AION's memory and sets struct values accordingly. /// </summary> public void Update() { if (PtrEntity != 0) { try { this.IsDead = Convert.ToBoolean(Memory.ReadByte(Process.handle, (uint)(PtrEntity + 0x8))); this.X = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x28)); this.Y = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x2C)); this.Z = Memory.ReadFloat(Process.handle, (uint)(PtrEntity + 0x30)); this._PtrEntity = (int)Memory.ReadUInt(Process.handle, (uint)(PtrEntity + 0x1C4)); if (this._PtrEntity != 0 && this._PtrEntity != -842150451) { this.Name = Memory.ReadString(Process.handle, (uint)(_PtrEntity + 0x36), 40, true); this.Level = Memory.ReadByte(Process.handle, (uint)(_PtrEntity + 0x32)); this.Health = Memory.ReadByte(Process.handle, (uint)(_PtrEntity + 0x34)); this.HealthHP = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0xF48)); this.HealthHPMax = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0xF4C)); this._Type18 = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x18)); this._Type168 = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x168)); this.Attitude = (eAttitude)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x1C)); this.ID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x20)); this.TargetID = Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x290)); this._Stance = (eStance)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x218)); this.Class = (eClass)Memory.ReadInt(Process.handle, (uint)(_PtrEntity + 0x19C)); this.PetOwner = Memory.ReadString(Process.handle, (uint)(_PtrEntity + 0x7C), 32, true); } } catch (Exception) { Clear(); } } else { Clear(); } }
/// <summary> /// Reads values from AION's memory and sets struct values accordingly. /// </summary> public void Update() { if (PtrEntity != 0) { try { this.IsDead = Convert.ToBoolean(Memory.ReadByte(Process.handle, (PtrEntity + 0x8))); this.X = Memory.ReadFloat(Process.handle, (PtrEntity + 0x28)); this.Y = Memory.ReadFloat(Process.handle, (PtrEntity + 0x2C)); this.Z = Memory.ReadFloat(Process.handle, (PtrEntity + 0x30)); this._PtrEntity = Memory.ReadInt(Process.handle, (PtrEntity + 0x1C4)); if (this._PtrEntity != 0 && this._PtrEntity != -842150451) { this.Name = Memory.ReadString(Process.handle, (_PtrEntity + 0x36), 40, true); this.Level = Memory.ReadByte(Process.handle, (_PtrEntity + 0x32)); this.Health = Memory.ReadByte(Process.handle, (_PtrEntity + 0x34)); this._Type18 = Memory.ReadInt(Process.handle, (_PtrEntity + 0x18)); this._Type168 = Memory.ReadInt(Process.handle, (_PtrEntity + 0x168)); this.Attitude = (eAttitude)Memory.ReadInt(Process.handle, (_PtrEntity + 0x1C)); this._ID = Memory.ReadInt(Process.handle, (_PtrEntity + 0x20)); this.TargetID = Memory.ReadInt(Process.handle, (_PtrEntity + 0x284)); this._Stance = (eStance)Memory.ReadInt(Process.handle, (_PtrEntity + 0x20C)); this.State = Memory.ReadInt(Process.handle, (_PtrEntity + 0x20C)); this.Class = (eClass)Memory.ReadInt(Process.handle, (_PtrEntity + 0x19C)); } } catch (Exception) { SetZero(); } } else { SetZero(); } }
/// <summary> /// Reads values from AION's memory and sets struct values accordingly. /// </summary> public void Update() { if (PtrEntity != 0) { try { this.IsDead = Convert.ToBoolean(Memory.ReadByte(Process.handle, (PtrEntity + 0x8))); this.X = Memory.ReadFloat(Process.handle, (PtrEntity + 0x28)); this.Y = Memory.ReadFloat(Process.handle, (PtrEntity + 0x2C)); this.Z = Memory.ReadFloat(Process.handle, (PtrEntity + 0x30)); this._PtrEntity = Memory.ReadInt(Process.handle, (PtrEntity + 0x1C4)); if (this._PtrEntity != 0 && this._PtrEntity != -842150451) { this.Name = Memory.ReadString(Process.handle, (_PtrEntity + 0x36), 40, true); this.Level = Memory.ReadByte(Process.handle, (_PtrEntity + 0x32)); this.Health = Memory.ReadByte(Process.handle, (_PtrEntity + 0x34)); this._Type18 = Memory.ReadInt(Process.handle, (_PtrEntity + 0x18)); this._Type168 = Memory.ReadInt(Process.handle, (_PtrEntity + 0x168)); this.Attitude = (eAttitude)Memory.ReadInt(Process.handle, (_PtrEntity + 0x1C)); this._ID = Memory.ReadInt(Process.handle, (_PtrEntity + 0x20)); this.TargetID = Memory.ReadInt(Process.handle, (_PtrEntity + 0x284)); this._Stance = (eStance)Memory.ReadInt(Process.handle, (_PtrEntity + 0x20C)); this.Class = (eClass)Memory.ReadInt(Process.handle, (_PtrEntity + 0x19C)); } } catch (Exception) { SetZero(); } } else SetZero(); }
public Entity Update() { this._iEntity = Game.Process.GetPointer(this._iEntityNode + (ulong)Game.Resolver["ActorCollection"]["PointerActorSingle"].Value); if ((long)this._iEntity != 0L) { byte byte1 = Game.Process.GetByte(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Health"].Value); byte byte2 = Game.Process.GetByte(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Level"].Value); uint unsignedInteger = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Id"].Value); uint num1 = this._iHealthCurrent; string @string = Game.Process.GetString(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Name"].Value, 64U, MessageHandlerString.Unicode); if ((int)byte1 > 100 || (int)byte2 > 85 || ((int)unsignedInteger == 0 || @string.Length == 0)) { this._bValid = false; return(this); } this._bLevel = byte2; this._bHealth = byte1; this._zName = @string; this._bDuelling = (double)Game.Process.GetFloat(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Duelling"].Value) == 0.0; this._eTypeA = (eTypeA)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Type"].Value); this._eTypeC = this._bDuelling ? eTypeC.Attackable : (eTypeC)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["TypeNpc"].Value); this._iTypeID = this.IsPlayer() ? 0U : Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["SkillTimeTotal"].Value); this._iEntityExtended = Game.Process.GetPointer(this._iEntityNode + (ulong)Game.Resolver["ActorCollection"]["PointerActorSinglePosition"].Value); if (this.IsMonster() || this.IsPlayer()) { this._eAttitude = (eAttitude)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Attitude"].Value); this._fSpeed = Game.Process.GetFloat(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Speed"].Value); this._hSkillTime = (MessageHandler)Game.Process[this._iEntity + (ulong)Game.Resolver["ActorSingle"]["SkillTimeRemaining"].Value]; this._hStateList = new StateList(this._iEntity).Update(); this._iAttack = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["AttackSpeed"].Value); this._iHealthCurrent = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["HealthCurrent"].Value); this._iHealthMaximum = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["HealthMaximum"].Value); this._iSkillID = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["SkillId"].Value); this._iSkillDuration = (int)this._iSkillID == 0 ? 0U : Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["SkillTimeTotal"].Value); this._iTargetID = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["TargetId"].Value); this._iHide = Game.Resolver["ActorSingle"]["Hide"] == null ? 0U : Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Hide"].Value); this._iHideView = Game.Resolver["ActorSingle"]["HideSeeing"] == null ? 0U : (uint)Game.Process.GetByte(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["HideSeeing"].Value); double num2 = (double)this.UpdateRotation(); } if (this.IsKisk() || this.IsMonster()) { this._iOwnerID = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["OwnerId"].Value); this._zOwnerName = Game.Process.GetString(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["OwnerName"].Value, 32U, MessageHandlerString.Unicode); if (this._bUpdated && num1 <= 0U && (this._iHealthCurrent >= this._iHealthMaximum && this.IsMonster())) { this._iHealthCurrent = 0U; } this._bUpdated = true; } else if (this.IsPlayer()) { this._eClass = (eClass)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Class"].Value); this._eStance = (int)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["StanceAerial"].Value) == 7 ? eStance.Gliding : (eStance)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Stance"].Value); this._iDP = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Dp"].Value); this._iRank = Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["RankId"].Value); this._zLegion = Game.Process.GetString(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Legion"].Value, 64U, MessageHandlerString.Unicode); this._eStance = this._eStance == (eStance)8 || this._eStance == (eStance)10 ? eStance.Dead : this._eStance; if ((int)this._iRank == 0) { this._bElyos = Game.Player.IsElyos(); } else { this._bElyos = this._iRank >= 901215U && this._iRank <= 901232U; this._iRank = this._iRank >= 901233U ? this._iRank - 901233U : this._iRank - 901215U; } } this.UpdatePosition(); this._iID = unsignedInteger; this._bValid = true; } return(this); }