mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Core/Battlegrounds): Fixed setting proper winner team at the end … (#12868)
fix(Core/Battlegrounds): Fixed setting proper winner team at the end of battleground. Fixes #11717 Fixes #12688
This commit is contained in:
@@ -99,6 +99,7 @@ enum BattlegroundMarks
|
||||
{
|
||||
SPELL_WS_MARK_LOSER = 24950,
|
||||
SPELL_WS_MARK_WINNER = 24951,
|
||||
SPELL_WS_MARK_TIE = 66126,
|
||||
SPELL_AB_MARK_LOSER = 24952,
|
||||
SPELL_AB_MARK_WINNER = 24953,
|
||||
SPELL_AV_MARK_LOSER = 24954,
|
||||
|
||||
@@ -1668,6 +1668,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
||||
case SPELL_AV_MARK_LOSER:
|
||||
case SPELL_WS_MARK_WINNER:
|
||||
case SPELL_WS_MARK_LOSER:
|
||||
case SPELL_WS_MARK_TIE:
|
||||
case SPELL_AB_MARK_WINNER:
|
||||
case SPELL_AB_MARK_LOSER:
|
||||
SelfCast = true;
|
||||
|
||||
@@ -3418,12 +3418,32 @@ uint8 constexpr PVP_TEAMS_COUNT = 2;
|
||||
|
||||
inline PvPTeamId GetPvPTeamId(TeamId teamId)
|
||||
{
|
||||
return teamId == TEAM_ALLIANCE ? PVP_TEAM_ALLIANCE : PVP_TEAM_HORDE;
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
{
|
||||
return PVP_TEAM_ALLIANCE;
|
||||
}
|
||||
|
||||
if (teamId == TEAM_HORDE)
|
||||
{
|
||||
return PVP_TEAM_HORDE;
|
||||
}
|
||||
|
||||
return PVP_TEAM_NEUTRAL;
|
||||
}
|
||||
|
||||
inline TeamId GetTeamId(PvPTeamId teamId)
|
||||
{
|
||||
return teamId == PVP_TEAM_ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE;
|
||||
if (teamId == PVP_TEAM_ALLIANCE)
|
||||
{
|
||||
return TEAM_ALLIANCE;
|
||||
}
|
||||
|
||||
if (teamId == PVP_TEAM_HORDE)
|
||||
{
|
||||
return TEAM_HORDE;
|
||||
}
|
||||
|
||||
return TEAM_NEUTRAL;
|
||||
}
|
||||
|
||||
// indexes of BattlemasterList.dbc
|
||||
|
||||
Reference in New Issue
Block a user