mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-01 14:46:54 +01:00
Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1292769, 1292768, 1292765, 1292763, 1267939
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user