Compare commits

...

6 Commits

Author SHA1 Message Date
ZhengPeiRu21
f57467aced Merge pull request #83 from AlvinZhu/OnQuestComputeXP
fix OnQuestComputeXP
2023-01-30 10:06:36 -07:00
Alvin Zhu
bb45ca7a04 fix OnQuestComputeXP 2023-01-27 20:57:18 +08:00
ZhengPeiRu21
2a14fbde09 Merge pull request #79 from wobgob/origin-story
Fix starting progression and dungeon teleports
2023-01-19 11:55:33 -07:00
Jarrod Ingram
145cbb0cce Fix starting progression and dungeon teleports 2023-01-13 14:07:12 +11:00
郑佩茹
7f8a8805d7 Change INSERT to REPLACE in player_levelstats 2023-01-04 12:08:52 -07:00
郑佩茹
f2005af9cf Update player_class_stats to new format 2023-01-04 11:58:10 -07:00
4 changed files with 438 additions and 2249 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,7 @@ bool IndividualProgression::isBeforeProgression(Player* player, ProgressionState
void IndividualProgression::UpdateProgressionState(Player* player, ProgressionState newState) const void IndividualProgression::UpdateProgressionState(Player* player, ProgressionState newState) const
{ {
if (progressionLimit && newState >= progressionLimit) if (progressionLimit && newState > progressionLimit)
return; return;
uint8 currentState = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value; uint8 currentState = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
if (newState > currentState) if (newState > currentState)

View File

@@ -9,6 +9,7 @@
#include "GameObjectAI.h" #include "GameObjectAI.h"
#include "MapMgr.h" #include "MapMgr.h"
#include "ObjectAccessor.h" #include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Group.h" #include "Group.h"
#include "Pet.h" #include "Pet.h"
#include "DBCEnums.h" #include "DBCEnums.h"

View File

@@ -113,13 +113,8 @@ public:
uint32 vanillaXpValue = sIndividualProgression->questXpMap[quest->GetQuestId()]; uint32 vanillaXpValue = sIndividualProgression->questXpMap[quest->GetQuestId()];
if (player) if (player)
{ {
vanillaXpValue *= player->GetQuestRate(); uint32 originalXpValue = quest->XPValue(quest->GetQuestLevel() == -1 ? player->GetLevel() : quest->GetQuestLevel());
} xpValue *= vanillaXpValue * 1.0 / originalXpValue;
// If XP was already reduced due to out-leveling the quest or other reasons, use the reduced value
if (vanillaXpValue < xpValue)
{
// Otherwise, return the correct Vanilla/TBC Quest XP
xpValue = vanillaXpValue;
} }
} }
} }
@@ -202,6 +197,19 @@ public:
{ {
return false; return false;
} }
InstanceTemplate const* instanceTemplate = sObjectMgr->GetInstanceTemplate(mapid);
if (instanceTemplate)
{
if (instanceTemplate->Parent == MAP_OUTLANDS && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
{
return false;
}
if (instanceTemplate->Parent == MAP_NORTHREND && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
{
return false;
}
}
return true; return true;
} }