mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[12014] Do some smaller cleanups
* Cleanup mangos.sql file * Remove not really required BattleGroundWinner Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
17b10b5e75
commit
3d3529dc07
5 changed files with 78 additions and 89 deletions
|
|
@ -14902,7 +14902,7 @@ CREATE TABLE `spell_chain` (
|
||||||
|
|
||||||
LOCK TABLES `spell_chain` WRITE;
|
LOCK TABLES `spell_chain` WRITE;
|
||||||
/*!40000 ALTER TABLE `spell_chain` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `spell_chain` DISABLE KEYS */;
|
||||||
INSERT INTO spell_chain VALUES
|
INSERT INTO `spell_chain` VALUES
|
||||||
-- ------------------
|
-- ------------------
|
||||||
-- (0) Not associated with skills
|
-- (0) Not associated with skills
|
||||||
-- ------------------
|
-- ------------------
|
||||||
|
|
@ -17179,6 +17179,7 @@ UNLOCK TABLES;
|
||||||
--
|
--
|
||||||
-- Table structure for table `spell_proc_event`
|
-- Table structure for table `spell_proc_event`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `spell_proc_event`;
|
DROP TABLE IF EXISTS `spell_proc_event`;
|
||||||
CREATE TABLE `spell_proc_event` (
|
CREATE TABLE `spell_proc_event` (
|
||||||
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ BattleGround::BattleGround()
|
||||||
m_InvitedHorde = 0;
|
m_InvitedHorde = 0;
|
||||||
m_ArenaType = ARENA_TYPE_NONE;
|
m_ArenaType = ARENA_TYPE_NONE;
|
||||||
m_IsArena = false;
|
m_IsArena = false;
|
||||||
m_Winner = 2;
|
m_Winner = TEAM_NONE;
|
||||||
m_StartTime = 0;
|
m_StartTime = 0;
|
||||||
m_Events = 0;
|
m_Events = 0;
|
||||||
m_IsRated = false;
|
m_IsRated = false;
|
||||||
|
|
@ -687,21 +687,15 @@ void BattleGround::EndBattleGround(Team winner)
|
||||||
winmsg_id = isBattleGround() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS;
|
winmsg_id = isBattleGround() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS;
|
||||||
|
|
||||||
PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound
|
PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound
|
||||||
|
|
||||||
SetWinner(WINNER_ALLIANCE);
|
|
||||||
}
|
}
|
||||||
else if (winner == HORDE)
|
else if (winner == HORDE)
|
||||||
{
|
{
|
||||||
winmsg_id = isBattleGround() ? LANG_BG_H_WINS : LANG_ARENA_GREEN_WINS;
|
winmsg_id = isBattleGround() ? LANG_BG_H_WINS : LANG_ARENA_GREEN_WINS;
|
||||||
|
|
||||||
PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound
|
PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound
|
||||||
|
}
|
||||||
|
|
||||||
SetWinner(WINNER_HORDE);
|
SetWinner(winner);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetWinner(3);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetStatus(STATUS_WAIT_LEAVE);
|
SetStatus(STATUS_WAIT_LEAVE);
|
||||||
//we must set it this way, because end time is sent in packet!
|
//we must set it this way, because end time is sent in packet!
|
||||||
|
|
@ -1125,7 +1119,7 @@ void BattleGround::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen
|
||||||
// this method is called when no players remains in battleground
|
// this method is called when no players remains in battleground
|
||||||
void BattleGround::Reset()
|
void BattleGround::Reset()
|
||||||
{
|
{
|
||||||
SetWinner(WINNER_NONE);
|
SetWinner(TEAM_NONE);
|
||||||
SetStatus(STATUS_WAIT_QUEUE);
|
SetStatus(STATUS_WAIT_QUEUE);
|
||||||
SetStartTime(0);
|
SetStartTime(0);
|
||||||
SetEndTime(0);
|
SetEndTime(0);
|
||||||
|
|
|
||||||
|
|
@ -201,13 +201,6 @@ enum BattleGroundType
|
||||||
TYPE_ARENA = 4
|
TYPE_ARENA = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BattleGroundWinner
|
|
||||||
{
|
|
||||||
WINNER_HORDE = 0,
|
|
||||||
WINNER_ALLIANCE = 1,
|
|
||||||
WINNER_NONE = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
enum BattleGroundTeamIndex
|
enum BattleGroundTeamIndex
|
||||||
{
|
{
|
||||||
BG_TEAM_ALLIANCE = 0,
|
BG_TEAM_ALLIANCE = 0,
|
||||||
|
|
@ -323,7 +316,7 @@ class BattleGround
|
||||||
|
|
||||||
int32 GetStartDelayTime() const { return m_StartDelayTime; }
|
int32 GetStartDelayTime() const { return m_StartDelayTime; }
|
||||||
ArenaType GetArenaType() const { return m_ArenaType; }
|
ArenaType GetArenaType() const { return m_ArenaType; }
|
||||||
uint8 GetWinner() const { return m_Winner; }
|
Team GetWinner() const { return m_Winner; }
|
||||||
uint32 GetBattlemasterEntry() const;
|
uint32 GetBattlemasterEntry() const;
|
||||||
uint32 GetBonusHonorFromKill(uint32 kills) const;
|
uint32 GetBonusHonorFromKill(uint32 kills) const;
|
||||||
|
|
||||||
|
|
@ -342,7 +335,7 @@ class BattleGround
|
||||||
void SetRated(bool state) { m_IsRated = state; }
|
void SetRated(bool state) { m_IsRated = state; }
|
||||||
void SetArenaType(ArenaType type) { m_ArenaType = type; }
|
void SetArenaType(ArenaType type) { m_ArenaType = type; }
|
||||||
void SetArenaorBGType(bool _isArena) { m_IsArena = _isArena; }
|
void SetArenaorBGType(bool _isArena) { m_IsArena = _isArena; }
|
||||||
void SetWinner(uint8 winner) { m_Winner = winner; }
|
void SetWinner(Team winner) { m_Winner = winner; }
|
||||||
|
|
||||||
void ModifyStartDelayTime(int diff) { m_StartDelayTime -= diff; }
|
void ModifyStartDelayTime(int diff) { m_StartDelayTime -= diff; }
|
||||||
void SetStartDelayTime(int Time) { m_StartDelayTime = Time; }
|
void SetStartDelayTime(int Time) { m_StartDelayTime = Time; }
|
||||||
|
|
@ -580,7 +573,7 @@ class BattleGround
|
||||||
ArenaType m_ArenaType; // 2=2v2, 3=3v3, 5=5v5
|
ArenaType m_ArenaType; // 2=2v2, 3=3v3, 5=5v5
|
||||||
bool m_InBGFreeSlotQueue; // used to make sure that BG is only once inserted into the BattleGroundMgr.BGFreeSlotQueue[bgTypeId] deque
|
bool m_InBGFreeSlotQueue; // used to make sure that BG is only once inserted into the BattleGroundMgr.BGFreeSlotQueue[bgTypeId] deque
|
||||||
bool m_IsArena;
|
bool m_IsArena;
|
||||||
uint8 m_Winner; // 0=alliance, 1=horde, 2=none
|
Team m_Winner;
|
||||||
int32 m_StartDelayTime;
|
int32 m_StartDelayTime;
|
||||||
bool m_IsRated; // is this battle rated?
|
bool m_IsRated; // is this battle rated?
|
||||||
bool m_PrematureCountDown;
|
bool m_PrematureCountDown;
|
||||||
|
|
|
||||||
|
|
@ -1317,11 +1317,12 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Player *plr = sObjectMgr.GetPlayer(itr->first);
|
|
||||||
Team team = bg->GetPlayerTeam(itr->first);
|
Team team = bg->GetPlayerTeam(itr->first);
|
||||||
if (!team && plr)
|
if (!team)
|
||||||
team = plr->GetTeam();
|
if (Player* player = sObjectMgr.GetPlayer(itr->first))
|
||||||
if (( bg->GetWinner()==0 && team == ALLIANCE ) || ( bg->GetWinner()==1 && team==HORDE ))
|
team = player->GetTeam();
|
||||||
|
|
||||||
|
if (bg->GetWinner() == team && team != TEAM_NONE)
|
||||||
*data << uint8(1);
|
*data << uint8(1);
|
||||||
else
|
else
|
||||||
*data << uint8(0);
|
*data << uint8(0);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12013"
|
#define REVISION_NR "12014"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue