aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp59
-rw-r--r--src/server/game/Battlegrounds/BattlegroundScore.h13
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.h3
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.h2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.h3
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.h3
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.h3
-rw-r--r--src/server/game/World/World.cpp1
-rw-r--r--src/server/game/World/World.h1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp113
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp33
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp2
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp6
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h4
-rw-r--r--src/server/worldserver/worldserver.conf.dist8
16 files changed, 258 insertions, 2 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index ed39c3fd6b2..69d43d4f40f 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -748,6 +748,24 @@ void Battleground::EndBattleground(uint32 winner)
int32 winmsg_id = 0;
bool guildAwarded = false;
+ PreparedStatement* stmt;
+ PreparedQueryResult result;
+ uint64 battleground_id = 1;
+
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ {
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PVPSTATS_MAXID);
+ result = CharacterDatabase.Query(stmt);
+
+ if (result)
+ {
+ Field* fields = result->Fetch();
+ battleground_id = fields[0].GetInt64() + 1;
+ }
+
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_BATTLEGROUND);
+ }
+
if (winner == ALLIANCE)
{
winmsg_id = isBattleground() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS;
@@ -755,6 +773,9 @@ void Battleground::EndBattleground(uint32 winner)
PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound
SetWinner(BG_TEAM_ALLIANCE);
+
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ stmt->setUInt8(1, BG_TEAM_ALLIANCE);
}
else if (winner == HORDE)
{
@@ -763,10 +784,24 @@ void Battleground::EndBattleground(uint32 winner)
PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound
SetWinner(BG_TEAM_HORDE);
+
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ stmt->setUInt8(1, BG_TEAM_HORDE);
}
else
{
SetWinner(BG_TEAM_NEUTRAL);
+
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ stmt->setUInt8(1, BG_TEAM_NEUTRAL);
+ }
+
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ {
+ stmt->setUInt64(0, battleground_id);
+ stmt->setUInt8(2, m_BracketId + 1);
+ stmt->setUInt8(3, GetTypeID());
+ CharacterDatabase.Execute(stmt);
}
SetStatus(STATUS_WAIT_LEAVE);
@@ -809,6 +844,30 @@ void Battleground::EndBattleground(uint32 winner)
uint32 winnerKills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST);
uint32 loserKills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST);
+ if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
+ {
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_PLAYER);
+ BattlegroundScoreMap::const_iterator score = PlayerScores.find(player->GetGUIDLow());
+
+ // battleground_id, character_guid, score_killing_blows, score_deaths, score_honorable_kills, score_bonus_honor, score_damage_done, score_healing_done
+
+ stmt->setUInt32(0, battleground_id);
+ stmt->setUInt32(1, player->GetGUIDLow());
+ stmt->setUInt32(2, score->second->GetKillingBlows());
+ stmt->setUInt32(3, score->second->GetDeaths());
+ stmt->setUInt32(4, score->second->GetHonorableKills());
+ stmt->setUInt32(5, score->second->GetBonusHonor());
+ stmt->setUInt32(6, score->second->GetDamageDone());
+ stmt->setUInt32(7, score->second->GetHealingDone());
+ stmt->setUInt32(8, score->second->GetAttr1());
+ stmt->setUInt32(9, score->second->GetAttr2());
+ stmt->setUInt32(10, score->second->GetAttr3());
+ stmt->setUInt32(11, score->second->GetAttr4());
+ stmt->setUInt32(12, score->second->GetAttr5());
+
+ CharacterDatabase.Execute(stmt);
+ }
+
// Reward winner team
if (team == winner)
{
diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h
index 23e06693e56..6cb0aaadb73 100644
--- a/src/server/game/Battlegrounds/BattlegroundScore.h
+++ b/src/server/game/Battlegrounds/BattlegroundScore.h
@@ -159,6 +159,19 @@ struct BattlegroundScore
// For Logging purpose
virtual std::string ToString() const { return ""; }
+ uint32 GetKillingBlows() const { return KillingBlows; }
+ uint32 GetDeaths() const { return Deaths; }
+ uint32 GetHonorableKills() const { return HonorableKills; }
+ uint32 GetBonusHonor() const { return BonusHonor; }
+ uint32 GetDamageDone() const { return DamageDone; }
+ uint32 GetHealingDone() const { return HealingDone; }
+
+ virtual uint32 GetAttr1() const { return 0; }
+ virtual uint32 GetAttr2() const { return 0; }
+ virtual uint32 GetAttr3() const { return 0; }
+ virtual uint32 GetAttr4() const { return 0; }
+ virtual uint32 GetAttr5() const { return 0; }
+
ObjectGuid PlayerGuid;
uint8 TeamId;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index 91bb7104d66..d99c206e0c8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -267,6 +267,9 @@ struct BattlegroundABScore final : public BattlegroundScore
content << uint32(BasesDefended);
}
+ uint32 GetAttr1() const final override { return BasesAssaulted; }
+ uint32 GetAttr2() const final override { return BasesDefended; }
+
uint32 BasesAssaulted;
uint32 BasesDefended;
};
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index a93929672c7..a4f1dddcd2c 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1568,6 +1568,12 @@ struct BattlegroundAVScore final : public BattlegroundScore
content << uint32(MinesCaptured);
}
+ uint32 GetAttr1() const final override { return GraveyardsAssaulted; }
+ uint32 GetAttr2() const final override { return GraveyardsDefended; }
+ uint32 GetAttr3() const final override { return TowersAssaulted; }
+ uint32 GetAttr4() const final override { return TowersDefended; }
+ uint32 GetAttr5() const final override { return MinesCaptured; }
+
uint32 GraveyardsAssaulted;
uint32 GraveyardsDefended;
uint32 TowersAssaulted;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index 9867d878b41..e1eaa6dd5fe 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -349,6 +349,8 @@ struct BattlegroundEYScore final : public BattlegroundScore
content << uint32(FlagCaptures);
}
+ uint32 GetAttr1() const final override { return FlagCaptures; }
+
uint32 FlagCaptures;
};
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index a0f03f5727d..8a7995cf2c1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -878,6 +878,9 @@ struct BattlegroundICScore final : public BattlegroundScore
content << uint32(BasesDefended);
}
+ uint32 GetAttr1() const final override { return BasesAssaulted; }
+ uint32 GetAttr2() const final override { return BasesDefended; }
+
uint32 BasesAssaulted;
uint32 BasesDefended;
};
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index 7019d785503..6f5363aeaa8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
@@ -538,6 +538,9 @@ struct BattlegroundSAScore final : public BattlegroundScore
content << uint32(GatesDestroyed);
}
+ uint32 GetAttr1() const final override { return DemolishersDestroyed; }
+ uint32 GetAttr2() const final override { return GatesDestroyed; }
+
uint32 DemolishersDestroyed;
uint32 GatesDestroyed;
};
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 2fdb6dd120e..5691b42d4e9 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -177,6 +177,9 @@ struct BattlegroundWGScore final : public BattlegroundScore
content << uint32(FlagReturns);
}
+ uint32 GetAttr1() const final override { return FlagCaptures; }
+ uint32 GetAttr2() const final override { return FlagReturns; }
+
uint32 FlagCaptures;
uint32 FlagReturns;
};
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index f66c693098b..5cd9e052e2f 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1055,6 +1055,7 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfigMgr->GetBoolDefault("Battleground.CastDeserter", true);
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
+ m_bool_configs[CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE] = sConfigMgr->GetBoolDefault("Battleground.StoreStatistics.Enable", false);
m_int_configs[CONFIG_BATTLEGROUND_INVITATION_TYPE] = sConfigMgr->GetIntDefault ("Battleground.InvitationType", 0);
m_int_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfigMgr->GetIntDefault ("Battleground.PrematureFinishTimer", 5 * MINUTE * IN_MILLISECONDS);
m_int_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfigMgr->GetIntDefault ("Battleground.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 51a5f726051..74f10f91d51 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -129,6 +129,7 @@ enum WorldBoolConfigs
CONFIG_BATTLEGROUND_CAST_DESERTER,
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE,
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY,
+ CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE,
CONFIG_BG_XP_FOR_KILL,
CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE,
CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY,
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 0189b6040f7..1f0a58c4cf2 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -26,6 +26,7 @@
#include "Player.h"
#include "SpellInfo.h"
#include "CreatureTextMgr.h"
+#include "MoveSplineInit.h"
/*######
##Quest 12848
@@ -322,6 +323,117 @@ public:
};
+ /*######
+## npc_eye_of_acherus
+######*/
+
+enum EyeOfAcherus
+{
+ SPELL_EYE_VISUAL = 51892,
+ SPELL_EYE_FLIGHT_BOOST = 51923,
+ SPELL_EYE_FLIGHT = 51890,
+
+ EVENT_MOVE_START = 1,
+
+ TALK_MOVE_START = 0,
+ TALK_CONTROL = 1,
+
+ POINT_EYE_FALL = 1,
+ POINT_EYE_MOVE_END = 3
+};
+
+Position const EyeOFAcherusFallPoint = { 2361.21f, -5660.45f, 496.7444f, 0.0f };
+
+class npc_eye_of_acherus : public CreatureScript
+{
+ public:
+ npc_eye_of_acherus() : CreatureScript("npc_eye_of_acherus") { }
+
+ struct npc_eye_of_acherusAI : public ScriptedAI
+ {
+ npc_eye_of_acherusAI(Creature* creature) : ScriptedAI(creature)
+ {
+ me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
+ if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
+ owner->SendAutoRepeatCancel(me);
+
+ me->SetReactState(REACT_PASSIVE);
+
+ me->GetMotionMaster()->MovePoint(POINT_EYE_FALL, EyeOFAcherusFallPoint, false);
+
+ Movement::MoveSplineInit init(me);
+ init.MoveTo(EyeOFAcherusFallPoint.GetPositionX(), EyeOFAcherusFallPoint.GetPositionY(), EyeOFAcherusFallPoint.GetPositionZ(), false);
+ init.SetFall();
+ init.Launch();
+ }
+
+ void OnCharmed(bool /*apply*/) override { }
+
+ void UpdateAI(uint32 diff) override
+ {
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_MOVE_START:
+ {
+ DoCast(me, SPELL_EYE_FLIGHT_BOOST);
+
+ me->SetControlled(false, UNIT_STATE_ROOT);
+ if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
+ {
+ for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
+ me->SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true);
+ Talk(TALK_MOVE_START, owner);
+ }
+ me->GetMotionMaster()->MovePath(me->GetEntry() * 100, false);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+
+ void MovementInform(uint32 movementType, uint32 pointId) override
+ {
+ if (movementType == WAYPOINT_MOTION_TYPE && pointId == POINT_EYE_MOVE_END - 1)
+ {
+ me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
+ me->RemoveAllAuras();
+
+ if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
+ {
+ owner->RemoveAura(SPELL_EYE_FLIGHT_BOOST);
+ for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
+ me->SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true);
+
+ TalkToMap(TALK_CONTROL, owner);
+ }
+ me->SetDisableGravity(false);
+ DoCast(me, SPELL_EYE_FLIGHT);
+ }
+
+ if (movementType == POINT_MOTION_TYPE && pointId == POINT_EYE_FALL)
+ {
+ me->SetDisableGravity(true);
+ me->SetControlled(true, UNIT_STATE_ROOT);
+ _events.ScheduleEvent(EVENT_MOVE_START, 5000);
+ }
+ }
+
+ private:
+ EventMap _events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return new npc_eye_of_acherusAI(creature);
+ }
+};
+
/*######
## npc_death_knight_initiate
######*/
@@ -1081,6 +1193,7 @@ void AddSC_the_scarlet_enclave_c1()
new npc_unworthy_initiate();
new npc_unworthy_initiate_anchor();
new go_acherus_soul_prison();
+ new npc_eye_of_acherus();
new npc_death_knight_initiate();
new npc_salanar_the_horseman();
new npc_dark_rider_of_acherus();
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 173e03fef7c..f17aac51519 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2026,7 +2026,6 @@ class spell_q12308_escape_from_silverbrook_summon_worgen : public SpellScriptLoa
}
};
-
enum DeathComesFromOnHigh
{
SPELL_FORGE_CREDIT = 51974,
@@ -2097,6 +2096,37 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader
}
};
+// 52694 - Recall Eye of Acherus
+class spell_q12641_recall_eye_of_acherus : public SpellScriptLoader
+{
+ public:
+ spell_q12641_recall_eye_of_acherus() : SpellScriptLoader("spell_q12641_recall_eye_of_acherus") { }
+
+ class spell_q12641_recall_eye_of_acherus_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12641_recall_eye_of_acherus_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->GetCharmerOrOwner()->ToPlayer())
+ {
+ player->StopCastingCharm();
+ player->StopCastingBindSight();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12641_recall_eye_of_acherus_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_q12641_recall_eye_of_acherus_SpellScript();
+ }
+};
+
// 51769 - Emblazon Runeblade
class spell_q12619_emblazon_runeblade : public SpellScriptLoader
{
@@ -2364,6 +2394,7 @@ void AddSC_quest_spell_scripts()
new spell_q12308_escape_from_silverbrook_summon_worgen();
new spell_q12308_escape_from_silverbrook();
new spell_q12641_death_comes_from_on_high();
+ new spell_q12641_recall_eye_of_acherus();
new spell_q12619_emblazon_runeblade();
new spell_q12619_emblazon_runeblade_effect();
new spell_q12919_gymers_grab();
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index a8b9e5f8e8e..b9f34bafedf 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -291,7 +291,7 @@ class spell_sha_earth_shield : public SpellScriptLoader
amount = GetUnitOwner()->SpellHealingBonusTaken(caster, GetSpellInfo(), amount, HEAL);
//! WORKAROUND
- // If target is affected by healing reduction, modifier is guaranteed to be negative
+ // If target is affected by healing reduction, modifier is guaranteed to be negative
// value (e.g. -50). To revert the effect, multiply amount with reciprocal of relative value:
// (100 / ((-1) * modifier)) * 100 = (-1) * 100 * 100 / modifier = -10000 / modifier
if (int32 modifier = GetUnitOwner()->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT))
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index f2e9ed88e2e..adde80c7a7f 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -632,4 +632,10 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_UPD_CHAR_PET_SLOT_BY_ID, "UPDATE character_pet SET slot = ? WHERE owner = ? AND id = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_CHAR_PET_BY_ID, "DELETE FROM character_pet WHERE id = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_CHAR_PET_BY_SLOT, "DELETE FROM character_pet WHERE owner = ? AND (slot = ? OR slot > ?)", CONNECTION_ASYNC);
+
+ // PvPstats
+ PrepareStatement(CHAR_SEL_PVPSTATS_MAXID, "SELECT MAX(id) FROM pvpstats_battlegrounds", CONNECTION_SYNCH);
+ PrepareStatement(CHAR_INS_PVPSTATS_BATTLEGROUND, "INSERT INTO pvpstats_battlegrounds (id, winner_faction, bracket_id, type, date) VALUES (?, ?, ?, ?, NOW())", CONNECTION_ASYNC);
+ PrepareStatement(CHAR_INS_PVPSTATS_PLAYER, "INSERT INTO pvpstats_players (battleground_id, character_guid, score_killing_blows, score_deaths, score_honorable_kills, score_bonus_honor, score_damage_done, score_healing_done, attr_1, attr_2, attr_3, attr_4, attr_5) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
+
}
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 5accf57f132..e2a046ac6e1 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -561,6 +561,10 @@ enum CharacterDatabaseStatements
CHAR_DEL_ITEMCONTAINER_MONEY,
CHAR_INS_ITEMCONTAINER_MONEY,
+ CHAR_SEL_PVPSTATS_MAXID,
+ CHAR_INS_PVPSTATS_BATTLEGROUND,
+ CHAR_INS_PVPSTATS_PLAYER,
+
MAX_CHARACTERDATABASE_STATEMENTS
};
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index a6cdd2037b5..66141d1b297 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2028,6 +2028,14 @@ Battleground.QueueAnnouncer.Enable = 0
Battleground.QueueAnnouncer.PlayerOnly = 0
#
+# Battleground.StoreStatistics.Enable
+# Description: Store Battleground scores in the database.
+# Default: 0 - (Disabled)
+# 1 - (Enabled)
+
+Battleground.StoreStatistics.Enable = 0
+
+#
# Battleground.InvitationType
# Description: Set Battleground invitation type.
# Default: 0 - (Normal, Invite as much players to battlegrounds as queued,