*Fix a script bug that causes memory corruption.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-10 17:52:42 -05:00
parent e830ca7206
commit 2a75430028
2 changed files with 3 additions and 2 deletions
@@ -255,7 +255,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
m_creature->InterruptNonMeleeSpells(true);
m_creature->CastSpell(m_creature,SPELL_ETHEREAL_APPRENTICE,true);
if( m_creature->GetOwner() )
if( m_creature->isPet() )
((Pet*)m_creature)->SetDuration(0);
CanEvade = true;
}else Apprentice_Timer -= diff;
@@ -101,6 +101,7 @@ struct TRINITY_DLL_DECL npc_converted_sentryAI : public ScriptedAI
else DoScriptText(SAY_CONVERTED_2, m_creature);
DoCast(m_creature, SPELL_CONVERT_CREDIT);
if(m_creature->isPet())
((Pet*)m_creature)->SetDuration(7500);
Credit = true;
}else Timer -= diff;