Add player->getOutfit function

This commit is contained in:
slawkens 2024-04-01 23:19:12 +02:00
parent 03cc09b8c7
commit ffaa0729ac
2 changed files with 8 additions and 1 deletions

View File

@ -1229,6 +1229,13 @@ class OTS_Player extends OTS_Row_DAO
$this->data['direction'] = (int) $direction; $this->data['direction'] = (int) $direction;
} }
public function getOutfit(): string
{
$hasLookAddons = $this->db->hasColumn('players', 'lookaddons');
return setting('core.outfit_images_url') . '?id=' . $this->getLookType() . ($hasLookAddons ? '&addons=' . $this->getLookAddons() : '') . '&head=' . $this->getLookHead() . '&body=' . $this->getLookBody() . '&legs=' . $this->getLookLegs() . '&feet=' . $this->getLookFeet();
}
/** /**
* Body color. * Body color.
* *

View File

@ -60,7 +60,7 @@ foreach($posts as &$post) {
} }
if($config['characters']['outfit']) { if($config['characters']['outfit']) {
$post['outfit'] = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet(); $post['outfit'] = $player->getOutfit();
} }
$groupName = ''; $groupName = '';