Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:ProjectSkyfire/SkyFire_548
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyFire committed Oct 29, 2023
2 parents 2f9de76 + e33423f commit a4dfcfd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/server/game/AI/CreatureAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ class CreatureAI : public UnitAI
//virtual void AttackStart(Unit*) { }

// Called at World update tick
//virtual void UpdateAI(const uint32 /*diff*/) { }
virtual void UpdateAI(const uint32 /*diff*/) { }

virtual void ExecuteEvent(uint32 /*eventId*/) { }

/// == State checks =================================

Expand Down
24 changes: 12 additions & 12 deletions src/server/game/AI/ScriptedAI/ScriptedCreature.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ struct ScriptedAI : public CreatureAI
//Called at World update tick
void UpdateAI(uint32 diff) OVERRIDE;

void ExecuteEvent(uint32 /*eventId*/) OVERRIDE { }

//Called at creature death
void JustDied(Unit* /*killer*/) OVERRIDE { }

Expand Down Expand Up @@ -384,31 +386,30 @@ class BossAI : public ScriptedAI
return _boundary;
}

void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
void JustSummoned(Creature* summon) OVERRIDE;
void SummonedCreatureDespawn(Creature* summon) OVERRIDE;

virtual void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) OVERRIDE;

// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
// note: You must re-schedule the event within this method if the event
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/)
{ }
void ExecuteEvent(uint32 /*eventId*/) OVERRIDE { }

void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
_JustReachedHome();
}
Expand Down Expand Up @@ -453,14 +454,13 @@ class WorldBossAI : public ScriptedAI
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);

virtual void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) OVERRIDE;

// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
// note: You must re-schedule the event within this method if the event
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/)
{ }
void ExecuteEvent(uint32 /*eventId*/) OVERRIDE { }

void Reset()
{
Expand Down

0 comments on commit a4dfcfd

Please sign in to comment.