Add correct values for honor gain after SotA. Also, fix issues with compiling with the recent patch.

--HG--
branch : trunk
This commit is contained in:
p0wer
2010-03-02 20:37:49 -06:00
parent f748ea34e3
commit 8ae9b39689
2 changed files with 21 additions and 11 deletions

View File

@@ -43,14 +43,14 @@ BattleGroundSA::~BattleGroundSA()
void BattleGroundSA::Reset()
{
TotalTime = 0;
attackers = ( (urand(0,1)) ? TEAM_ALLIANCE : TEAM_HORDE);
for(uint8 i = 0; i <= 5; i++)
TotalTime = 0;
attackers = ( (urand(0,1)) ? TEAM_ALLIANCE : TEAM_HORDE);
for(uint8 i = 0; i <= 5; i++)
{
GateStatus[i] = BG_SA_GATE_OK;
GateStatus[i] = BG_SA_GATE_OK;
}
ShipsStarted = false;
status = BG_SA_WARMUP;
ShipsStarted = false;
status = BG_SA_WARMUP;
}
bool BattleGroundSA::SetupBattleGround()
@@ -673,15 +673,15 @@ void BattleGroundSA::ToggleTimer()
void BattleGroundSA::EndBattleGround(uint32 winner)
{
//win reward
//honor reward for winning
if (winner == ALLIANCE)
RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), ALLIANCE);
RewardHonorToTeam(GetBonusHonorFromKill(BG_SA_HONOR_WIN), ALLIANCE);
else if (winner == HORDE)
RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), HORDE);
RewardHonorToTeam(GetBonusHonorFromKill(BG_SA_HONOR_WIN), HORDE);
//complete map_end rewards (even if no team wins)
RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), ALLIANCE);
RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), HORDE);
RewardHonorToTeam(GetBonusHonorFromKill(BG_SA_HONOR_END), ALLIANCE);
RewardHonorToTeam(GetBonusHonorFromKill(BG_SA_HONOR_END), HORDE);
BattleGround::EndBattleGround(winner);
}

View File

@@ -30,6 +30,14 @@ class BattleGroundSAScore : public BattleGroundScore
uint8 gates_destroyed;
};
enum BG_SA_Honor
{
BG_SA_HONOR_LOSE = 124,
BG_SA_HONOR_WIN = 248,
BG_SA_HONOR_END = 124
};
enum BG_SA_Status
{
BG_SA_NOTSTARTED = 0,
@@ -329,6 +337,8 @@ class BattleGroundSA : public BattleGround
void ToggleTimer();
TeamId attackers;
uint32 TotalTime;
uint32 m_HonorWinKills;
uint32 m_HonorEndKills;
bool ShipsStarted;
BG_SA_GateState GateStatus[6];
BG_SA_Status status;