mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(CI): add cppcheck (#15211)
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
@@ -121,13 +121,13 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
struct Wave
|
||||
struct WaveCreature
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 amount;
|
||||
};
|
||||
|
||||
static Wave RingMobs[] = // different amounts based on the type
|
||||
static WaveCreature RingMobs[] = // different amounts based on the type
|
||||
{
|
||||
{NPC_DREDGE_WORM, 3},
|
||||
{NPC_DEEP_STINGER, 3},
|
||||
|
||||
@@ -49,18 +49,18 @@ enum Rinji
|
||||
GO_RINJI_CAGE = 142036
|
||||
};
|
||||
|
||||
struct Location
|
||||
struct LocationXYZ
|
||||
{
|
||||
float posX, posY, posZ;
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
Location AmbushSpawn[] =
|
||||
LocationXYZ AmbushSpawn[] =
|
||||
{
|
||||
{ 191.296204f, -2839.329346f, 107.388f },
|
||||
{ 70.972466f, -2848.674805f, 109.459f }
|
||||
};
|
||||
|
||||
Location AmbushMoveTo[] =
|
||||
LocationXYZ AmbushMoveTo[] =
|
||||
{
|
||||
{ 166.630386f, -2824.780273f, 108.153f },
|
||||
{ 70.886589f, -2874.335449f, 116.675f }
|
||||
@@ -118,12 +118,12 @@ public:
|
||||
if (!_first)
|
||||
spawnId = 1;
|
||||
|
||||
me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
|
||||
me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId].x, AmbushSpawn[spawnId].y, AmbushSpawn[spawnId].z, 0.0f,
|
||||
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
|
||||
me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId].x, AmbushSpawn[spawnId].y, AmbushSpawn[spawnId].z, 0.0f,
|
||||
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->SetWalk(false);
|
||||
summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId].posX, AmbushMoveTo[spawnId].posY, AmbushMoveTo[spawnId].posZ);
|
||||
summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId].x, AmbushMoveTo[spawnId].y, AmbushMoveTo[spawnId].z);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
|
||||
@@ -748,12 +748,11 @@ enum Worldstates
|
||||
WORLD_STATE_FAIL_H = 3878
|
||||
};
|
||||
|
||||
struct Location
|
||||
{
|
||||
struct LocationXYZO {
|
||||
float x, y, z, o;
|
||||
};
|
||||
|
||||
static Location AllianceSpawn[] =
|
||||
static LocationXYZO AllianceSpawn[] =
|
||||
{
|
||||
{ 1603.97f, 718.02f, 65.10f, 0 }, // guardian // sewers
|
||||
{ 1604.78f, 657.22f, 40.80f, 0 }, // wave 1
|
||||
@@ -788,7 +787,7 @@ static Location AllianceSpawn[] =
|
||||
{ 1307.92f, 395.53f, -63.24f, 4.472f },
|
||||
};
|
||||
|
||||
static Location AllianceWP[] =
|
||||
static LocationXYZO AllianceWP[] =
|
||||
{
|
||||
{ 1737.06f, 734.176f, 48.8f, 0 }, // Jaina sewers UNUSED
|
||||
{ 1682.92f, 730.89f, 76.84f, 0 }, // UNUSED
|
||||
@@ -802,12 +801,12 @@ static Location AllianceWP[] =
|
||||
{ 1300.75f, 347.39f, -65.02f, 0 }, // jaina throne room
|
||||
};
|
||||
|
||||
static Location HordeSpawn[] =
|
||||
static LocationXYZO HordeSpawn[] =
|
||||
{
|
||||
{ 1581.94f, 383.22f, -62.22f, 0 } // Khanok
|
||||
};
|
||||
|
||||
static Location ThrallSpawn[] =
|
||||
static LocationXYZO ThrallSpawn[] =
|
||||
{
|
||||
// Vortex
|
||||
{ 1880.0001f, 237.8242f, 59.472f, 3.060f },
|
||||
|
||||
@@ -1078,7 +1078,7 @@ public:
|
||||
|
||||
bool GossipSelect(Player* player, uint32 sender, uint32 action) override
|
||||
{
|
||||
Seconds respawnTimer = 0s;
|
||||
Seconds respawnTimer{};
|
||||
player->PlayerTalkClass->SendCloseGossip();
|
||||
|
||||
Creature* lastSpawn = ObjectAccessor::GetCreature(*me, _creatureGuid);
|
||||
|
||||
@@ -1008,9 +1008,12 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (Aura* aura = target->GetAura(uint32(GetSpellInfo()->Effects[stage].CalcValue())))
|
||||
if (aura->GetOwner() == target) // avoid assert(false) at any cost
|
||||
aura->UpdateOwner(5000, target); // update whole aura so previous periodic ticks before refreshed by new one
|
||||
if (target)
|
||||
{
|
||||
if (Aura* aura = target->GetAura(uint32(GetSpellInfo()->Effects[stage].CalcValue())))
|
||||
if (aura->GetOwner() == target) // avoid assert(false) at any cost
|
||||
aura->UpdateOwner(5000, target); // update whole aura so previous periodic ticks before refreshed by new one
|
||||
}
|
||||
|
||||
GetCaster()->CastSpell(target, uint32(GetSpellInfo()->Effects[stage].CalcValue()), true, nullptr, nullptr, GetCaster()->GetGUID());
|
||||
}
|
||||
|
||||
@@ -870,13 +870,13 @@ static Location SpawnLocation[] =
|
||||
{-4627.1240f, 1378.8752f, 139.9f, 2.544f} //Torloth The Magnificent
|
||||
};
|
||||
|
||||
struct WaveData
|
||||
struct WaveDataCreature
|
||||
{
|
||||
uint8 SpawnCount, UsedSpawnPoint;
|
||||
uint32 CreatureId, SpawnTimer, YellTimer;
|
||||
};
|
||||
|
||||
static WaveData WavesInfo[] =
|
||||
static WaveDataCreature WavesInfo[] =
|
||||
{
|
||||
{9, 0, 22075, 10000, 7000}, //Illidari Soldier
|
||||
{2, 9, 22074, 10000, 7000}, //Illidari Mind Breaker
|
||||
|
||||
Reference in New Issue
Block a user