I see the signature as something like
Code:
Spell_C_CastSpell(unitPTR, spellID, 0LL, targetGUID, &ptrToSpellId, 0LL);
I recommend referencing Script_Stuck
Code:
__int64 __fastcall Script_Stuck(__int64 a1, __int64 a2, double a3, __m128 zero)
{
unsigned int stuckSpellID; // ebx
__int64 unitPTR; // rax
__int128 targetGUID; // [rsp+0h] [rbp-20h] BYREF
stuckSpellID = CGSpellBook::m_stuckSpell;
targetGUID = 0LL;
unitPTR = ((__int64 (__fastcall *)(__int64, __int64, double, double))ClntObjMgrGetActivePlayer)(
a1,
a2,
0.0,
*(double *)zero.i64);
Spell_C_CastSpell(
unitPTR,
stuckSpellID,
0LL,
&targetGUID,
(unsigned int *)&unkown_always_0_maybe,
0LL,
(__m128)0LL,
zero);
return 0LL;
}
the "ptrToSpellId may be the spell override ID, it comes up in Script_CastSpellByName()
Code:
spellBookSpellID_or_override = CGSpellBook::FindSpellByName(v13, v67);
if ( spellBookSpellID_or_override
|| v13
&& *v13
&& (v17 = CGSpellBook::FindSpellByName(v13, &v46),
(spellBookSpellID_or_override = CGSpellBook::GetOverrideSpellByName(v17, 0LL, 1LL, 0LL)) != 0) )
Something to note is that there's an item pointer and I believe an item amount that are passed to this method, though I believe those are generally ruled out in modern wow and only really matter in TBC (Create healthstone for example will require a soul stone item pointer and count 1 to be passed) I haven't looked at how the function is handled in the most recent update of TBC though, which syncs the client up with retail (for the most part)