void SpellHit(Unit *caster, const SpellEntry *spell) { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && me->GetEntry() == ENTRY_FOREST_FROG) { //increase or decrease chance of mojo? if (rand()%99 == 50) DoCast(caster, SPELL_PUSH_MOJO, true); else DoSpawnRandom(); } }
void SpellHit(Unit *caster, const SpellEntry *spell) { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == NPC_FOREST_FROG) { //increase or decrease chance of mojo? if (!urand(0, 49)) DoCastSpellIfCan(caster, SPELL_PUSH_MOJO, CAST_TRIGGERED); else DoSpawnRandom(); } }