Core/Items: Fixed crash with auction house bot seller (#21271)

This commit is contained in:
zranger1
2018-01-20 08:01:12 -07:00
committed by Shauren
parent 1a32b1d322
commit 79528cd39f

View File

@@ -319,7 +319,7 @@ bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemId, Player const* owne
if (i < 5)
SetSpellCharges(i, itemProto->Effects[i]->Charges);
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemProto->Effects[i]->SpellID))
if (spellInfo->HasEffect(SPELL_EFFECT_GIVE_ARTIFACT_POWER))
if (owner && spellInfo->HasEffect(SPELL_EFFECT_GIVE_ARTIFACT_POWER))
if (uint32 artifactKnowledgeLevel = owner->GetCurrency(CURRENCY_TYPE_ARTIFACT_KNOWLEDGE))
SetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL, artifactKnowledgeLevel + 1);
}