mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 22:19:54 -04:00
Core/Misc: Refactor scripts to fix static analysis warnings
First batch of fixes targeting 100 issues reported by Coverity
This commit is contained in:
@@ -54,14 +54,22 @@ public:
|
||||
|
||||
struct guard_genericAI : public GuardAI
|
||||
{
|
||||
guard_genericAI(Creature* creature) : GuardAI(creature) { }
|
||||
guard_genericAI(Creature* creature) : GuardAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
globalCooldown = 0;
|
||||
buffTimer = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY)
|
||||
@@ -263,9 +271,12 @@ public:
|
||||
|
||||
struct guard_shattrath_scryerAI : public GuardAI
|
||||
{
|
||||
guard_shattrath_scryerAI(Creature* creature) : GuardAI(creature) { }
|
||||
guard_shattrath_scryerAI(Creature* creature) : GuardAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
banishTimer = 5000;
|
||||
exileTimer = 8500;
|
||||
@@ -273,6 +284,11 @@ public:
|
||||
canTeleport = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
@@ -328,9 +344,12 @@ public:
|
||||
|
||||
struct guard_shattrath_aldorAI : public GuardAI
|
||||
{
|
||||
guard_shattrath_aldorAI(Creature* creature) : GuardAI(creature) { }
|
||||
guard_shattrath_aldorAI(Creature* creature) : GuardAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
banishTimer = 5000;
|
||||
exileTimer = 8500;
|
||||
@@ -338,6 +357,11 @@ public:
|
||||
canTeleport = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
|
||||
Reference in New Issue
Block a user