mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7345] Use in most cases dynamic quest level as expected (player level for quests witl level 0)
Original patch provided by NoFantasy. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
aba675c4ca
commit
64158d61b3
5 changed files with 8 additions and 6 deletions
|
|
@ -151,7 +151,7 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
|
|||
|
||||
data << uint32(questID);
|
||||
data << uint32( qItem.m_qIcon );
|
||||
data << uint32(pQuest && pQuest->GetQuestLevel() ? pQuest->GetQuestLevel() : pSession->GetPlayer()->getLevel());
|
||||
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
|
||||
std::string Title = pQuest->GetTitle();
|
||||
|
||||
int loc_idx = pSession->GetSessionDbLocaleIndex();
|
||||
|
|
@ -400,7 +400,7 @@ void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, const std::string& Titl
|
|||
|
||||
data << uint32(questID);
|
||||
data << uint32(qmi.m_qIcon);
|
||||
data << uint32(pQuest && pQuest->GetQuestLevel() ? pQuest->GetQuestLevel() : pSession->GetPlayer()->getLevel());
|
||||
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
|
||||
data << title;
|
||||
}
|
||||
pSession->SendPacket( &data );
|
||||
|
|
@ -546,7 +546,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
|||
|
||||
data << uint32(pQuest->GetQuestId());
|
||||
data << uint32(pQuest->GetQuestMethod()); // Accepted values: 0, 1 or 2. 0==IsAutoComplete() (skip objectives/details)
|
||||
data << uint32(pQuest->GetQuestLevel()); // may be 0
|
||||
data << uint32(pQuest->GetQuestLevel()); // may be 0, static data, in other cases must be used dynamic level: Player::GetQuestLevel
|
||||
data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log
|
||||
|
||||
data << uint32(pQuest->GetType());
|
||||
|
|
|
|||
|
|
@ -6017,7 +6017,7 @@ void Player::RewardReputation(Quest const *pQuest)
|
|||
{
|
||||
if(pQuest->RewRepFaction[i] && pQuest->RewRepValue[i] )
|
||||
{
|
||||
int32 rep = CalculateReputationGain(pQuest->GetQuestLevel(),pQuest->RewRepValue[i],true);
|
||||
int32 rep = CalculateReputationGain(GetQuestLevel(pQuest),pQuest->RewRepValue[i],true);
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFaction[i]);
|
||||
if(factionEntry)
|
||||
ModifyFactionReputation(factionEntry, rep);
|
||||
|
|
|
|||
|
|
@ -1199,6 +1199,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*** QUEST SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
uint32 GetQuestLevel( Quest const* pQuest ) const { return pQuest && pQuest->GetQuestLevel() ? pQuest->GetQuestLevel() : getLevel(); }
|
||||
|
||||
void PrepareQuestMenu( uint64 guid );
|
||||
void SendPreparedQuest( uint64 guid );
|
||||
bool IsActiveQuest( uint32 quest_id ) const;
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
|||
{
|
||||
if ( pQuest->IsAutoComplete() || (pQuest->IsRepeatable() && pPlayer->getQuestStatusMap()[quest_id].m_rewarded))
|
||||
result2 = DIALOG_STATUS_REWARD_REP;
|
||||
else if (pPlayer->getLevel() <= pQuest->GetQuestLevel() + sWorld.getConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF) )
|
||||
else if (pPlayer->getLevel() <= pPlayer->GetQuestLevel(pQuest) + sWorld.getConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF) )
|
||||
{
|
||||
if (pQuest->HasFlag(QUEST_FLAGS_DAILY))
|
||||
result2 = DIALOG_STATUS_AVAILABLE_REP;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7344"
|
||||
#define REVISION_NR "7345"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue