Core/Quests: Use honor multiplier as base for calculating honor rewards, not the amount of kills (fix by Nay)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-10-24 21:32:26 +02:00
parent d03aeab9ad
commit 88ae092744
4 changed files with 12 additions and 9 deletions
@@ -501,7 +501,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
} }
// rewarded honor points. Multiply with 10 to satisfy client // rewarded honor points. Multiply with 10 to satisfy client
data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()); data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorMultiplier());
data << float(0); // new 3.3.0, honor multiplier? data << float(0); // new 3.3.0, honor multiplier?
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0) data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
data << int32(pQuest->GetRewSpellCast()); // casted spell data << int32(pQuest->GetRewSpellCast()); // casted spell
@@ -588,7 +588,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
data << int32(pQuest->GetRewSpellCast()); // casted spell data << int32(pQuest->GetRewSpellCast()); // casted spell
// rewarded honor points // rewarded honor points
data << Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()); data << Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorMultiplier());
data << float(0); // new reward honor (multipled by ~62 at client side) data << float(0); // new reward honor (multipled by ~62 at client side)
data << uint32(pQuest->GetSrcItemId()); // source item id data << uint32(pQuest->GetSrcItemId()); // source item id
data << uint32(pQuest->GetFlags() & 0xFFFF); // quest flags data << uint32(pQuest->GetFlags() & 0xFFFF); // quest flags
@@ -744,7 +744,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld.getRate(RATE_XP_QUEST)); data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld.getRate(RATE_XP_QUEST));
// rewarded honor points. Multiply with 10 to satisfy client // rewarded honor points. Multiply with 10 to satisfy client
data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()); data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorMultiplier());
data << float(0); // unk, honor multiplier? data << float(0); // unk, honor multiplier?
data << uint32(0x08); // unused by client? data << uint32(0x08); // unused by client?
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0) data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
+5 -3
View File
@@ -14538,8 +14538,10 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
} }
// honor reward // honor reward
if (pQuest->GetRewHonorableKills()) if (pQuest->GetRewHonorAddition())
RewardHonor(NULL, 0, Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills())); RewardHonor(NULL, 0, pQuest->GetRewHonorAddition());
if (pQuest->GetRewHonorMultiplier())
RewardHonor(NULL, 0, Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorMultiplier()));
// title reward // title reward
if (pQuest->GetCharTitleId()) if (pQuest->GetCharTitleId())
@@ -15715,7 +15717,7 @@ void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver
data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY))); data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY)));
} }
data << 10 * Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills()); data << 10 * Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorMultiplier());
data << uint32(pQuest->GetBonusTalents()); // bonus talents data << uint32(pQuest->GetBonusTalents()); // bonus talents
data << uint32(pQuest->GetRewArenaPoints()); data << uint32(pQuest->GetRewArenaPoints());
GetSession()->SendPacket(&data); GetSession()->SendPacket(&data);
+1 -1
View File
@@ -109,7 +109,7 @@ Quest::Quest(Field * questRecord)
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepValue[i] = questRecord[107+i].GetInt32(); RewRepValue[i] = questRecord[107+i].GetInt32();
RewHonorableKills = questRecord[112].GetUInt32(); RewHonorAddition = questRecord[112].GetUInt32();
RewHonorMultiplier = questRecord[113].GetFloat(); RewHonorMultiplier = questRecord[113].GetFloat();
RewOrReqMoney = questRecord[114].GetInt32(); RewOrReqMoney = questRecord[114].GetInt32();
RewMoneyMaxLevel = questRecord[115].GetUInt32(); RewMoneyMaxLevel = questRecord[115].GetUInt32();
+3 -2
View File
@@ -226,7 +226,8 @@ class Quest
std::string GetEndText() const { return EndText; } std::string GetEndText() const { return EndText; }
std::string GetCompletedText() const { return CompletedText; } std::string GetCompletedText() const { return CompletedText; }
int32 GetRewOrReqMoney() const; int32 GetRewOrReqMoney() const;
uint32 GetRewHonorableKills() const { return RewHonorableKills; } uint32 GetRewHonorAddition() const { return RewHonorAddition; }
uint32 GetRewHonorMultiplier() const { return RewHonorMultiplier; }
uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; } uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; }
// use in XP calculation at client // use in XP calculation at client
uint32 GetRewSpell() const { return RewSpell; } uint32 GetRewSpell() const { return RewSpell; }
@@ -332,7 +333,7 @@ class Quest
std::string RequestItemsText; std::string RequestItemsText;
std::string EndText; std::string EndText;
std::string CompletedText; std::string CompletedText;
uint32 RewHonorableKills; uint32 RewHonorAddition;
float RewHonorMultiplier; float RewHonorMultiplier;
int32 RewOrReqMoney; int32 RewOrReqMoney;
uint32 RewMoneyMaxLevel; uint32 RewMoneyMaxLevel;