mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
BREAKING CHANGE(Core/Config): Individual XP rate per bg (#10793)
This commit is contained in:
13
doc/changelog/pendings/changes_1646261203127755100.md
Normal file
13
doc/changelog/pendings/changes_1646261203127755100.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
### Changed
|
||||||
|
Removed Rate.XP.BattlegroundKill, added one rate config for each bg.
|
||||||
|
|
||||||
|
### How to upgrade
|
||||||
|
|
||||||
|
Delete Rate.XP.BattlegroundKill, and then set all the battlegroundkill rate for each bg.
|
||||||
|
Rate.XP.BattlegroundKillAV = 1
|
||||||
|
Rate.XP.BattlegroundKillWSG = 1
|
||||||
|
Rate.XP.BattlegroundKillAB = 1
|
||||||
|
Rate.XP.BattlegroundKillEOTS = 1
|
||||||
|
Rate.XP.BattlegroundKillSOTA = 1
|
||||||
|
Rate.XP.BattlegroundKillIC = 1
|
||||||
|
|
||||||
@@ -54,6 +54,16 @@ enum BattlegroundDesertionType
|
|||||||
BG_DESERTION_TYPE_INVITE_LOGOUT = 4, // player is invited to join and logs out
|
BG_DESERTION_TYPE_INVITE_LOGOUT = 4, // player is invited to join and logs out
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum BattlegroundMaps
|
||||||
|
{
|
||||||
|
MAP_BG_ALTERAC_VALLEY = 30,
|
||||||
|
MAP_BG_WARSONG_GULCH = 489,
|
||||||
|
MAP_BG_ARATHI_BASIN = 529,
|
||||||
|
MAP_BG_EYE_OF_THE_STORM = 566,
|
||||||
|
MAP_BG_STRAND_OF_THE_ANCIENTS = 607,
|
||||||
|
MAP_BG_ISLE_OF_CONQUEST = 628
|
||||||
|
};
|
||||||
|
|
||||||
enum BattlegroundBroadcastTexts
|
enum BattlegroundBroadcastTexts
|
||||||
{
|
{
|
||||||
BG_TEXT_ALLIANCE_WINS = 10633,
|
BG_TEXT_ALLIANCE_WINS = 10633,
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Formulas.h"
|
#include "Formulas.h"
|
||||||
|
#include "Battleground.h"
|
||||||
#include "Creature.h"
|
#include "Creature.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
@@ -93,7 +94,34 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
|||||||
xpMod *= creature->GetCreatureTemplate()->ModExperience;
|
xpMod *= creature->GetCreatureTemplate()->ModExperience;
|
||||||
}
|
}
|
||||||
|
|
||||||
xpMod *= isBattleGround ? sWorld->getRate(RATE_XP_BG_KILL) : sWorld->getRate(RATE_XP_KILL);
|
if (isBattleGround)
|
||||||
|
{
|
||||||
|
switch (player->GetMapId())
|
||||||
|
{
|
||||||
|
case MAP_BG_ALTERAC_VALLEY:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AV);
|
||||||
|
break;
|
||||||
|
case MAP_BG_WARSONG_GULCH:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_WSG);
|
||||||
|
break;
|
||||||
|
case MAP_BG_ARATHI_BASIN:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AB);
|
||||||
|
break;
|
||||||
|
case MAP_BG_EYE_OF_THE_STORM:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_EOTS);
|
||||||
|
break;
|
||||||
|
case MAP_BG_STRAND_OF_THE_ANCIENTS:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_SOTA);
|
||||||
|
break;
|
||||||
|
case MAP_BG_ISLE_OF_CONQUEST:
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_IC);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xpMod *= sWorld->getRate(RATE_XP_KILL);
|
||||||
|
}
|
||||||
|
|
||||||
// if players dealt less than 50% of the damage and were credited anyway (due to CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), scale XP gained appropriately (linear scaling)
|
// if players dealt less than 50% of the damage and were credited anyway (due to CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), scale XP gained appropriately (linear scaling)
|
||||||
if (creature && creature->m_PlayerDamageReq)
|
if (creature && creature->m_PlayerDamageReq)
|
||||||
|
|||||||
@@ -440,7 +440,12 @@ enum Rates
|
|||||||
RATE_DROP_MONEY,
|
RATE_DROP_MONEY,
|
||||||
RATE_REWARD_BONUS_MONEY,
|
RATE_REWARD_BONUS_MONEY,
|
||||||
RATE_XP_KILL,
|
RATE_XP_KILL,
|
||||||
RATE_XP_BG_KILL,
|
RATE_XP_BG_KILL_AV,
|
||||||
|
RATE_XP_BG_KILL_WSG,
|
||||||
|
RATE_XP_BG_KILL_AB,
|
||||||
|
RATE_XP_BG_KILL_EOTS,
|
||||||
|
RATE_XP_BG_KILL_SOTA,
|
||||||
|
RATE_XP_BG_KILL_IC,
|
||||||
RATE_XP_QUEST,
|
RATE_XP_QUEST,
|
||||||
RATE_XP_QUEST_DF,
|
RATE_XP_QUEST_DF,
|
||||||
RATE_XP_EXPLORE,
|
RATE_XP_EXPLORE,
|
||||||
|
|||||||
@@ -505,7 +505,12 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
rate_values[RATE_DROP_MONEY] = sConfigMgr->GetOption<float>("Rate.Drop.Money", 1.0f);
|
rate_values[RATE_DROP_MONEY] = sConfigMgr->GetOption<float>("Rate.Drop.Money", 1.0f);
|
||||||
rate_values[RATE_REWARD_BONUS_MONEY] = sConfigMgr->GetOption<float>("Rate.RewardBonusMoney", 1.0f);
|
rate_values[RATE_REWARD_BONUS_MONEY] = sConfigMgr->GetOption<float>("Rate.RewardBonusMoney", 1.0f);
|
||||||
rate_values[RATE_XP_KILL] = sConfigMgr->GetOption<float>("Rate.XP.Kill", 1.0f);
|
rate_values[RATE_XP_KILL] = sConfigMgr->GetOption<float>("Rate.XP.Kill", 1.0f);
|
||||||
rate_values[RATE_XP_BG_KILL] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKill", 1.0f);
|
rate_values[RATE_XP_BG_KILL_AV] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillAV", 1.0f);
|
||||||
|
rate_values[RATE_XP_BG_KILL_WSG] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillWSG", 1.0f);
|
||||||
|
rate_values[RATE_XP_BG_KILL_AB] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillAB", 1.0f);
|
||||||
|
rate_values[RATE_XP_BG_KILL_EOTS] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillEOTS", 1.0f);
|
||||||
|
rate_values[RATE_XP_BG_KILL_SOTA] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillSOTA", 1.0f);
|
||||||
|
rate_values[RATE_XP_BG_KILL_IC] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillIC", 1.0f);
|
||||||
rate_values[RATE_XP_QUEST] = sConfigMgr->GetOption<float>("Rate.XP.Quest", 1.0f);
|
rate_values[RATE_XP_QUEST] = sConfigMgr->GetOption<float>("Rate.XP.Quest", 1.0f);
|
||||||
rate_values[RATE_XP_QUEST_DF] = sConfigMgr->GetOption<float>("Rate.XP.Quest.DF", 1.0f);
|
rate_values[RATE_XP_QUEST_DF] = sConfigMgr->GetOption<float>("Rate.XP.Quest.DF", 1.0f);
|
||||||
rate_values[RATE_XP_EXPLORE] = sConfigMgr->GetOption<float>("Rate.XP.Explore", 1.0f);
|
rate_values[RATE_XP_EXPLORE] = sConfigMgr->GetOption<float>("Rate.XP.Explore", 1.0f);
|
||||||
|
|||||||
@@ -2291,12 +2291,17 @@ Rate.XP.Explore = 1
|
|||||||
Rate.XP.Pet = 1
|
Rate.XP.Pet = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rate.XP.BattlegroundKill
|
# Rate.XP.BattlegroundKill...
|
||||||
# Description: Experience rate for honorable kills in battlegrounds. Not affected by Rate.XP.Kill
|
# Description: Experience rate for honorable kills in battlegrounds. Not affected by Rate.XP.Kill. Defined for each battleground.
|
||||||
# Only works if Battleground.GiveXPForKills = 1
|
# Only works if Battleground.GiveXPForKills = 1
|
||||||
# Default: 1
|
# Default: 1
|
||||||
|
|
||||||
Rate.XP.BattlegroundKill = 1
|
Rate.XP.BattlegroundKillAV = 1
|
||||||
|
Rate.XP.BattlegroundKillWSG = 1
|
||||||
|
Rate.XP.BattlegroundKillAB = 1
|
||||||
|
Rate.XP.BattlegroundKillEOTS = 1
|
||||||
|
Rate.XP.BattlegroundKillSOTA = 1
|
||||||
|
Rate.XP.BattlegroundKillIC = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rate.RepairCost
|
# Rate.RepairCost
|
||||||
|
|||||||
Reference in New Issue
Block a user