Core/Misc: Fix static analysis issues

(cherry picked from commit ad56299846)
This commit is contained in:
jackpoz
2017-12-25 15:50:21 +01:00
committed by funjoker
parent 0a528a525b
commit 8244d60859
4 changed files with 3 additions and 6 deletions

View File

@@ -17432,7 +17432,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
// examined item is a source item
if (qInfo->ItemDrop[j] == itemid)
{
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid);
ItemTemplate const* pProto = ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(itemid));
// 'unique' item
if (pProto->GetMaxCount() && GetItemCount(itemid, true) < pProto->GetMaxCount())

View File

@@ -2306,7 +2306,6 @@ public:
charGossipItem = GOSSIP_ITEM_GUARD_MITCHELLS;
break;
default:
charGossipItem = "";
return false;
}

View File

@@ -202,8 +202,7 @@ public:
Submerged = false;
WaitTimer2 = 500;
}
if (!Submerged && WaitTimer2 <= diff) // wait 500ms before emerge anim
else if (WaitTimer2 <= diff) // wait 500ms before emerge anim
{
me->RemoveAllAuras();
me->SetEmoteState(EMOTE_ONESHOT_NONE);

View File

@@ -203,8 +203,7 @@ class boss_omor_the_unscarred : public CreatureScript
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (target)
target = me->GetVictim();
target = me->GetVictim();
DoCast(target, SPELL_SHADOW_BOLT);
Shadowbolt_Timer = 4000 + rand32() % 2500;