[Help][SL 9.2.7] SpellRec::GetCastTime menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Trogg's Avatar Member
    Reputation
    1
    Join Date
    Feb 2024
    Posts
    18
    Thanks G/R
    12/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help][SL 9.2.7] SpellRec::GetCastTime

    Hi, trying to get spell cast time call function from lua GetCastTime (4 arg output)
    Seems it requres to call WowClientDB::GetRow with SpellRec arg wich i cant recognize both (due obfuscation)
    There is a simpler method to get cast time from spellid?

    [Help][SL 9.2.7] SpellRec::GetCastTime
  2. #2
    Trogg's Avatar Member
    Reputation
    1
    Join Date
    Feb 2024
    Posts
    18
    Thanks G/R
    12/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can read addr+18B8, then (100/float)-100 to get % of haste, then do as in formula
    Cast Time = Base Cast Time / ((Spell Haste Percentage / 100) + 1)
    with 0 % haste Base Cast Time = 2300 as expected
    addr+18B8 = 0,823559225
    (100/ 0,823559225)-100 = 21,42417572
    Cast Time = 2300/(1+21,42417572/100) = 1894,1862165107230426912878696707
    Code:
    Dump: value=GetHaste() 
    [1]=21.424049377441 //a little bit different but no affection
    Dump: value=GetSpellInfo(194153) 
    [1]="Starfire", 
    [3]=135753, 
    [4]=1853, 
    [5]=0, 
    [6]=45, 
    [7]=194153
    where is 41ms?

  3. #3
    scizzydo's Avatar Contributor
    Reputation
    137
    Join Date
    Oct 2019
    Posts
    99
    Thanks G/R
    5/57
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I've kind of layed off a bit to give an answer, just due to let you figure out on your own, but are you checking the right table? SpellRec doesn't contain the cast time. It's the SpellCastTimes table that contains the base cast of a spell:
    Wago Tools[ID]=259&page=1
    Which, the index to that is from the SpellMisc table:
    Wago Tools[SpellID]=194153&page=1

    From there, you do the hasted calculation. Starfire base cast time should be 2250 also, not 2300 (per the tables)

    Doing the math from there:
    2250 / ((21.424049377441 / 100) + 1) = 1,853.010183350071

    I feel like you're kind of brute forcing things here without actually reversing the code. Ideally you want to get the index to the SpellMisc -> Get the Index to the SpellCastTimes -> Get the value you want

    Also, looking at the UnitSpellHaste function, you want to read from 0x18AC
    Code:
        if ( v16 )
        {
          v17 = *(float *)(v16 + 0x18AC);
          if ( v17 != 0.0 )
            v17 = (float)(100.0 / v17) - 100.0;
          v18 = v17;
        }
        else
        {
          v18 = 0.0;
        }
    Last edited by scizzydo; 04-09-2024 at 05:58 PM.

  4. Thanks Trogg, hackerlol (2 members gave Thanks to scizzydo for this useful post)
  5. #4
    Trogg's Avatar Member
    Reputation
    1
    Join Date
    Feb 2024
    Posts
    18
    Thanks G/R
    12/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was fooled by the game, the tooltip said 2.3, thanks
    0x18B8 is from GetHaste
    Code:
    v5 = *(float*)(v4 + 6328); //18B8
    if (v5 != 0.0)
       v5 = (float)(100.0 / v5) - 100.0;
    my assumptions were based on trying to study the instructions, because, Ida refuses to decompile these functions (including GetSpellInfo), it is clear that a table was used, but not the one that was in wotlk
    therefore, as you said, I have to resort to brute force or simply look for changeable values in the fields in CE, things like virtual functions (VT) and unit fields in SL are not yet clear to me

  6. #5
    scizzydo's Avatar Contributor
    Reputation
    137
    Join Date
    Oct 2019
    Posts
    99
    Thanks G/R
    5/57
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Trogg View Post
    I was fooled by the game, the tooltip said 2.3, thanks
    0x18B8 is from GetHaste
    Code:
    v5 = *(float*)(v4 + 6328); //18B8
    if (v5 != 0.0)
       v5 = (float)(100.0 / v5) - 100.0;
    my assumptions were based on trying to study the instructions, because, Ida refuses to decompile these functions (including GetSpellInfo), it is clear that a table was used, but not the one that was in wotlk
    therefore, as you said, I have to resort to brute force or simply look for changeable values in the fields in CE, things like virtual functions (VT) and unit fields in SL are not yet clear to me
    That haste is melee haste, which may be the same, but I use spell haste when calculating cast times. UnitSpellHaste - Wowpedia - Your wiki guide to the World of Warcraft

    Also, if you spend some time learning assembly, wows obfuscation techniques aren't that complex at all. You just can patch their areas to unconditionall jumps where they are using the obfuscation, and clean up where it lands (making data then code again) and it'll all turn to pseudocode after. There's only like 3 or 4 techniques they do to obfuscate it, all of which can be easily reversed (just takes some studying)
    Last edited by scizzydo; 04-10-2024 at 08:04 AM.

  7. Thanks Trogg, hackerlol (2 members gave Thanks to scizzydo for this useful post)

Similar Threads

  1. [Help][SL 9.2.7] CGPlayer Auras
    By Trogg in forum WoW Memory Editing
    Replies: 11
    Last Post: 04-07-2024, 05:34 PM
  2. [Help][SL 9.2.7] CGPlayer CalculateThreat
    By Trogg in forum WoW Memory Editing
    Replies: 5
    Last Post: 04-07-2024, 09:22 AM
  3. [Help][SL 9.2.7] Find type of animation
    By Trogg in forum WoW Memory Editing
    Replies: 2
    Last Post: 03-20-2024, 02:42 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 11:22 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search