mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
fix: ahn'kahet - prevent elder nadox eggs to attack player
--HG-- branch : trunk
This commit is contained in:
1
sql/uwom/6144_world_scripts.sql
Normal file
1
sql/uwom/6144_world_scripts.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='mob_nadox_eggs' WHERE `entry` IN ('30172','30173');
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user