dismount when entering a battleground
use 80 for max level honor bonus calculation fixed SOTA second round timer by Gyullo --HG-- branch : trunk
This commit is contained in:
@@ -856,7 +856,8 @@ void BattleGround::EndBattleGround(uint32 winner)
|
|||||||
uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const
|
uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const
|
||||||
{
|
{
|
||||||
//variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill)
|
//variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill)
|
||||||
return Trinity::Honor::hk_honor_at_level(GetMaxLevel(), kills);
|
uint32 maxLevel = (GetMaxLevel()<80)?GetMaxLevel():80;
|
||||||
|
return Trinity::Honor::hk_honor_at_level(maxLevel, kills);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 BattleGround::GetBattlemasterEntry() const
|
uint32 BattleGround::GetBattlemasterEntry() const
|
||||||
@@ -1080,6 +1081,8 @@ void BattleGround::AddPlayer(Player *plr)
|
|||||||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&status, this, queueSlot, STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType());
|
sBattleGroundMgr.BuildBattleGroundStatusPacket(&status, this, queueSlot, STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType());
|
||||||
plr->GetSession()->SendPacket(&status);
|
plr->GetSession()->SendPacket(&status);
|
||||||
|
|
||||||
|
plr->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||||
|
|
||||||
// add arena specific auras
|
// add arena specific auras
|
||||||
if (isArena())
|
if (isArena())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ void BattleGroundSA::Update(uint32 diff)
|
|||||||
|
|
||||||
if (status == BG_SA_WARMUP )
|
if (status == BG_SA_WARMUP )
|
||||||
{
|
{
|
||||||
|
BG_SA_ENDROUNDTIME = BG_SA_ROUNDLENGTH;
|
||||||
if (TotalTime >= BG_SA_WARMUPLENGTH)
|
if (TotalTime >= BG_SA_WARMUPLENGTH)
|
||||||
{
|
{
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
@@ -266,6 +267,11 @@ void BattleGroundSA::Update(uint32 diff)
|
|||||||
}
|
}
|
||||||
else if (status == BG_SA_SECOND_WARMUP)
|
else if (status == BG_SA_SECOND_WARMUP)
|
||||||
{
|
{
|
||||||
|
if (RoundScores[0].time<BG_SA_ROUNDLENGTH)
|
||||||
|
BG_SA_ENDROUNDTIME = RoundScores[0].time;
|
||||||
|
else
|
||||||
|
BG_SA_ENDROUNDTIME = BG_SA_ROUNDLENGTH;
|
||||||
|
|
||||||
if (TotalTime >= 60000)
|
if (TotalTime >= 60000)
|
||||||
{
|
{
|
||||||
SendWarningToAll(LANG_BG_SA_HAS_BEGUN);
|
SendWarningToAll(LANG_BG_SA_HAS_BEGUN);
|
||||||
@@ -291,11 +297,11 @@ void BattleGroundSA::Update(uint32 diff)
|
|||||||
{
|
{
|
||||||
if (TotalTime >= BG_SA_ROUNDLENGTH)
|
if (TotalTime >= BG_SA_ROUNDLENGTH)
|
||||||
{
|
{
|
||||||
|
RoundScores[0].winner = attackers;
|
||||||
RoundScores[0].time = BG_SA_ROUNDLENGTH;
|
RoundScores[0].time = BG_SA_ROUNDLENGTH;
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
status = BG_SA_SECOND_WARMUP;
|
status = BG_SA_SECOND_WARMUP;
|
||||||
attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||||
RoundScores[0].winner = attackers;
|
|
||||||
status = BG_SA_SECOND_WARMUP;
|
status = BG_SA_SECOND_WARMUP;
|
||||||
ToggleTimer();
|
ToggleTimer();
|
||||||
ResetObjs();
|
ResetObjs();
|
||||||
@@ -304,7 +310,7 @@ void BattleGroundSA::Update(uint32 diff)
|
|||||||
}
|
}
|
||||||
else if (status == BG_SA_ROUND_TWO)
|
else if (status == BG_SA_ROUND_TWO)
|
||||||
{
|
{
|
||||||
if (TotalTime >= BG_SA_ROUNDLENGTH)
|
if (TotalTime >= BG_SA_ENDROUNDTIME)
|
||||||
{
|
{
|
||||||
RoundScores[1].time = BG_SA_ROUNDLENGTH;
|
RoundScores[1].time = BG_SA_ROUNDLENGTH;
|
||||||
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||||
@@ -627,7 +633,7 @@ WorldSafeLocsEntry const* BattleGroundSA::GetClosestGraveYard(Player* player)
|
|||||||
|
|
||||||
void BattleGroundSA::SendTime()
|
void BattleGroundSA::SendTime()
|
||||||
{
|
{
|
||||||
uint32 end_of_round = (BG_SA_ROUNDLENGTH - TotalTime);
|
uint32 end_of_round = (BG_SA_ENDROUNDTIME - TotalTime);
|
||||||
UpdateWorldState(BG_SA_TIMER_MINS, end_of_round/60000);
|
UpdateWorldState(BG_SA_TIMER_MINS, end_of_round/60000);
|
||||||
UpdateWorldState(BG_SA_TIMER_SEC_TENS, (end_of_round%60000)/10000);
|
UpdateWorldState(BG_SA_TIMER_SEC_TENS, (end_of_round%60000)/10000);
|
||||||
UpdateWorldState(BG_SA_TIMER_SEC_DECS, ((end_of_round%60000)%10000)/1000);
|
UpdateWorldState(BG_SA_TIMER_SEC_DECS, ((end_of_round%60000)%10000)/1000);
|
||||||
|
|||||||
@@ -369,6 +369,7 @@ class BattleGroundSA : public BattleGround
|
|||||||
void UpdateDemolisherSpawns();
|
void UpdateDemolisherSpawns();
|
||||||
TeamId attackers;
|
TeamId attackers;
|
||||||
uint32 TotalTime;
|
uint32 TotalTime;
|
||||||
|
uint32 BG_SA_ENDROUNDTIME;
|
||||||
bool ShipsStarted;
|
bool ShipsStarted;
|
||||||
BG_SA_GateState GateStatus[6];
|
BG_SA_GateState GateStatus[6];
|
||||||
BG_SA_Status status;
|
BG_SA_Status status;
|
||||||
|
|||||||
Reference in New Issue
Block a user