[C#][3.3.5][BlackMagic] [Help] How to read SpellCastTime (updated) without LuaDoString? menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Borg333's Avatar Member Authenticator enabled
    Reputation
    2
    Join Date
    Dec 2013
    Posts
    33
    Thanks G/R
    6/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C#][3.3.5][BlackMagic] [Help] How to read SpellCastTime (updated) without LuaDoString?

    Hi, i was learned, how to read GCD and CD of spell. Is exists an adress + spell offset or function, where i can read its current cast time?
    I can read it by LuaDoString -> GetSpellInfo, but execute and read lua result have bad performance (or i do it wrong?)
    Thx!

    [C#][3.3.5][BlackMagic] [Help] How to read SpellCastTime (updated) without LuaDoString?
  2. #2
    Borg333's Avatar Member Authenticator enabled
    Reputation
    2
    Join Date
    Dec 2013
    Posts
    33
    Thanks G/R
    6/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found
    v18 = SpellRec::GetCastTime(&v15, LODWORD(v19), 0, 1);
    v10 = (double)(int)v18;
    FrameScript::PushNumber(a1, v10);

    SpellRec v15; // [esp+14h] [ebp-2BCh] BYREF
    float v19; // [esp+2C8h] [ebp-8h] BYREF
    v19 = 0.0;

    so, as i understand, i need to do injectandexecute asm as
    string[] asm = new string[]
    {
    "PUSH 1",
    "PUSH 0",
    "PUSH 0.0",
    "LEA EAX",
    "PUSH EAX, [EBP+var_2BC]",
    $"CALL {Offsets.SpellRec__GetCastTime}",
    "RET",
    };
    right? and how to understand what is in eax as &v15?
    or i can read it derectly from memory by spellid?
    Last edited by Borg333; 07-29-2022 at 08:32 AM.

  3. #3
    air999's Avatar Contributor
    Reputation
    141
    Join Date
    Nov 2014
    Posts
    104
    Thanks G/R
    12/67
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    First parameter for SpellRec::GetCastTime is pointer for SpellRec structure. It should be filled by ClientDb::GetLocalizedRow(&g_SpellDB, spellId, spellRecPtr) ) before calling GetCastTime.

    Code:
    struct SpellRec
    {
      DWORD m_ID;
      DWORD m_category;
      DWORD m_dispelType;
      DWORD m_mechanic;
      DWORD m_attributes;
      DWORD m_attributesEx;
      DWORD m_attributesExB;
      DWORD m_attributesExC;
      DWORD m_attributesExD;
      DWORD m_attributesExE;
      DWORD m_attributesExF;
      DWORD m_attributesExG;
      DWORD m_shapeshiftMask[2];
      DWORD m_shapeshiftExclude[2];
      DWORD m_targets;
      DWORD m_targetCreatureType;
      DWORD m_requiresSpellFocus;
      DWORD m_facingCasterFlags;
      DWORD m_casterAuraState;
      DWORD m_targetAuraState;
      DWORD m_excludeCasterAuraState;
      DWORD m_excludeTargetAuraState;
      DWORD m_casterAuraSpell;
      DWORD m_targetAuraSpell;
      DWORD m_excludeCasterAuraSpell;
      DWORD m_excludeTargetAuraSpell;
      DWORD m_castingTimeIndex;
      DWORD m_recoveryTime;
      DWORD m_categoryRecoveryTime;
      DWORD m_interruptFlags;
      DWORD m_auraInterruptFlags;
      DWORD m_channelInterruptFlags;
      DWORD m_procTypeMask;
      DWORD m_procChance;
      DWORD m_procCharges;
      DWORD m_maxLevel;
      DWORD m_baseLevel;
      DWORD m_spellLevel;
      DWORD m_durationIndex;
      DWORD m_powerType;
      DWORD m_manaCost;
      DWORD m_manaCostPerLevel;
      DWORD m_manaPerSecond;
      DWORD m_manaPerSecondPerLevel;
      DWORD m_rangeIndex;
      float m_speed;
      DWORD m_modalNextSpell;
      DWORD m_cumulativeAura;
      DWORD m_totem[2];
      DWORD m_reagent[8];
      DWORD m_reagentCount[8];
      DWORD m_equippedItemClass;
      DWORD m_equippedItemSubclass;
      DWORD m_equippedItemInvTypes;
      DWORD m_effect[3];
      DWORD m_effectDieSides[3];
      float m_effectRealPointsPerLevel[3];
      DWORD m_effectBasePoints[3];
      DWORD m_effectMechanic[3];
      DWORD m_implicitTargetA[3];
      DWORD m_implicitTargetB[3];
      DWORD m_effectRadiusIndex[3];
      DWORD m_effectAura[3];
      DWORD m_effectAuraPeriod[3];
      float m_effectAmplitude[3];
      DWORD m_effectChainTargets[3];
      DWORD m_effectItemType[3];
      DWORD m_effectMiscValue[3];
      DWORD m_effectMiscValueB[3];
      DWORD m_effectTriggerSpell[3];
      float m_effectPointsPerCombo[3];
      DWORD m_effectSpellClassMaskA[3];
      DWORD m_effectSpellClassMaskB[3];
      DWORD m_effectSpellClassMaskC[3];
      DWORD m_spellVisualID[2];
      DWORD m_spellIconID;
      DWORD m_activeIconID;
      DWORD m_spellPriority;
      char *m_name_lang;
      char *m_nameSubtext_lang;
      char *m_description_lang;
      char *m_auraDescription_lang;
      DWORD m_manaCostPct;
      DWORD m_startRecoveryCategory;
      DWORD m_startRecoveryTime;
      DWORD m_maxTargetLevel;
      DWORD m_spellClassSet;
      DWORD m_spellClassMask[3];
      DWORD m_maxTargets;
      DWORD m_defenseType;
      DWORD m_preventionType;
      DWORD m_stanceBarOrder;
      float m_effectChainAmplitude[3];
      DWORD m_minFactionID;
      DWORD m_minReputation;
      DWORD m_requiredAuraVision;
      DWORD m_requiredTotemCategoryID[2];
      DWORD m_requiredAreasID;
      DWORD m_schoolMask;
      DWORD m_runeCostID;
      DWORD m_spellMissileID;
      DWORD m_powerDisplayID;
      float m_effectBonusCoefficient[3];
      DWORD m_descriptionVariablesID;
      DWORD m_difficulty;
    };
    Last edited by air999; 07-29-2022 at 09:43 AM.

  4. Thanks Borg333, tomer121233 (2 members gave Thanks to air999 for this useful post)

Similar Threads

  1. Replies: 1
    Last Post: 07-01-2022, 05:13 PM
  2. [HELP] How to switch databases.
    By bluuinator in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 11-23-2007, 09:37 PM
  3. [Help] How to make a server Register?
    By LordAragon in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-11-2007, 02:19 PM
  4. [help] How to spawn
    By kanqaz in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 11-06-2007, 03:58 AM
  5. Plz help: How to change character list layout?????/
    By srpskagarda in forum World of Warcraft General
    Replies: 3
    Last Post: 03-08-2007, 07:09 PM
All times are GMT -5. The time now is 03:48 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search