diff options
author | megamage <none@none> | 2008-11-30 12:47:26 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-30 12:47:26 -0600 |
commit | bb1ee8a004c79d0f2262820f92df4bd72bdd6587 (patch) | |
tree | c240378ccc96b12f1f67cc9e096368bc95662a2c /src/game/ArenaTeam.h | |
parent | 375d3ba4eb986676fc9084a93414083a89d542a0 (diff) |
*Update to Mangos 6867. Source: Mangos.
*Big changes:
*[6858] Prevent cheating with ignore waiting in login queue.
*[6863] Arena team related clean ups and adding parts of w12x's arena patch.
*Some Config changes and guild changes.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ArenaTeam.h')
-rw-r--r-- | src/game/ArenaTeam.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/game/ArenaTeam.h b/src/game/ArenaTeam.h index 03cf5ccc7d4..2e6b3d5faee 100644 --- a/src/game/ArenaTeam.h +++ b/src/game/ArenaTeam.h @@ -10,12 +10,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef TRINITYCORE_ARENATEAM_H @@ -68,12 +68,12 @@ ERR_ARENA_TEAM_LEVEL_TOO_LOW_I enum ArenaTeamStatTypes { - STAT_TYPE_RATING = 0, - STAT_TYPE_GAMES = 1, - STAT_TYPE_WINS = 2, - STAT_TYPE_PLAYED = 3, - STAT_TYPE_WINS2 = 4, - STAT_TYPE_RANK = 5 + STAT_TYPE_RATING = 0, + STAT_TYPE_GAMES_WEEK = 1, + STAT_TYPE_WINS_WEEK = 2, + STAT_TYPE_GAMES_SEASON = 3, + STAT_TYPE_WINS_SEASON = 4, + STAT_TYPE_RANK = 5 }; enum ArenaTeamTypes @@ -90,19 +90,20 @@ struct ArenaTeamMember //uint32 unk2; //uint8 unk1; uint8 Class; - uint32 played_week; - uint32 wons_week; - uint32 played_season; - uint32 wons_season; + uint32 games_week; + uint32 wins_week; + uint32 games_season; + uint32 wins_season; + uint32 personal_rating; }; struct ArenaTeamStats { uint32 rating; - uint32 games; - uint32 wins; - uint32 played; - uint32 wins2; + uint32 games_week; + uint32 wins_week; + uint32 games_season; + uint32 wins_season; uint32 rank; }; @@ -125,7 +126,7 @@ class ArenaTeam static uint8 GetSlotByType(uint32 type); const uint64& GetCaptain() const { return CaptainGuid; } std::string GetName() const { return Name; } - ArenaTeamStats GetStats() const { return stats; } + const ArenaTeamStats& GetStats() const { return stats; } void SetStats(uint32 stat_type, uint32 value); uint32 GetRating() const { return stats.rating; } @@ -145,6 +146,14 @@ class ArenaTeam MemberList::iterator membersbegin(){ return members.begin(); } MemberList::iterator membersEnd(){ return members.end(); } bool HaveMember(uint64 guid) const; + ArenaTeamMember* GetMember(uint64 guid) + { + for (MemberList::iterator itr = members.begin(); itr != members.end(); ++itr) + if(itr->guid==guid) + return &(*itr); + + return NULL; + } bool LoadArenaTeamFromDB(uint32 ArenaTeamId); void LoadMembersFromDB(uint32 ArenaTeamId); |