mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Outfit display support on low protocol < 7.8
This commit is contained in:
parent
2d14b3252e
commit
94223f5ac0
@ -15,7 +15,11 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
|
|||||||
if (!$loadOutfits) {
|
if (!$loadOutfits) {
|
||||||
$profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin');
|
$profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin');
|
||||||
} else { // Load outfits
|
} 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);
|
$profile_data['online'] = user_is_online_10($user_id);
|
||||||
|
|
||||||
@ -27,10 +31,15 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
|
|||||||
if (!$loadOutfits) {
|
if (!$loadOutfits) {
|
||||||
$profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'group_id', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex');
|
$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
|
} else { // Load outfits
|
||||||
if ($config['ServerEngine'] !== 'OTHIRE')
|
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');
|
if ($config['client'] < 780) {
|
||||||
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');
|
||||||
|
} 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');
|
$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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,10 +929,15 @@ function user_character_list_count($account_id) {
|
|||||||
|
|
||||||
// HIGHSCORE FUNCTIONS \\
|
// HIGHSCORE FUNCTIONS \\
|
||||||
function fetchAllScores($rows, $tfs, $g, $vlist, $v = -1, $flags = false, $outfits = false) {
|
function fetchAllScores($rows, $tfs, $g, $vlist, $v = -1, $flags = false, $outfits = false) {
|
||||||
if (config('ServerEngine') !== 'OTHIRE')
|
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`" : "";
|
if (config('client') < 780) {
|
||||||
else
|
$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`" : "";
|
$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)
|
// Return scores ordered by type and vocation (if set)
|
||||||
$data = array();
|
$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
|
// TFS 1.0 variations
|
||||||
if ($cnf['ServerEngine'] === 'TFS_10') {
|
if ($cnf['ServerEngine'] === 'TFS_10') {
|
||||||
unset($import_data['rank_id']);
|
unset($import_data['rank_id']);
|
||||||
|
@ -7,10 +7,15 @@
|
|||||||
$array = false;
|
$array = false;
|
||||||
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['onlinelist']) ? true : false;
|
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['onlinelist']) ? true : false;
|
||||||
$loadOutfits = ($config['show_outfits']['onlinelist']) ? true : false;
|
$loadOutfits = ($config['show_outfits']['onlinelist']) ? true : false;
|
||||||
if ($config['ServerEngine'] != 'OTHIRE')
|
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`" : "";
|
if ($config['client'] < 780) {
|
||||||
else
|
$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`" : "";
|
$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.
|
// Small 30 seconds players_online cache.
|
||||||
$cache = new Cache('engine/cache/onlinelist');
|
$cache = new Cache('engine/cache/onlinelist');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user