mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1292769, 1292768, 1292765, 1292763, 1267939
This commit is contained in:
@@ -1523,7 +1523,7 @@ struct ScalingStatValuesEntry
|
||||
|
||||
uint32 getFeralBonus(uint32 mask) const // removed in 3.2.x?
|
||||
{
|
||||
if (mask & 0x00010000) return 0; // not used?
|
||||
//if (mask & 0x00010000) return 0; // not used?
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -492,6 +492,7 @@ void Object::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* targe
|
||||
|
||||
uint32* flags = NULL;
|
||||
uint32 visibleFlag = GetUpdateFieldData(target, flags);
|
||||
ASSERT(flags);
|
||||
|
||||
for (uint16 index = 0; index < m_valuesCount; ++index)
|
||||
{
|
||||
|
||||
@@ -508,7 +508,7 @@ bool OPvPCapturePoint::HandleCustomSpell(Player* player, uint32 /*spellId*/, Gam
|
||||
{
|
||||
if (!player->IsOutdoorPvPActive())
|
||||
return false;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OutdoorPvP::HandleOpenGo(Player* player, ObjectGuid guid)
|
||||
|
||||
@@ -170,7 +170,7 @@ PoolObject* PoolGroup<T>::RollOne(ActivePoolData& spawns, uint32 triggerFrom)
|
||||
}
|
||||
if (!EqualChanced.empty())
|
||||
{
|
||||
int32 index = irand(0, EqualChanced.size()-1);
|
||||
uint32 index = urand(0, EqualChanced.size()-1);
|
||||
// Triggering object is marked as spawned at this time and can be also rolled (respawn case)
|
||||
// so this need explicit check for this case
|
||||
if (EqualChanced[index].guid == triggerFrom || !spawns.IsActiveObject<T>(EqualChanced[index].guid))
|
||||
|
||||
@@ -361,7 +361,10 @@ public:
|
||||
|
||||
struct npc_demolitionist_legosoAI : public npc_escortAI
|
||||
{
|
||||
npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
@@ -395,11 +398,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
_phase = PHASE_NONE;
|
||||
_moveTimer = 0;
|
||||
_eventStarterGuidLow = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->SetCanDualWield(true);
|
||||
|
||||
_events.Reset();
|
||||
|
||||
Reference in New Issue
Block a user