Core/Misc: Fix some warnings and logic mistakes found by static code analysis
This commit is contained in:
1 parent
0f21634eab
commit
7c971be3c5
12 files changed
+55
-54
No files matched your search
@@ -1724,8 +1724,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
pItem->SetUInt32Value(ITEM_FIELD_CREATOR, player->GetGUIDLow());
|
||||
|
||||
// send info to the client
|
||||
if (pItem)
|
||||
player->SendNewItem(pItem, num_to_add, true, bgType == 0);
|
||||
player->SendNewItem(pItem, num_to_add, true, bgType == 0);
|
||||
|
||||
// we succeeded in creating at least one item, so a levelup is possible
|
||||
if (bgType == 0)
|
||||
@@ -2079,7 +2078,8 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
||||
return;
|
||||
}
|
||||
}else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
}
|
||||
else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
{
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return;
|
||||
@@ -2116,7 +2116,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
|
||||
if (gameObjTarget)
|
||||
SendLoot(guid, LOOT_SKINNING);
|
||||
else
|
||||
else if (itemTarget)
|
||||
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_UNLOCKED);
|
||||
|
||||
// not allow use skill grow at item base open
|
||||
|
||||
Reference in new issue
Block a user