mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Misc: Fix static analysis issues
Fix some static analysis issues reported by Coverity
(cherry picked from commit c899944981)
Conflicts:
src/server/game/Entities/Player/Player.cpp
src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
This commit is contained in:
@@ -1808,7 +1808,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side
|
||||
|
||||
// get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.)
|
||||
Player* reference = GetFirstMember()->GetSource();
|
||||
Player* reference = ASSERT_NOTNULL(GetFirstMember())->GetSource();
|
||||
// no reference found, can't join this way
|
||||
if (!reference)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
@@ -1259,7 +1259,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(triggerSpell);
|
||||
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(triggerSpell);
|
||||
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster);
|
||||
|
||||
int32 damage = spell->Effects[EFFECT_0].CalcValue(caster);
|
||||
|
||||
Reference in New Issue
Block a user