Make an NPC cast spells without spending mana

Well, as the name of the topic says, I’m searching a way to make a custom creature cast spells without spending mana; a buff, a flag in the database… Which is the best (and maybe only) way to achieve this?

If you’re using SAI to trigger the spell cast, there’s a castFlags field for action type cast (11). Use SMARTCAST_TRIGGERED (2).

Using C++ script D:

If it’s not in an instance, why don’t you use SAI? I mean…do what you want, but just wondering…

It’s because…I don’t know how to use SAI. :confused:

Anyway, if there’s a way to don’t use mana with a C++ script too, I’d be glad to know it…

game/AI/CoreAI/UnitAI.h: void DoCast(Unit* victim, uint32 spellId, bool triggered = false);

Use DoCast and set triggered to true

With DoCast(Unit* victim, uint32 SPELL_CHAOSBOLT, bool triggered = true); and DoCastAOE(uint32 SPELL_CORRUPTION, bool triggered = true); I get errors when trying to compile…

Maybe you should first learn C++ before trying to script in TC.

DoCast(victim, SPELL_CHAOSBOLT, true);
DoCastAOE(SPELL_CORRUPTION, true);
That is the correct syntax.

And yes, follow the advice of Subv… /emoticons/default_wink.png