Outfit display support on low protocol < 7.8

This commit is contained in:
Znote
2020-02-23 21:54:12 +01:00
parent 2d14b3252e
commit 94223f5ac0
3 changed files with 34 additions and 10 deletions

View File

@@ -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']);