Merge pull request #76 from ninjalulz/master

Add #74 and #75
This commit is contained in:
Stefan A. Brannfjell 2014-05-02 13:10:04 +02:00
commit dd6b493bef
4 changed files with 13 additions and 7 deletions

View File

@ -119,7 +119,11 @@
$config['soul'] = 100; $config['soul'] = 100;
$config['maleOutfitId'] = 128; $config['maleOutfitId'] = 128;
$config['femaleOutfitId'] = 138; $config['femaleOutfitId'] = 136;
$config['lookHead'] = 78;
$config['lookBody'] = 106;
$config['lookLegs'] = 58;
$config['lookFeet'] = 76;
// No vocation info (if user select vocation id 0, we force thees configurations on him // No vocation info (if user select vocation id 0, we force thees configurations on him
$config['nvlevel'] = 1; $config['nvlevel'] = 1;

View File

@ -269,8 +269,8 @@ function format_character_name($name) {
// Returns a list of players online // Returns a list of players online
function online_list() { function online_list() {
if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation` FROM `players_online` as `o` INNER JOIN `players` as `p` ON o.player_id = p.id"); if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players_online` as `o` INNER JOIN `players` as `p` ON `o`.`player_id` = `p`.`id` LEFT JOIN `guild_membership` gm ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id`");
else return mysql_select_multi("SELECT `name`, `level`, `vocation` FROM `players` WHERE `online`='1' ORDER BY `name` DESC;"); else return mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players` p LEFT JOIN `guild_ranks` gr ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`name` DESC;");
} }
// Gets you the actual IP address even from users behind ISP proxies and so on. // Gets you the actual IP address even from users behind ISP proxies and so on.

View File

@ -1078,10 +1078,10 @@ function user_create_character($character_data) {
'health' => $cnf['health'], 'health' => $cnf['health'],
'healthmax' => $cnf['health'], 'healthmax' => $cnf['health'],
'experience' => 0, /* Will automatically be configured according to level after creating this array*/ 'experience' => 0, /* Will automatically be configured according to level after creating this array*/
'lookbody' => 0, /* STARTER OUTFITS */ 'lookbody' => $cnf['lookBody'], /* STARTER OUTFITS */
'lookfeet' => 0, 'lookfeet' => $cnf['lookFeet'],
'lookhead' => 0, 'lookhead' => $cnf['lookHead'],
'looklegs' => 0, 'looklegs' => $cnf['lookLegs'],
'looktype' => $outfit_type, 'looktype' => $outfit_type,
'lookaddons' => 0, 'lookaddons' => 0,
'maglevel' => 0, 'maglevel' => 0,

View File

@ -9,6 +9,7 @@ if ($array) {
<table id="onlinelistTable" class="table table-striped table-hover"> <table id="onlinelistTable" class="table table-striped table-hover">
<tr class="yellow"> <tr class="yellow">
<th>Name:</th> <th>Name:</th>
<th>Guild:</th>
<th>Level:</th> <th>Level:</th>
<th>Vocation:</th> <th>Vocation:</th>
</tr> </tr>
@ -17,6 +18,7 @@ if ($array) {
$url = url("characterprofile.php?name=". $value['name']); $url = url("characterprofile.php?name=". $value['name']);
echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">'; echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">';
echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>'; echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>';
if (!empty($value['gname'])) echo '<td><a href="guilds.php?name='. $value['gname'] .'">'. $value['gname'] .'</a></td>'; else echo '<td></td>';
echo '<td>'. $value['level'] .'</td>'; echo '<td>'. $value['level'] .'</td>';
echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>'; echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
echo '</tr>'; echo '</tr>';