diff --git a/characterprofile.php b/characterprofile.php index fe49231..2a85dcb 100644 --- a/characterprofile.php +++ b/characterprofile.php @@ -15,7 +15,11 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) { if (!$loadOutfits) { $profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin'); } else { // Load outfits - $profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype', 'lookaddons'); + if ($config['client'] < 780) { + $profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype'); + } else { + $profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype', 'lookaddons'); + } } $profile_data['online'] = user_is_online_10($user_id); @@ -27,10 +31,15 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) { if (!$loadOutfits) { $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex'); } else { // Load outfits - if ($config['ServerEngine'] !== 'OTHIRE') - $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype', 'lookaddons'); - else + if ($config['ServerEngine'] !== 'OTHIRE') { + if ($config['client'] < 780) { + $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype'); + } else { + $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype', 'lookaddons'); + } + } else { $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex', 'lookbody', 'lookfeet', 'lookhead', 'looklegs', 'looktype'); + } } } diff --git a/engine/function/users.php b/engine/function/users.php index ee3b5f9..e076f31 100644 --- a/engine/function/users.php +++ b/engine/function/users.php @@ -929,10 +929,15 @@ function user_character_list_count($account_id) { // HIGHSCORE FUNCTIONS \\ function fetchAllScores($rows, $tfs, $g, $vlist, $v = -1, $flags = false, $outfits = false) { - if (config('ServerEngine') !== 'OTHIRE') - $outfits = ($outfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`, `p`.`lookaddons` AS `addons`" : ""; - else + if (config('ServerEngine') !== 'OTHIRE') { + if (config('client') < 780) { + $outfits = ($outfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`" : ""; + } else { + $outfits = ($outfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`, `p`.`lookaddons` AS `addons`" : ""; + } + } else { $outfits = ($outfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`" : ""; + } // Return scores ordered by type and vocation (if set) $data = array(); @@ -1391,6 +1396,11 @@ function user_create_character($character_data) { ); } + // Clients below 7.8 don't have outfit addons + if (isset($import_data['lookaddons']) && config('client') < 780) { + unset($import_data['lookaddons']); + } + // TFS 1.0 variations if ($cnf['ServerEngine'] === 'TFS_10') { unset($import_data['rank_id']); diff --git a/onlinelist.php b/onlinelist.php index 491cd09..f28ed70 100644 --- a/onlinelist.php +++ b/onlinelist.php @@ -7,10 +7,15 @@ $array = false; $loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['onlinelist']) ? true : false; $loadOutfits = ($config['show_outfits']['onlinelist']) ? true : false; -if ($config['ServerEngine'] != 'OTHIRE') - $outfitQuery = ($loadOutfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`, `p`.`lookaddons` AS `addons`" : ""; -else +if ($config['ServerEngine'] != 'OTHIRE') { + if ($config['client'] < 780) { + $outfitQuery = ($loadOutfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`" : ""; + } else { + $outfitQuery = ($loadOutfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`, `p`.`lookaddons` AS `addons`" : ""; + } +} else { $outfitQuery = ($loadOutfits) ? ", `p`.`lookbody` AS `body`, `p`.`lookfeet` AS `feet`, `p`.`lookhead` AS `head`, `p`.`looklegs` AS `legs`, `p`.`looktype` AS `type`" : ""; +} // Small 30 seconds players_online cache. $cache = new Cache('engine/cache/onlinelist');