mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
[8276] Implement achievment ACHIEVEMENT_CRITERIA_TYPE_WIN_BG Author: VladimirMangos
* 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`
--HG--
branch : trunk
This commit is contained in:
@@ -476,7 +476,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;
|
||||
@@ -1878,3 +1878,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user