Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[499] Arena teams should be working now with TrinityCore servers.

  • Loading branch information...
commit 1614837caf2a006442f362602b324d16789f4c25 1 parent 0e4cc04
roelv authored committed
View
22 arena-ladder.php
@@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release 4.50
- * @revision 450
+ * @revision 499
* @copyright (c) 2009-2011 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -93,13 +93,29 @@
$sort = '`arena_team`.`name`';
}
elseif($_GET['sf'] == 'sgw') {
- $sort = '`arena_team_stats`.`wins2`';
+ switch(Armory::$currentRealmInfo['type']) {
+ default:
+ case SERVER_MANGOS:
+ $sort = '`arena_team_stats`.`wins2`';
+ break;
+ case SERVER_TRINITY:
+ $sort = '`arena_team`.`weekWins`';
+ break;
+ }
}
elseif($_GET['sf'] == 'sgl') {
$sort = 'lose'; // Unique sorting
}
else {
- $sort = '`arena_team_stats`.`' . $_GET['sf'] .'`';
+ switch(Armory::$currentRealmInfo['type']) {
+ default:
+ case SERVER_MANGOS:
+ $sort = '`arena_team_stats`.`' . $_GET['sf'] .'`';
+ break;
+ case SERVER_TRINITY:
+ $sort = '`arena_team`.`' . $_GET['sf'] .'`';
+ break;
+ }
}
if(!isset($_GET['sd'])) {
$type = 'ASC';
View
34 includes/classes/class.arenateams.php
@@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release 4.50
- * @revision 498
+ * @revision 499
* @copyright (c) 2009-2011 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -311,18 +311,17 @@ public function BuildArenaLadderList($type, $page, $num = false, $order = 'ratin
SELECT
`arena_team`.`arenaTeamId` AS `arenateamid`,
`arena_team`.`name`,
- `arena_team_stats`.`rating`,
- `arena_team_stats`.`weekGames` AS `gamesPlayed`,
- `arena_team_stats`.`weekWins` AS `gamesWon`,
- `arena_team_stats`.`rank` AS `ranking`,
- `arena_team_stats`.`seasonGames` AS `seasonGamesPlayed`,
- `arena_team_stats`.`seasonWins` AS `seasonGamesWon`,
+ `arena_team`.`rating`,
+ `arena_team`.`weekGames` AS `gamesPlayed`,
+ `arena_team`.`weekWins` AS `gamesWon`,
+ `arena_team`.`rank` AS `ranking`,
+ `arena_team`.`seasonGames` AS `seasonGamesPlayed`,
+ `arena_team`.`seasonWins` AS `seasonGamesWon`,
`characters`.`race`,
- `arena_team_stats`.`seasonGames`-`arena_team_stats`.`seasonWins` AS `lose`
+ `arena_team`.`seasonGames`-`arena_team`.`seasonWins` AS `lose`
FROM `arena_team` AS `arena_team`
- LEFT JOIN `arena_team_stats` AS `arena_team_stats` ON `arena_team_stats`.`arenateamid`=`arena_team`.`arenateamid`
LEFT JOIN `characters` AS `characters` ON `characters`.`guid`=`arena_team`.`captainguid`
- WHERE `arena_team`.`type`=%d AND `arena_team_stats`.`rank` > 0
+ WHERE `arena_team`.`type`=%d AND `arena_team`.`rank` > 0
ORDER BY `lose` %s LIMIT %d, 20", $type, $sort, $page);
break;
}
@@ -353,17 +352,16 @@ public function BuildArenaLadderList($type, $page, $num = false, $order = 'ratin
SELECT
`arena_team`.`arenaTeamId` AS `arenateamid`,
`arena_team`.`name`,
- `arena_team_stats`.`rating`,
- `arena_team_stats`.`weekGames` AS `gamesPlayed`,
- `arena_team_stats`.`weekWins` AS `gamesWon`,
- `arena_team_stats`.`rank` AS `ranking`,
- `arena_team_stats`.`seasonGames` AS `seasonGamesPlayed`,
- `arena_team_stats`.`seasonWins` AS `seasonGamesWon`,
+ `arena_team`.`rating`,
+ `arena_team`.`weekGames` AS `gamesPlayed`,
+ `arena_team`.`weekWins` AS `gamesWon`,
+ `arena_team`.`rank` AS `ranking`,
+ `arena_team`.`seasonGames` AS `seasonGamesPlayed`,
+ `arena_team`.`seasonWins` AS `seasonGamesWon`,
`characters`.`race`
FROM `arena_team` AS `arena_team`
- LEFT JOIN `arena_team_stats` AS `arena_team_stats` ON `arena_team_stats`.`arenateamid`=`arena_team`.`arenaTeamId`
LEFT JOIN `characters` AS `characters` ON `characters`.`guid`=`arena_team`.`captainGuid`
- WHERE `arena_team`.`type`=%d AND `arena_team_stats`.`rank` > 0
+ WHERE `arena_team`.`type`=%d AND `arena_team`.`rank` > 0
ORDER BY %s %s LIMIT %d, 20", $type, $order, $sort, $page);
break;
}
View
2  includes/revision_nr.php
@@ -1,5 +1,5 @@
<?php
-define('ARMORY_REVISION', 498);
+define('ARMORY_REVISION', 499);
define('DB_VERSION', 'armory_r489');
define('CONFIG_VERSION', '2001201101');
?>

1 comment on commit 1614837

@jonkopinx

whenever i try to sort arena rank(by rating,name) or try to go to next page, it won't display anything.

Please sign in to comment.
Something went wrong with that request. Please try again.