Open lib/menu.php and change
- Code: Select all
$guildstat_query = "SELECT IF(`".$roster_conf['alt_location']."` LIKE '%".$roster_conf['alt_type']."%',1,0) AS 'isalt',
FLOOR(`level`/10) AS levelgroup,
COUNT(`level`) AS amount,
SUM(`level`) AS sum
FROM `".ROSTER_MEMBERSTABLE."`
GROUP BY isalt, levelgroup
ORDER BY isalt ASC, levelgroup DESC";
$result_menu = $wowdb->query($guildstat_query);
if (!$result_menu)
{
die_quietly($wowdb->error(),'Database Error',basename(__FILE__),__LINE__,$guildstat_query);
}
$num_non_alts = 0;
$num_alts = 0;
$num_lvl_60 = 0;
$num_lvl_50_59 = 0;
$num_lvl_40_49 = 0;
$num_lvl_30_39 = 0;
$num_lvl_1_29 = 0;
$level_sum = 0;
while ($row = $wowdb->fetch_assoc($result_menu))
{
if ($row['isalt'])
{
$num_alts += $row['amount'];
}
else
{
$num_non_alts += $row['amount'];
}
switch ($row['levelgroup'])
{
case 6:
$num_lvl_60 += $row['amount'];
break;
case 5:
$num_lvl_50_59 += $row['amount'];
break;
case 4:
$num_lvl_40_49 += $row['amount'];
break;
case 3:
$num_lvl_30_39 += $row['amount'];
break;
case 2:
case 1:
case 0:
$num_lvl_1_29 += $row['amount'];
break;
default:
}
$level_sum += $row['sum'];
}
$result_avg = $level_sum/($num_alts + $num_non_alts);
To these
- Code: Select all
$guildstat_query = "SELECT IF(`".$roster_conf['alt_location']."` LIKE '%".$roster_conf['alt_type']."%',1,0) AS 'isalt',
class,
COUNT(`class`) AS amount
FROM `".ROSTER_MEMBERSTABLE."`
GROUP BY isalt, class
ORDER BY isalt ASC, class ASC";
$result_menu = $wowdb->query($guildstat_query);
if (!$result_menu)
{
die_quietly($wowdb->error(),'Database Error',basename(__FILE__),__LINE__,$guildstat_query);
}
$num_non_alts = 0;
$num_alts = 0;
$num_druids = 0;
$num_druids_alts = 0;
$num_hunters = 0;
$num_hunters_alts = 0;
$num_mages = 0;
$num_mages_alts = 0;
$num_priests = 0;
$num_priests_alts = 0;
$num_rogues = 0;
$num_rogues_alts = 0;
$num_shamans = 0;
$num_shamans_alts = 0;
$num_warlocks = 0;
$num_warlocks_alts = 0;
$num_warriors = 0;
$num_warriors_alts = 0;
while ($row = $wowdb->fetch_assoc($result_menu))
{
if ($row['isalt'])
{
switch ($row['class'])
{
case Druid:
$num_druids_alts += $row['amount'];
break;
case Hunter:
$num_hunters_alts += $row['amount'];
break;
case Mage:
$num_mages_alts += $row['amount'];
break;
case Priest:
$num_priests_alts += $row['amount'];
break;
case Rogue:
$num_rogues_alts += $row['amount'];
break;
case Shaman:
$num_shamans_alts += $row['amount'];
break;
case Warlock:
$num_warlocks_alts += $row['amount'];
break;
case Warrior:
$num_warriors_alts += $row['amount'];
break;
default:
}
$num_alts += $row['amount'];
}
else
{
switch ($row['class'])
{
case Druid:
$num_druids += $row['amount'];
break;
case Hunter:
$num_hunters += $row['amount'];
break;
case Mage:
$num_mages += $row['amount'];
break;
case Priest:
$num_priests += $row['amount'];
break;
case Rogue:
$num_rogues += $row['amount'];
break;
case Shaman:
$num_shamans += $row['amount'];
break;
case Warlock:
$num_warlocks += $row['amount'];
break;
case Warrior:
$num_warriors += $row['amount'];
break;
default:
}
$num_non_alts += $row['amount'];
}
}
}
an change
- Code: Select all
print $wordings[$roster_conf['roster_lang']]['members'].': '.$num_non_alts.' (+'.$num_alts.' Alts)
<br />
<ul>
<li style="color:#999999;">Average Level: '.round($result_avg).'</li>
<li>'.$wordings[$roster_conf['roster_lang']]['level'].' 60: '.$num_lvl_60.'</li>
<li>'.$wordings[$roster_conf['roster_lang']]['level'].' 50-59: '.$num_lvl_50_59.'</li>
<li>'.$wordings[$roster_conf['roster_lang']]['level'].' 40-49: '.$num_lvl_40_49.'</li>
<li>'.$wordings[$roster_conf['roster_lang']]['level'].' 30-39: '.$num_lvl_30_39.'</li>
<li>'.$wordings[$roster_conf['roster_lang']]['level'].' 1-29: '.$num_lvl_1_29.'</li>
</ul></td>';
to
- Code: Select all
print $wordings[$roster_conf['roster_lang']]['members'].': '.$num_non_alts.' (+'.$num_alts.' Alts)
<br />
<ul>
<li>Druids: '.$num_druids.' (+'.$num_druids_alts.')</li>
<li>Hunters: '.$num_hunters.' (+'.$num_hunters_alts.')</li>
<li>Mages: '.$num_mages.' (+'.$num_mages_alts.')</li>
<li>Priests: '.$num_priests.' (+'.$num_priests_alts.')</li>
<li>Rogues: '.$num_rogues.' (+'.$num_rogues_alts.')</li>
<li>Shamans: '.$num_shamans.' (+'.$num_shamans_alts.')</li>
<li>Warlocks: '.$num_warlocks.' (+'.$num_warlocks_alts.')</li>
<li>Warriors: '.$num_warriors.' (+'.$num_warriors_alts.')</li>
</ul></td>';
If you are allie sorry try delete char or change shaman to paladyns