nopch fix 2 for d507a7e

This commit is contained in:
Treeston
2018-01-01 15:27:51 +01:00
parent 4c0c4ab271
commit 100ecf69f1

View File

@@ -30,20 +30,18 @@ public:
{
trigger_periodicAI(Creature* creature) : NullCreatureAI(creature)
{
spell = me->m_spells[0] ? sSpellMgr->GetSpellInfo(me->m_spells[0]) : nullptr;
interval = me->GetAttackTime(BASE_ATTACK);
timer = interval;
}
uint32 timer, interval;
SpellInfo const* spell;
void UpdateAI(uint32 diff) override
{
if (timer <= diff)
{
if (spell)
me->CastSpell(me, spell->Id, true);
if (uint32 spell = me->m_spells[0])
me->CastSpell(me, spell, TRIGGERED_FULL_MASK);
timer = interval;
}
else