Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1267938, 1267937, 1267933, 1267932, 1267929
This commit is contained in:
1 parent
2dc97e3f3d
commit
76986880c9
4 files changed
+7
-3
No files matched your search
@@ -5484,7 +5484,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (RandomSpells.empty()) // shouldn't happen
|
||||
return false;
|
||||
|
||||
uint8 rand_spell = irand(0, (RandomSpells.size() - 1));
|
||||
uint8 rand_spell = urand(0, (RandomSpells.size() - 1));
|
||||
CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster);
|
||||
for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr)
|
||||
{
|
||||
@@ -5530,7 +5530,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (RandomSpells.empty()) // shouldn't happen
|
||||
return false;
|
||||
|
||||
uint8 rand_spell = irand(0, (RandomSpells.size() - 1));
|
||||
uint8 rand_spell = urand(0, (RandomSpells.size() - 1));
|
||||
CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster);
|
||||
for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user