mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8276] Implement achievment ACHIEVEMENT_CRITERIA_TYPE_WIN_BG
* including new achievement createria data type ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE Note: Some achivement creteria for success need data in `achievement_criteria_data`
This commit is contained in:
parent
571f94b36a
commit
9002710c93
11 changed files with 146 additions and 22 deletions
|
|
@ -453,7 +453,7 @@ void BattleGround::Update(uint32 diff)
|
|||
|
||||
void BattleGround::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O)
|
||||
{
|
||||
uint8 idx = GetTeamIndexByTeamId(TeamID);
|
||||
BattleGroundTeamId idx = GetTeamIndexByTeamId(TeamID);
|
||||
m_TeamStartLocX[idx] = X;
|
||||
m_TeamStartLocY[idx] = Y;
|
||||
m_TeamStartLocZ[idx] = Z;
|
||||
|
|
@ -1767,3 +1767,9 @@ WorldSafeLocsEntry const* BattleGround::GetClosestGraveYard( Player* player )
|
|||
{
|
||||
return objmgr.GetClosestGraveYard( player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam() );
|
||||
}
|
||||
|
||||
bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const
|
||||
{
|
||||
BattleGroundTeamId team_idx = GetTeamIndexByTeamId(team);
|
||||
return m_TeamScores[team_idx] >= minScore && m_TeamScores[team_idx] <= maxScore;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue