marek12
Available for sprite works
- Joined
- Apr 8, 2020
- Messages
- 398
- Solutions
- 4
- Reaction score
- 394
Can someone help me with showing owned outfits?
On the image below is shown that on website it is not showing outfits that character own.
In this case this character got 2 hunter addons and it is not showing in outfit list.
I am using TFS 0.4
characters.php part where the outfits are:
On the image below is shown that on website it is not showing outfits that character own.
In this case this character got 2 hunter addons and it is not showing in outfit list.
I am using TFS 0.4
characters.php part where the outfits are:
PHP:
$outfit_server = $config['show_outfits']['imageServer'];
$outfit_storage = $config['EQ_shower']['storage_value'];
$male_outfits = array(
[128,129,130,131,132],
[133,134,143,144,145],
[146,151,152,153,154],
[251,268,273,278,289],
[325,328,335,367],
//516,541,574,577,610,619,633,634,637,665,667,684,695,697,699,725,733,746,750,760,846,853,873,884,899
);
$female_outfits = array(
[136,137,138,139,140],
[141,142,147,148,149],
[150,155,156,157,158],
[252,269,270,279,288],
[324,329,336,366],
//514,542,575,578,618,620,632,635,636,664,666,683,694,696,698,724,732,745,749,759,845,852,874,885,900
);
$featured_outfits = ($profile_data['sex'] == 1) ? $male_outfits : $female_outfits;
$outfit_list = array();
$outfit_rows = COUNT($featured_outfits);
$outfit_columns = COUNT($featured_outfits[0]);
foreach ($featured_outfits as $row) {
if (COUNT($row) > $outfit_columns) {
$outfit_columns = COUNT($row);
}
foreach ($row as $column) {
$outfit_list[] = $column;
}
}
$highest_outfit_id = MAX($outfit_list);
$outfit_storage_max = $outfit_storage + $highest_outfit_id + 1;
$player_outfits = array();
$storage_sql = mysql_select_multi("
SELECT `key`, `value`
FROM `player_storage`
WHERE `player_id`={$user_id}
AND `key` > {$outfit_storage}
AND `key` < {$outfit_storage_max}
");
if ($storage_sql !== false && !empty($storage_sql)) {
foreach ($storage_sql as $row) {
$player_outfits[$row['key']] = $row['value'];
}
}
$aquired_outfits = array();
foreach ($outfit_list as $outfit_id) {
$outfit_key = $outfit_storage + $outfit_id;
if (isset($player_outfits[$outfit_key]) && $player_outfits[$outfit_key] == 3) {
$aquired_outfits[$outfit_id] = true;
}
}
?>