Allow Wintergrasp honor rewards to be customized. Please update your trinitycore.conf.
--HG-- branch : trunk
This commit is contained in:
@@ -292,6 +292,10 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
|
|||||||
m_wartime = false;
|
m_wartime = false;
|
||||||
m_timer = sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME) * MINUTE * IN_MILISECONDS;
|
m_timer = sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME) * MINUTE * IN_MILISECONDS;
|
||||||
|
|
||||||
|
if(sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR))
|
||||||
|
for(int i = 0; i < WG_REWARD_EVENT_MAX; ++i)
|
||||||
|
m_customHonorReward[i] = sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_0 + i);
|
||||||
|
|
||||||
RegisterZone(ZONE_WINTERGRASP);
|
RegisterZone(ZONE_WINTERGRASP);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -317,8 +321,17 @@ void OPvPWintergrasp::ProcessEvent(GameObject *obj, uint32 eventId)
|
|||||||
state->damageState = DAMAGE_DAMAGED;
|
state->damageState = DAMAGE_DAMAGED;
|
||||||
|
|
||||||
if(state->type == BUILDING_TOWER)
|
if(state->type == BUILDING_TOWER)
|
||||||
|
{
|
||||||
|
if(sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR))
|
||||||
|
{
|
||||||
|
for(PlayerSet::const_iterator itr = m_players[m_defender].begin(); itr != m_players[m_defender].end(); ++itr)
|
||||||
|
if((*itr)->HasAura(SPELL_LIEUTENANT) && ((*itr)->getLevel() > 69))
|
||||||
|
(*itr)->ModifyHonorPoints(m_customHonorReward[DAMAGED_TOWER]);
|
||||||
|
}
|
||||||
|
else
|
||||||
LieutenantCastSpell(m_defender, SPELL_DAMAGED_TOWER);
|
LieutenantCastSpell(m_defender, SPELL_DAMAGED_TOWER);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(eventId == obj->GetGOInfo()->building.destroyedEvent)
|
else if(eventId == obj->GetGOInfo()->building.destroyedEvent)
|
||||||
{
|
{
|
||||||
state->damageState = DAMAGE_DESTROYED;
|
state->damageState = DAMAGE_DESTROYED;
|
||||||
@@ -336,6 +349,13 @@ void OPvPWintergrasp::ProcessEvent(GameObject *obj, uint32 eventId)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
--m_towerCount;
|
--m_towerCount;
|
||||||
|
if(sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR))
|
||||||
|
{
|
||||||
|
for(PlayerSet::const_iterator itr = m_players[m_defender].begin(); itr != m_players[m_defender].end(); ++itr)
|
||||||
|
if((*itr)->HasAura(SPELL_LIEUTENANT) && ((*itr)->getLevel() > 69))
|
||||||
|
(*itr)->ModifyHonorPoints(m_customHonorReward[DESTROYED_TOWER]);
|
||||||
|
}
|
||||||
|
else
|
||||||
LieutenantCastSpell(m_defender, SPELL_DESTROYED_TOWER);
|
LieutenantCastSpell(m_defender, SPELL_DESTROYED_TOWER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -900,6 +920,8 @@ void OPvPWintergrasp::EndBattle()
|
|||||||
for(PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
|
for(PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
|
||||||
{
|
{
|
||||||
if((*itr)->HasAura(SPELL_LIEUTENANT))
|
if((*itr)->HasAura(SPELL_LIEUTENANT))
|
||||||
|
{
|
||||||
|
if(!sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR))
|
||||||
{
|
{
|
||||||
(*itr)->CastSpell(*itr, team == m_defender ? SPELL_VICTORY_REWARD : SPELL_DEFEAT_REWARD, true);
|
(*itr)->CastSpell(*itr, team == m_defender ? SPELL_VICTORY_REWARD : SPELL_DEFEAT_REWARD, true);
|
||||||
for(uint32 i = 0; i < intactNum; ++i)
|
for(uint32 i = 0; i < intactNum; ++i)
|
||||||
@@ -907,6 +929,15 @@ void OPvPWintergrasp::EndBattle()
|
|||||||
for(uint32 i = 0; i < damagedNum; ++i)
|
for(uint32 i = 0; i < damagedNum; ++i)
|
||||||
(*itr)->CastSpell(*itr, SPELL_DAMAGED_BUILDING, true);
|
(*itr)->CastSpell(*itr, SPELL_DAMAGED_BUILDING, true);
|
||||||
}
|
}
|
||||||
|
else if(sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR))
|
||||||
|
{
|
||||||
|
(*itr)->ModifyHonorPoints( team == m_defender ? m_customHonorReward[WIN_BATTLE] : m_customHonorReward[LOSE_BATTLE] );
|
||||||
|
for(uint32 i = 0; i < intactNum; ++i)
|
||||||
|
(*itr)->ModifyHonorPoints(m_customHonorReward[INTACT_BUILDING]);
|
||||||
|
for(uint32 i = 0; i < damagedNum; ++i)
|
||||||
|
(*itr)->ModifyHonorPoints(m_customHonorReward[DAMAGED_BUILDING]);
|
||||||
|
}
|
||||||
|
}
|
||||||
REMOVE_RANK_AURAS(*itr);
|
REMOVE_RANK_AURAS(*itr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,17 @@ enum WintergraspSpell
|
|||||||
SPELL_SHUTDOWN_VEHICLE = 21247,
|
SPELL_SHUTDOWN_VEHICLE = 21247,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum WintergraspRewardEvent
|
||||||
|
{
|
||||||
|
WIN_BATTLE,
|
||||||
|
LOSE_BATTLE,
|
||||||
|
DAMAGED_TOWER,
|
||||||
|
DESTROYED_TOWER,
|
||||||
|
DAMAGED_BUILDING,
|
||||||
|
INTACT_BUILDING,
|
||||||
|
WG_REWARD_EVENT_MAX
|
||||||
|
};
|
||||||
|
|
||||||
#define MAX_VEHICLE_PER_WORKSHOP 4
|
#define MAX_VEHICLE_PER_WORKSHOP 4
|
||||||
|
|
||||||
const uint32 WG_KEEP_CM = 0; //Need data
|
const uint32 WG_KEEP_CM = 0; //Need data
|
||||||
@@ -202,6 +213,7 @@ class OPvPWintergrasp : public OutdoorPvP
|
|||||||
uint32 m_clock[5];
|
uint32 m_clock[5];
|
||||||
uint32 m_workshopCount[2];
|
uint32 m_workshopCount[2];
|
||||||
uint32 m_towerCount;
|
uint32 m_towerCount;
|
||||||
|
uint32 m_customHonorReward[WG_REWARD_EVENT_MAX];
|
||||||
|
|
||||||
SiegeWorkshop *GetWorkshop(uint32 lowguid) const;
|
SiegeWorkshop *GetWorkshop(uint32 lowguid) const;
|
||||||
SiegeWorkshop *GetWorkshopByEngGuid(uint32 lowguid) const;
|
SiegeWorkshop *GetWorkshopByEngGuid(uint32 lowguid) const;
|
||||||
|
|||||||
@@ -1161,6 +1161,14 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.StartTime", 30);
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.StartTime", 30);
|
||||||
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.BattleTime", 30);
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.BattleTime", 30);
|
||||||
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_INTERVAL] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.Interval", 150);
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_INTERVAL] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.Interval", 150);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR] = sConfig.GetBoolDefault("OutdoorPvP.Wintergrasp.CustomHonorRewards", false);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_0] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorBattleWin", 0);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_1] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorBattleLose", 0);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_2] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorDamageTower", 0);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_3] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorDestroyedTower", 0);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_4] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorDamagedBuilding", 0);
|
||||||
|
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_5] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorIntactBuilding", 0);
|
||||||
|
|
||||||
m_configs[CONFIG_NO_RESET_TALENT_COST] = sConfig.GetBoolDefault("NoResetTalentsCost", false);
|
m_configs[CONFIG_NO_RESET_TALENT_COST] = sConfig.GetBoolDefault("NoResetTalentsCost", false);
|
||||||
m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false);
|
m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false);
|
||||||
m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000);
|
m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000);
|
||||||
|
|||||||
@@ -240,6 +240,13 @@ enum WorldConfigs
|
|||||||
CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME,
|
CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME,
|
||||||
CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME,
|
CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME,
|
||||||
CONFIG_OUTDOORPVP_WINTERGRASP_INTERVAL,
|
CONFIG_OUTDOORPVP_WINTERGRASP_INTERVAL,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_0,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_1,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_2,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_3,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_4,
|
||||||
|
CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR_5,
|
||||||
CONFIG_NO_RESET_TALENT_COST,
|
CONFIG_NO_RESET_TALENT_COST,
|
||||||
CONFIG_SHOW_KICK_IN_WORLD,
|
CONFIG_SHOW_KICK_IN_WORLD,
|
||||||
CONFIG_INTERVAL_LOG_UPDATE,
|
CONFIG_INTERVAL_LOG_UPDATE,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
// Format is YYYYMMDDRR where RR is the change in the conf file
|
// Format is YYYYMMDDRR where RR is the change in the conf file
|
||||||
// for that day.
|
// for that day.
|
||||||
#ifndef _TRINITY_CORE_CONFVER
|
#ifndef _TRINITY_CORE_CONFVER
|
||||||
# define _TRINITY_CORE_CONFVER 2009091001
|
# define _TRINITY_CORE_CONFVER 2009091101
|
||||||
#endif //_TRINITY_CORE_CONFVER
|
#endif //_TRINITY_CORE_CONFVER
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
##########################################
|
##########################################
|
||||||
# Trinity Core worldd configuration file #
|
# Trinity Core worldd configuration file #
|
||||||
##########################################
|
##########################################
|
||||||
ConfVersion=2009091001
|
ConfVersion=2009091101
|
||||||
|
|
||||||
###################################################################################################################
|
###################################################################################################################
|
||||||
# CONNECTIONS AND DIRECTORIES
|
# CONNECTIONS AND DIRECTORIES
|
||||||
@@ -1894,11 +1894,35 @@ Ra.Secure = 1
|
|||||||
#
|
#
|
||||||
# OutdoorPvP.Wintergrasp.StartTime = 30
|
# OutdoorPvP.Wintergrasp.StartTime = 30
|
||||||
# The start time of the first battle after server starts (default: 30 minutes)
|
# The start time of the first battle after server starts (default: 30 minutes)
|
||||||
|
#
|
||||||
# OutdoorPvP.Wintergrasp.BattleTime = 30
|
# OutdoorPvP.Wintergrasp.BattleTime = 30
|
||||||
# Time limit of a battle
|
# Time limit of a battle
|
||||||
|
#
|
||||||
# OutdoorPvP.Wintergrasp.Interval
|
# OutdoorPvP.Wintergrasp.Interval
|
||||||
# Interval between battles (default: 150 minutes)
|
# Interval between battles (default: 150 minutes)
|
||||||
#
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorRewards
|
||||||
|
# Defines whether custom honor rewards should be given to player for partaking in the Wintergrasp Battle (1) or not (0).
|
||||||
|
# Default: 0
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorBattleWin
|
||||||
|
# Defines the amount of honor points that should be given to the team winning the Wintergrasp Battle. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorBattleLose
|
||||||
|
# Defines the amount of honor points that should be given to the team losing the Wintergrasp Battle. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorDamageTower
|
||||||
|
# Defines the amount of honor points that should be given for damaging a tower. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorDestroyedTower
|
||||||
|
# Defines the amount of honor points that should be given for destroying a tower. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorDamagedBuilding
|
||||||
|
# Defines the amount of honor points that should be given for damaged buildings after the battle. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
|
# OutdoorPvP.Wintergrasp.CustomHonorIntactBuilding
|
||||||
|
# Defines the amount of honor points that should be given for intact buildings after the battle. Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
|
||||||
|
#
|
||||||
# ForbiddenMaps
|
# ForbiddenMaps
|
||||||
# map ids that users below SEC_GAMEMASTER cannot enter, with delimiter ','
|
# map ids that users below SEC_GAMEMASTER cannot enter, with delimiter ','
|
||||||
# Default: ""
|
# Default: ""
|
||||||
@@ -1948,6 +1972,13 @@ PvPToken.ItemCount = 1
|
|||||||
OutdoorPvP.Wintergrasp.StartTime = 30
|
OutdoorPvP.Wintergrasp.StartTime = 30
|
||||||
OutdoorPvP.Wintergrasp.BattleTime = 30
|
OutdoorPvP.Wintergrasp.BattleTime = 30
|
||||||
OutdoorPvP.Wintergrasp.Interval = 150
|
OutdoorPvP.Wintergrasp.Interval = 150
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorRewards = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorBattleWin = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorBattleLose = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorDamageTower = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorDestroyedTower = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorDamagedBuilding = 0
|
||||||
|
OutdoorPvP.Wintergrasp.CustomHonorIntactBuilding = 0
|
||||||
NoResetTalentsCost = 0
|
NoResetTalentsCost = 0
|
||||||
ShowKickInWorld = 0
|
ShowKickInWorld = 0
|
||||||
RecordUpdateTimeDiffInterval = 60000
|
RecordUpdateTimeDiffInterval = 60000
|
||||||
|
|||||||
Reference in New Issue
Block a user