thanks Kaz, I had no idea, but thats good to know...
And now... Wassup, here is some code, you can lab with... this makes a call to the
Code: Select all
AltAdvManager::CalculateSpellCastingMastery(class EQ_PC *)
u posted... I get 0 as the return value, but I dont have a char to test with so... knock yourself out. At least it doesnt crash you, so Im pretty sure the call is solid...
Code: Select all
else if (!strncmp(szArg,"AAcasttime",10)) {
DWORD CharInfo = NULL;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
DWORD AltAdvManager = NULL;
AltAdvManager = (DWORD)*EQADDR_CLASSALTADVMANAGER;
DWORD AAcasttime = 0;
__asm{
push ecx;
mov ecx, dword ptr [AltAdvManager];
push CharInfo;
call dword ptr [EQADDR_CALCULATESPELLCASTINGMASTERY];
mov [AAcasttime], eax;
pop ecx;
};
DebugSpew("eax = %x",AAcasttime);
sprintf(szTemp,"%x",AAcasttime);
}
eqgame.ini (offsets are for eqgame.exe stamped Aug 06 2003)
Code: Select all
[Function Locations]
CalculateSpellCastingMastery=00462497
[Class Locations]
ClassAltAdvManager=005D93A4
You know the drill with the extern in eqlib.h and the main.cpp inireading and so on to get this to work...
and oh, I looked at GetSpellCastingTime(void) but since it takes no parameters it requires some research, maybe ill look at it someday when Im bored...
And about SpellcastingMastery... as far as I know, it only has the possibility to lower the mana cost by 5 10 or 15% so... well there is little chance of you getting a return value unless you call this during a spellcast, and the check actually goes in... complicated stuff, as I cant even prove it works... maybe SOE screwed the nice folks, that spent money in this AA... I think I will leave this thing for now... Is there any AA that actually ALWAYS lower manacost or castingtime like the focusitems does?