mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed.
This commit is contained in:
@@ -36,7 +36,9 @@ GmTicket::GmTicket() : _id(0), _playerGuid(0), _posX(0), _posY(0), _posZ(0), _ma
|
||||
_closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
|
||||
_needResponse(false), _needMoreHelp(false) { }
|
||||
|
||||
GmTicket::GmTicket(Player* player) : _createTime(time(NULL)), _lastModifiedTime(time(NULL)), _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needResponse(false), _needMoreHelp(false)
|
||||
GmTicket::GmTicket(Player* player) : _posX(0), _posY(0), _posZ(0), _mapId(0), _createTime(time(NULL)), _lastModifiedTime(time(NULL)),
|
||||
_closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
|
||||
_needResponse(false), _needMoreHelp(false)
|
||||
{
|
||||
_id = sTicketMgr->GenerateTicketId();
|
||||
_playerName = player->GetName();
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
{
|
||||
boss_gluttonAI(Creature* creature) : BossAI(creature, DATA_GLUTTON)
|
||||
{
|
||||
hp50 = false;
|
||||
hp15 = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,8 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
eventInProgress = false;
|
||||
channeling = false;
|
||||
eventProgress = 0;
|
||||
spawnerCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -294,6 +294,8 @@ class npc_snobold_vassal : public CreatureScript
|
||||
{
|
||||
npc_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_targetGUID = 0;
|
||||
_targetDied = false;
|
||||
_instance = creature->GetInstanceScript();
|
||||
_instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,10 @@ enum TrashEvents
|
||||
|
||||
struct npc_gauntlet_trash : public ScriptedAI
|
||||
{
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
InternalWaveId = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -219,7 +219,10 @@ public:
|
||||
|
||||
struct npc_slad_ran_constrictorAI : public ScriptedAI
|
||||
{
|
||||
npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiGripOfSladRanTimer = 1 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
uint32 uiGripOfSladRanTimer;
|
||||
|
||||
@@ -270,7 +273,10 @@ public:
|
||||
|
||||
struct npc_slad_ran_viperAI : public ScriptedAI
|
||||
{
|
||||
npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiVenomousBiteTimer = 2 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
uint32 uiVenomousBiteTimer;
|
||||
|
||||
|
||||
@@ -654,6 +654,7 @@ class npc_torturer_lecraft : public CreatureScript
|
||||
{
|
||||
npc_torturer_lecraftAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_textCounter = 1;
|
||||
_playerGUID = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -454,6 +454,9 @@ public:
|
||||
{
|
||||
npc_brann_bronzebeard_keystoneAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
memset(&objectGUID, 0, sizeof(objectGUID));
|
||||
playerGUID = 0;
|
||||
voiceGUID = 0;
|
||||
objectCounter = 0;
|
||||
}
|
||||
|
||||
@@ -640,6 +643,7 @@ public:
|
||||
{
|
||||
npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature)
|
||||
{
|
||||
playerGUID = 0;
|
||||
pathEnd = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -453,7 +453,11 @@ public:
|
||||
|
||||
struct npc_alchemist_finklesteinAI : public ScriptedAI
|
||||
{
|
||||
npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_playerGUID = 0;
|
||||
_getingredienttry = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -61,7 +61,11 @@ public:
|
||||
|
||||
struct npc_stolen_soulAI : public ScriptedAI
|
||||
{
|
||||
npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
myClass = CLASS_NONE;
|
||||
Class_Timer = 1000;
|
||||
}
|
||||
|
||||
uint8 myClass;
|
||||
uint32 Class_Timer;
|
||||
|
||||
@@ -115,6 +115,7 @@ public:
|
||||
{
|
||||
npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
hp30 = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user