diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-05-08 23:56:07 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-05-08 23:56:35 +0200 |
| commit | 8fc527f404b65f7335601495b29a68acaf0de9e4 (patch) | |
| tree | 3761067231614fac8da5e35cd18d424875dd54a1 /src/server/game/Spells/SpellEffects.cpp | |
| parent | 0936b01895b47785adeeae27cd270bffbc3b578b (diff) | |
Core/Items: Set and save item context field
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 334f89ec33e..b9cf5d78c7e 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1344,7 +1344,7 @@ void Spell::EffectHealthLeech(SpellEffIndex /*effIndex*/) } } -void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype, std::vector<int32> const& bonusListIDs) +void Spell::DoCreateItem(uint32 i, uint32 itemtype, uint8 context /*= 0*/, std::vector<int32> const& bonusListIDs /*= std::vector<int32>()*/) { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; @@ -1441,7 +1441,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype, std::vector<int32> const if (num_to_add) { // create the new item and store it - Item* pItem = player->StoreNewItem(dest, newitemid, true, Item::GenerateItemRandomPropertyId(newitemid), GuidSet(), bonusListIDs); + Item* pItem = player->StoreNewItem(dest, newitemid, true, Item::GenerateItemRandomPropertyId(newitemid), GuidSet(), context, bonusListIDs); // was it successful? return error if not if (!pItem) @@ -5687,7 +5687,7 @@ void Spell::EffectCreateHeirloomItem(SpellEffIndex effIndex) std::vector<int32> bonusList; bonusList.push_back(collectionMgr->GetHeirloomBonus(m_misc.Raw.Data[0])); - DoCreateItem(effIndex, m_misc.Raw.Data[0], bonusList); + DoCreateItem(effIndex, m_misc.Raw.Data[0], 0, bonusList); ExecuteLogEffectCreateItem(effIndex, m_misc.Raw.Data[0]); } |
