mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-10 19:20:32 +00:00
refactor(Core/EventMap): Refactor EventMap and related scripts (#23121)
Co-authored-by: Kelno <3866946+kelno@users.noreply.github.com> Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
This commit is contained in:
@@ -161,7 +161,7 @@ public:
|
||||
summon->SetRegeneratingHealth(false);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->m_Events.AddEvent(new RestoreFight(summon), summon->m_Events.CalculateTime(3000));
|
||||
if (events.GetNextEventTime(EVENT_COLOSSUS_HEALTH_2) == 0)
|
||||
if (!events.HasTimeUntilEvent(EVENT_COLOSSUS_HEALTH_2))
|
||||
{
|
||||
summon->SetHealth(summon->GetMaxHealth() / 2);
|
||||
summon->LowerPlayerDamageReq(summon->GetMaxHealth() / 2);
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit*) override
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit*) override
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit*) override
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
||||
|
||||
Reference in New Issue
Block a user