Fehler #1336 » LFG_XP_fix.patch
src/server/game/DungeonFinding/LFGMgr.cpp | ||
---|---|---|
1910 | 1910 |
if (!qReward) |
1911 | 1911 |
return; |
1912 | 1912 |
// we give reward without informing client (retail does this) |
1913 |
player->RewardQuest(qReward, 0, NULL, false); |
|
1913 |
player->RewardQuest(qReward, 0, NULL, false, true);
|
|
1914 | 1914 |
} |
1915 | 1915 | |
1916 | 1916 |
// Give rewards |
src/server/game/Entities/Player/Player.cpp | ||
---|---|---|
14938 | 14938 |
} |
14939 | 14939 |
} |
14940 | 14940 | |
14941 |
void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce) |
|
14941 |
void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce, bool lfgreward)
|
|
14942 | 14942 |
{ |
14943 | 14943 |
//this THING should be here to protect code from quest, which cast on player far teleport as a reward |
14944 | 14944 |
//should work fine, cause far teleport will be executed in Player::Update() |
... | ... | |
14996 | 14996 |
if (log_slot < MAX_QUEST_LOG_SIZE) |
14997 | 14997 |
SetQuestSlot(log_slot, 0); |
14998 | 14998 | |
14999 |
bool rewarded = (m_RewardedQuests.find(quest_id) != m_RewardedQuests.end()); |
|
14999 |
bool rewarded = !lfgreward && (m_RewardedQuests.find(quest_id) != m_RewardedQuests.end());
|
|
15000 | 15000 | |
15001 | 15001 |
// Not give XP in case already completed once repeatable quest |
15002 | 15002 |
uint32 XP = rewarded ? 0 : uint32(quest->XPValue(this)*sWorld->getRate(RATE_XP_QUEST)); |
src/server/game/Entities/Player/Player.h | ||
---|---|---|
1410 | 1410 |
void AddQuest(Quest const* quest, Object* questGiver); |
1411 | 1411 |
void CompleteQuest(uint32 quest_id); |
1412 | 1412 |
void IncompleteQuest(uint32 quest_id); |
1413 |
void RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce = true); |
|
1413 |
void RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce = true, bool lfgreward = false);
|
|
1414 | 1414 |
void FailQuest(uint32 quest_id); |
1415 | 1415 |
bool SatisfyQuestSkill(Quest const* qInfo, bool msg) const; |
1416 | 1416 |
bool SatisfyQuestLevel(Quest const* qInfo, bool msg); |