aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyreth <32145860+Wyreth@users.noreply.github.com>2017-10-09 21:14:09 +0200
committerShauren <shauren.trinity@gmail.com>2017-10-09 21:14:09 +0200
commitca024f104ca71e707b9c8f917e6e3a4a6025d71d (patch)
tree9c17f5b6c19778daa7c5957da941376270d19779 /src
parent98c363154ad6906fb9cfaeb2ac13b77c8540c73d (diff)
Core/Quests: don't send "Received item" chat message for quest rewards. (#20465)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp8
-rw-r--r--src/server/game/Entities/Player/Player.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index c4e37394ca5..f02da504e5a 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14000,7 +14000,7 @@ void Player::SendItemDurations()
}
}
-void Player::SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast)
+void Player::SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast, bool sendChatMessage)
{
if (!item) // prevent crash
return;
@@ -14010,7 +14010,7 @@ void Player::SendNewItem(Item* item, uint32 count, bool received, bool created,
data << uint64(GetGUID()); // player GUID
data << uint32(received); // 0=looted, 1=from npc
data << uint32(created); // 0=received, 1=created
- data << uint32(1); // bool print error to chat
+ data << uint32(sendChatMessage); // bool print message to chat
data << uint8(item->GetBagSlot()); // bagslot
// item slot, but when added to stack: 0xFFFFFFFF
data << uint32((item->GetCount() == count) ? item->GetSlot() : -1);
@@ -15025,7 +15025,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
if (CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, quest->RewardItemIdCount[i]) == EQUIP_ERR_OK)
{
Item* item = StoreNewItem(dest, itemId, true, GenerateItemRandomPropertyId(itemId));
- SendNewItem(item, quest->RewardItemIdCount[i], true, false);
+ SendNewItem(item, quest->RewardItemIdCount[i], true, false, false, false);
}
else if (quest->IsDFQuest())
SendItemRetrievalMail(itemId, quest->RewardItemIdCount[i]);
@@ -15041,7 +15041,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
if (CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, quest->RewardChoiceItemCount[reward]) == EQUIP_ERR_OK)
{
Item* item = StoreNewItem(dest, itemId, true, GenerateItemRandomPropertyId(itemId));
- SendNewItem(item, quest->RewardChoiceItemCount[reward], true, false);
+ SendNewItem(item, quest->RewardChoiceItemCount[reward], true, false, false, false);
}
}
}
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 6a0520121bd..55db381ada9 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1121,7 +1121,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
bool IsUseEquipedWeapon(bool mainhand) const;
bool IsTwoHandUsed() const;
bool IsUsingTwoHandedWeaponInOneHand() const;
- void SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast = false);
+ void SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast = false, bool sendChatMessage = true);
bool BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot);
bool _StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore);