mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripting: A couple fixes for shattered Halls
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user