diff options
| author | jackpoz <giacomopoz@gmail.com> | 2015-04-04 20:20:04 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2015-04-04 20:20:04 +0200 |
| commit | d23538ce568773f474ef20b4ca8217e0b218e65e (patch) | |
| tree | f560ae0d2404d899f4ac1ce0519d9f70762103bd /src/server | |
| parent | 5f77145f49ce2358821e02a478de0fe5f9f3c98c (diff) | |
Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1227510, 1227434, 1023036, 1062426, 1062425, 1062424, 1062423, 1062422
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9c4a9bb5000..5f864210e8f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5880,7 +5880,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (dummySpell->SpellIconID == 2218) { // Proc only from Abolish desease on self cast - if (procSpell->Id != 552 || victim != this || !roll_chance_i(triggerAmount)) + if (!procSpell || procSpell->Id != 552 || victim != this || !roll_chance_i(triggerAmount)) return false; triggered_spell_id = 64136; target = this; @@ -14173,6 +14173,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u uint32 Id = i->aura->GetId(); AuraApplication* aurApp = i->aura->GetApplicationOfTarget(GetGUID()); + ASSERT(aurApp); bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 2750476db76..096777163a6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -280,7 +280,7 @@ public: Map::PlayerList const &PlayerList = map->GetPlayers(); for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(float(diff/20000*M_PI*2), i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater()) + if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(diff/20000.f*float(M_PI)*2.f, i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater()) DoCast(i->GetSource(), SPELL_SPOUT, true); // only knock back players in arc, in 100yards, not in water } } |
