适用于MANGOS 60级版本的魔兽世界私服的单机版支持
----------------------------- src/game/Formulas.h -----------------------------
struct HonorScores
{
@@ -316,8 +317,13 @@ namespace MaNGOS
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsElite())
xp_gain *= 2;
+ float rate_xp_kill = 1.0f;
+ if (pl->GetTeam() == HORDE)
+ rate_xp_kill = ConfigMgCore::GetFloatDefault("Rate.XP.Kill.Horde", 1.0f);
+ else
+ rate_xp_kill = sWorld.getConfig(CONFIG_FLOAT_RATE_XP_KILL);
- return (uint32)(xp_gain * sWorld.getConfig(CONFIG_FLOAT_RATE_XP_KILL));
+ return (uint32)(xp_gain * rate_xp_kill);
}
inline float xp_in_group_rate(uint32 count, bool isRaid)
----------------------------- src/game/Player.cpp -----------------------------
index e43cc0a..6b62a7e 100644
@@ -5503,9 +5503,14 @@ void Player::CheckAreaExploreAndOutdoor()
{
int32 diff = int32(getLevel()) - p->area_level;
uint32 XP = 0;
+ float rate_xp_explore = 1.0f;
+ if (GetTeam() == HORDE)
+ rate_xp_explore = ConfigMgCore::GetFloatDefault("Rate.XP.Explore.Horde", 1.0f);
+ else
+ rate_xp_explore = sWorld.getConfig(CONFIG_FLOAT_RATE_XP_EXPLORE);
if (diff < -5)
{
- XP = uint32(sObjectMgr.GetBaseXP(getLevel() + 5) * sWorld.getConfig(CONFIG_FLOAT_RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(getLevel() + 5) * rate_xp_explore);
}
else if (diff > 5)
{
@@ -5515,11 +5520,11 @@ void Player::CheckAreaExploreAndOutdoor()
else if (exploration_percent < 0)
exploration_percent = 0;
- XP = uint32(sObjectMgr.GetBaseXP(p->area_level) * exploration_percent / 100 * sWorld.getConfig(CONFIG_FLOAT_RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(p->area_level) * exploration_percent / 100 * rate_xp_explore);
}
else
{
- XP = uint32(sObjectMgr.GetBaseXP(p->area_level) * sWorld.getConfig(CONFIG_FLOAT_RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(p->area_level) * rate_xp_explore);
}
GiveXP(XP, NULL);
@@ -12249,7 +12254,12 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
QuestStatusData& q_status = mQuestStatus[quest_id];
// Not give XP in case already completed once repeatable quest
- uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue(this) * sWorld.getConfig(CONFIG_FLOAT_RATE_XP_QUEST));
+ float rate_xp_quest = 1.0f;
+ if (GetTeam() == HORDE)
+ rate_xp_quest = ConfigMgCore::GetFloatDefault("Rate.XP.Quest.Horde", 1.0f);
+ else
+ rate_xp_quest = sWorld.getConfig(CONFIG_FLOAT_RATE_XP_QUEST);
+ uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue(this) * rate_xp_quest);
if (getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
GiveXP(XP , NULL);
|