Core/Misc: Refactor scripts to fix static analysis warnings
First batch of fixes targeting 100 issues reported by Coverity
This commit is contained in:
1 parent
681cf8f27c
commit
dd4dbdcd16
45 files changed
+1150
-450
No files matched your search
@@ -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