Core/Scripting: A couple fixes for shattered Halls

This commit is contained in:
Malcrom
2013-07-09 18:27:03 -02:30
parent 17398a4043
commit fb783fb098
2 changed files with 4 additions and 12 deletions

View File

@@ -353,7 +353,7 @@ class npc_fel_orc_convert : public CreatureScript
events.Update(diff);
if (uint32 EVENT_HEMORRHAGE = events.ExecuteEvent())
if (events.ExecuteEvent() == EVENT_HEMORRHAGE)
{
DoCastVictim(SPELL_HEMORRHAGE);
events.ScheduleEvent(EVENT_HEMORRHAGE, 15000);

View File

@@ -408,30 +408,23 @@ class npc_omrogg_heads : public CreatureScript
instance = creature->GetInstanceScript();
}
void Reset() OVERRIDE
{
DeathYell = false;
}
void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SetData(uint32 data, uint32 value)
{
if (data == SETDATA_DATA && value == SETDATA_YELL)
{
events.ScheduleEvent(EVENT_DEATH_YELL, 4000);
DeathYell = true;
}
}
void UpdateAI(uint32 diff) OVERRIDE
{
if (!DeathYell)
return;
events.Update(diff);
if (uint32 EVENT_DEATH_YELL = events.ExecuteEvent())
if (events.ExecuteEvent() == EVENT_DEATH_YELL)
{
Talk(YELL_DIE_R);
me->setDeathState(JUST_DIED);
@@ -441,7 +434,6 @@ class npc_omrogg_heads : public CreatureScript
private:
InstanceScript* instance;
EventMap events;
bool DeathYell;
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE