aboutsummaryrefslogtreecommitdiff
path: root/src/game/GossipDef.cpp
diff options
context:
space:
mode:
authorKingPin <none@none>2008-10-22 07:02:05 -0500
committerKingPin <none@none>2008-10-22 07:02:05 -0500
commit14598dd84f489a31cf451aeadd1bfea82f9a1cd7 (patch)
treec3954d0871e76a2cdb244a178acf74e9678d092f /src/game/GossipDef.cpp
parentbde02d68298e31eb972ada39e5730786d629d32a (diff)
[svn] * Implement honor rewards from quests - Source Mangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/GossipDef.cpp')
-rw-r--r--src/game/GossipDef.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp
index 1c6fb1f9398..36388e159ab 100644
--- a/src/game/GossipDef.cpp
+++ b/src/game/GossipDef.cpp
@@ -24,6 +24,7 @@
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
+#include "Formulas.h"
GossipMenu::GossipMenu()
{
@@ -466,8 +467,8 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
data << uint32(pQuest->GetRewOrReqMoney());
}
- data << uint32(0); // Honor points reward, not implemented
- data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
+ // rewarded honor points. Multiply with 10 to satisfy client data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
+ data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
data << uint32(pQuest->GetRewSpellCast()); // casted spell
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
@@ -541,7 +542,8 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(pQuest->GetRewSpellCast()); // casted spell
- data << uint32(0); // Honor points reward, not implemented
+ // rewarded honor points
+ data << uint32(Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
data << uint32(pQuest->GetSrcItemId());
data << uint32(pQuest->GetFlags() & 0xFFFF);
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
@@ -675,11 +677,12 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
}
data << uint32(pQuest->GetRewOrReqMoney());
- data << uint32(0x00); // new 2.3.0. Honor points
+ // rewarded honor points. Multiply with 10 to satisfy client
+ data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
data << uint32(0x08); // unused by client?
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(pQuest->GetRewSpellCast()); // casted spell
- data << uint32(0); // Honor points reward, not implemented
+ data << uint32(0x00); // unk, NOT honor
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
}