Have this working well enough, but still hoping to find a way to trick the client so that it shows the correct casting times.
To do this I need to be able to call a spell haste value when a spell is cast. At the moment, GetActSpellCastTime performs all of the haste calculations and returns a a modified cast time. I want to split these out into two functions, one to return spell haste as a value, and then the original function will call that and return the modified cast time. Seems simple enough..
Apparently not! After re-writing the two functions the code compiles without any issues, but when it comes to build I get these link errors.
Code:
3>pets.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
3>PlayerCorpse.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
3>beacon.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
3>horse.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
3>mob.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
3>npc.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Mob::GetCastReducer(unsigned short,int)" (?GetCastReducer@Mob@@UAEHGH@Z)
I have no issues with a build using the original code, so clearly I've missed something obvious to a native C++ dev. Hoping someone might be able to outline the high level steps to complete when adding a new function?
Cheers,
-Jsr