public SpellCollection() { _castSpell = Manager.Memory.RegisterDelegate <CastSpellDelegate>((IntPtr)Pointers.Spell.CastSpell); _getSpellCooldown = Manager.Memory.RegisterDelegate <GetSpellCooldownDelegate>((IntPtr)Pointers.Spell.GetSpellCooldown); KnownSpells = new List <WoWSpell>(); Update = true; }
internal static bool IsSpellReady(int spellId) { if (GetSpellCooldownFunction == null) { GetSpellCooldownFunction = Memory.Reader.RegisterDelegate <GetSpellCooldownDelegate>(new IntPtr(0x006E13E0)); } int CdDuration = 0; int CdStartedAt = 0; bool third = false; GetSpellCooldownFunction(new IntPtr(0x00CECAEC), spellId, 0, ref CdDuration, ref CdStartedAt, ref third); return(CdDuration == 0 || CdStartedAt == 0); }
internal static bool IsSpellReady(int spellId) { if (GetSpellCooldownFunction == null) { GetSpellCooldownFunction = Memory.Reader.RegisterDelegate <GetSpellCooldownDelegate>(funcs.GetSpellCooldown); } var CdDuration = 0; var CdStartedAt = 0; var third = false; GetSpellCooldownFunction(funcs.GetSpellCooldownPtr1, spellId, 0, ref CdDuration, ref CdStartedAt, ref third); return(CdDuration == 0 || CdStartedAt == 0); }
internal static bool IsSpellReady(int spellId) { if (!ObjectManager.Instance.IsIngame) { return(false); } if (GetSpellCooldownFunction == null) { GetSpellCooldownFunction = Memory.Reader.RegisterDelegate <GetSpellCooldownDelegate>(funcs.GetSpellCooldown); } var CdDuration = 0; var CdStartedAt = 0; var third = false; MainThread.Instance.Invoke( () => GetSpellCooldownFunction(funcs.GetSpellCooldownPtr1, spellId, 0, ref CdDuration, ref CdStartedAt, ref third)); return(CdDuration == 0 || CdStartedAt == 0); }
public static void Initialize() { #region WowObject Functions _getObjectFunctionLocation = GeneralHelper.Memory.CreateFunction <GetObjectLocationDelegate>( Offsets.UncataloguedFunctions.CGObject__GetObjectLocation); #endregion #region ObjectManager Functions _enumVisibleObjects = GeneralHelper.Memory.CreateFunction <EnumVisibleObjectsDelegate>( Offsets.ObjectManagerOffsets.EnumVisibleObjects); _getActivePlayer = GeneralHelper.Memory.CreateFunction <GetActivePlayerObejctDeledate>( Offsets.ObjectManagerOffsets.GetActivePlayerObject); #endregion #region UncataloguedFunctions _setTarget = GeneralHelper.Memory.CreateFunction <SetUITargetDelegate>( Offsets.UncataloguedFunctions.CGGameUI__Target); _GetObjectIsOutdoors = GeneralHelper.Memory.CreateFunction <GetObjectIsOutdoorsDelegate>( Offsets.UncataloguedFunctions.CGObject__IsOutdoors); _TrackingStop = GeneralHelper.Memory.CreateFunction <TrackingStopDelegate>( Offsets.UncataloguedFunctions.CGUnit_C__TrackingStopInternal); _TrackingStart = GeneralHelper.Memory.CreateFunction <TrackingStartDelegate>( Offsets.UncataloguedFunctions.CGUnit_C__InitializeTrackingStateWrapper); _getSpellCooldown = GeneralHelper.Memory.CreateFunction <GetSpellCooldownDelegate>( Offsets.UncataloguedFunctions.CGUnit_C__InitializeTrackingStateWrapper); _unitReaction = GeneralHelper.Memory.CreateFunction <UnitReactionDelegate>( Offsets.UncataloguedFunctions.CGUnit_C__UnitReaction); _unitThreatInfo = GeneralHelper.Memory.CreateFunction <UnitThreatInfoDelegate>( Offsets.UncataloguedFunctions.CGUnit_C__CalculateThreat); _SetActiveMover = GeneralHelper.Memory.CreateFunction <SetActiveMover>( Offsets.UncataloguedFunctions.CGUnit_C__SetActiveMover); Packet_SendJam = GeneralHelper.Memory.CreateFunction <Packet_SendJamDelegate>(Offsets.Packet.SendJam); _ClientConnection = GeneralHelper.Memory.CreateFunction <ClientConnectionDelegate>(Offsets.Packet.ClientConection); #endregion #region Lua Functions _doString = GeneralHelper.Memory.CreateFunction <DoStringDelegate>( Offsets.LuaFunctions.ExecuteBuffer); _GetLocalizedText = GeneralHelper.Memory.CreateFunction <GetLocalizedTextDelegate>( Offsets.LuaFunctions.GetLocalizedText); #endregion }
public static void Initialize() { castSpell = Helper.Magic.RegisterDelegate<CastSpellDelegate>(Offsets.CastSpell); getSpellCooldown = Helper.Magic.RegisterDelegate<GetSpellCooldownDelegate>(Offsets.GetSpellCooldown); }