fix: ahn'kahet - prevent elder nadox eggs to attack player

--HG--
branch : trunk
This commit is contained in:
WarHead
2009-10-18 08:50:53 +02:00
parent 567e32a14c
commit 1e9619a794
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1 @@
UPDATE `creature_template` SET `ScriptName`='mob_nadox_eggs' WHERE `entry` IN ('30172','30173');

View File

@@ -246,11 +246,30 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
}
};
struct MANGOS_DLL_DECL mob_nadox_eggsAI : public Scripted_NoMovementAI
{
mob_nadox_eggsAI(Creature* c) : Scripted_NoMovementAI(c)
{
c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
c->UpdateAllStats();
}
void Reset() { }
void EnterCombat(Unit* who) { }
void AttackStart(Unit* victim) { }
void MoveInLineOfSight(Unit* who) { }
void UpdateAI(const uint32 diff) { }
};
CreatureAI* GetAI_mob_ahnkahar_nerubian(Creature* pCreature)
{
return new mob_ahnkahar_nerubianAI(pCreature);
}
CreatureAI* GetAI_mob_nadox_eggs(Creature* _Creature)
{
return new mob_nadox_eggsAI(_Creature);
}
void AddSC_boss_elder_nadox()
{
Script *newscript;
@@ -264,4 +283,9 @@ void AddSC_boss_elder_nadox()
newscript->Name = "mob_ahnkahar_nerubian";
newscript->GetAI = &GetAI_mob_ahnkahar_nerubian;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="mob_nadox_eggs";
newscript->GetAI = &GetAI_mob_nadox_eggs;
newscript->RegisterSelf();
}