diff options
| author | megamage <none@none> | 2009-07-12 18:01:47 +0800 |
|---|---|---|
| committer | megamage <none@none> | 2009-07-12 18:01:47 +0800 |
| commit | 721782b259ccd9b0ad0d78112164ff5a95318a2f (patch) | |
| tree | e7b23db8791c1c34fcea2672a4440a1ce646995d /src/game/Player.cpp | |
| parent | 8a0427c70f037d3f5de62996ba3271b197764743 (diff) | |
[8162] Fixed applying random enchantments to quest rewarded items. Author: ApoC
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 61c943961cf..029a2b0f86b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1720,7 +1720,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati m_teleport_dest = WorldLocation(mapid, x, y, z, orientation); SetFallInformation(0, z); - // code for finish transfer called in WorldSession::HandleMovementOpcodes() + // code for finish transfer called in WorldSession::HandleMovementOpcodes() // at client packet MSG_MOVE_TELEPORT_ACK SetSemaphoreTeleportNear(true); // near teleport, triggering send MSG_MOVE_TELEPORT_ACK from client at landing @@ -5706,7 +5706,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type) } - // it create new button (NEW state) if need or return existed + // it create new button (NEW state) if need or return existed ActionButton& ab = m_actionButtons[button]; // set data and update to CHANGED if not NEW @@ -12951,12 +12951,12 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver if (pQuest->GetRewChoiceItemsCount() > 0) { - if (pQuest->RewChoiceItemId[reward]) + if (uint32 itemId = pQuest->RewChoiceItemId[reward]) { ItemPosCountVec dest; - if (CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, pQuest->RewChoiceItemId[reward], pQuest->RewChoiceItemCount[reward] ) == EQUIP_ERR_OK) + if (CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, pQuest->RewChoiceItemCount[reward] ) == EQUIP_ERR_OK) { - Item* item = StoreNewItem( dest, pQuest->RewChoiceItemId[reward], true); + Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); SendNewItem(item, pQuest->RewChoiceItemCount[reward], true, false); } } @@ -12966,12 +12966,12 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver { for (uint32 i=0; i < pQuest->GetRewItemsCount(); ++i) { - if (pQuest->RewItemId[i]) + if (uint32 itemId = pQuest->RewItemId[i]) { ItemPosCountVec dest; - if (CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, pQuest->RewItemId[i], pQuest->RewItemCount[i] ) == EQUIP_ERR_OK) + if (CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, pQuest->RewItemCount[i] ) == EQUIP_ERR_OK) { - Item* item = StoreNewItem( dest, pQuest->RewItemId[i], true); + Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); SendNewItem(item, pQuest->RewItemCount[i], true, false); } } |
