mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Misc: Fix a few coverity issues
CID 1360566 CID 1360567 CID 1361723
This commit is contained in:
@@ -333,7 +333,7 @@ bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const* owne
|
||||
continue;
|
||||
|
||||
if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(artifactAppearance->PlayerConditionID))
|
||||
if (!sConditionMgr->IsPlayerMeetingCondition(owner, playerCondition))
|
||||
if (!owner || !sConditionMgr->IsPlayerMeetingCondition(owner, playerCondition))
|
||||
continue;
|
||||
|
||||
SetModifier(ITEM_MODIFIER_ARTIFACT_APPEARANCE_ID, artifactAppearance->ID);
|
||||
|
||||
@@ -975,7 +975,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* lootedObject)
|
||||
if (i->freeforall)
|
||||
continue;
|
||||
|
||||
item = sObjectMgr->GetItemTemplate(i->itemid);
|
||||
item = ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(i->itemid));
|
||||
|
||||
//roll for over-threshold item if it's one-player loot
|
||||
if (item->GetQuality() >= uint32(m_lootThreshold))
|
||||
|
||||
@@ -229,7 +229,7 @@ uint32 Quest::XPValue(uint32 playerLevel) const
|
||||
{
|
||||
uint32 questLevel = uint32(Level == -1 ? playerLevel : Level);
|
||||
QuestXPEntry const* questXp = sQuestXPStore.LookupEntry(questLevel);
|
||||
if (!questXp || RewardXPDifficulty > 10)
|
||||
if (!questXp || RewardXPDifficulty >= 10)
|
||||
return 0;
|
||||
|
||||
float multiplier = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user