Skip to content

Commit

Permalink
Add player->getOutfit function
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Apr 1, 2024
1 parent 03cc09b commit ffaa072
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions system/libs/pot/OTS_Player.php
Expand Up @@ -1229,6 +1229,13 @@ public function setDirection($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.
*
Expand Down
2 changes: 1 addition & 1 deletion system/pages/forum/show_thread.php
Expand Up @@ -60,7 +60,7 @@
}

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 = '';
Expand Down

0 comments on commit ffaa072

Please sign in to comment.