Фикс Honor and Money:
PHP код:
Index: top_100.php
===================================================================
--- top_100.php (revision 344)
+++ top_100.php (working copy)
@@ -22,11 +22,11 @@
data,
name,
account,
- (SUBSTRING_INDEX( SUBSTRING_INDEX( `data` , ' ' , ?d) , ' ' , -1 )+0) AS `money`
+ money
FROM `characters`
{WHERE `account` NOT IN (?a)}
ORDER BY `money` DESC
- LIMIT ?d", PLAYER_FIELD_COINAGE+1, empty($gm_accs)?DBSIMPLE_SKIP:$gm_accs, $config***91;'top_money_limit'***93;);
+ LIMIT ?d", empty($gm_accs)?DBSIMPLE_SKIP:$gm_accs, $config***91;'top_money_limit'***93;);
if ($rows)
{
echo "<TABLE class=report width=500>";
@@ -71,20 +71,20 @@
else if ($output_mode == "TOP_HONOR")
{
$sort = @$_REQUEST***91;'sort'***93;;
- if ($sort == 'kills') $sort_str = 'kills';
- else $sort_str = 'honor';
+ if ($sort == 'kills') $sort_str = 'totalKills';
+ else $sort_str = 'totalHonorPoints';
$gm_accs = $rDB->selectCol("SELECT `id` FROM `account` WHERE `gmlevel`<>'0'");
$rows = $cDB->select(
"SELECT
guid,
data,
name,
- (SUBSTRING_INDEX( SUBSTRING_INDEX( `data` , ' ' , ?d) , ' ' , -1 )+0) AS `honor`,
- (SUBSTRING_INDEX( SUBSTRING_INDEX( `data` , ' ' , ?d) , ' ' , -1 )+0) AS `kills`
+ totalHonorPoints,
+ totalKills
FROM `characters`
{WHERE `account` NOT IN (?a)}
ORDER BY `$sort_str`
- DESC LIMIT ?d", PLAYER_FIELD_HONOR_CURRENCY+1, PLAYER_FIELD_LIFETIME_HONORBALE_KILLS+1, empty($gm_accs)?DBSIMPLE_SKIP:$gm_accs, $config***91;'top_honor_limit'***93;);
+ DESC LIMIT ?d", empty($gm_accs)?DBSIMPLE_SKIP:$gm_accs, $config***91;'top_honor_limit'***93;);
if ($rows)
{
echo "<TABLE class=report width=500>";