mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 12:22:39 +01:00
Scripts/ZG: Update scripts to new register model (5/5) (#26695)
(cherry picked from commit 7f853ea735)
This commit is contained in:
@@ -39,72 +39,61 @@ enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_venoxis : public CreatureScript
|
||||
struct boss_venoxis : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_venoxis() : CreatureScript("boss_venoxis") { }
|
||||
boss_venoxis(Creature* creature) : BossAI(creature, DATA_VENOXIS) { }
|
||||
|
||||
struct boss_venoxisAI : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_PLAYER_KILL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
boss_venoxisAI(Creature* creature) : BossAI(creature, DATA_VENOXIS) { }
|
||||
|
||||
void Reset() override
|
||||
switch (eventId)
|
||||
{
|
||||
_Reset();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_PLAYER_KILL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulGurubAI<boss_venoxisAI>(creature);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_venoxis()
|
||||
{
|
||||
new boss_venoxis();
|
||||
RegisterZulGurubCreatureAI(boss_venoxis);
|
||||
}
|
||||
|
||||
@@ -31,56 +31,45 @@ enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_wushoolay : public CreatureScript
|
||||
struct boss_wushoolay : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_wushoolay() : CreatureScript("boss_wushoolay") { }
|
||||
boss_wushoolay(Creature* creature) : BossAI(creature, DATA_HAZZARAH)
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_wushoolayAI : public BossAI
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
boss_wushoolayAI(Creature* creature) : BossAI(creature, DATA_HAZZARAH)
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulGurubAI<boss_wushoolayAI>(creature);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_wushoolay()
|
||||
{
|
||||
new boss_wushoolay();
|
||||
RegisterZulGurubCreatureAI(boss_wushoolay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user