Skip to content

Commit

Permalink
Merge pull request delaford#110 from srichter/fix_coins_value_is_false
Browse files Browse the repository at this point in the history
Fix coins value is false
  • Loading branch information
djasnowski authored Oct 4, 2019
2 parents fc7283c + 3f00799 commit 01a97a6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions server/core/functions/shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,9 @@ class Shop {
*/
value() {
const { price, name } = Query.getItemData(this.itemId);
let value = '';
// If the item is prohibited, it has no value
if (this.prohibited) {
value = 'How can you value that which has infinite value?';
} else {
value = `${price} coins.`;
}
Socket.emit('game:send:message', {
player: { socket_id: world.players[this.playerIndex].socket_id },
text: this.itemId !== 'coins' ? `${name}: ${price} coins.` : `${this.item.qty} coins.`,
text: this.prohibited ? 'How can you value that which has infinite value?' : `${name}: ${price} coins.`,
});
}

Expand Down

0 comments on commit 01a97a6

Please sign in to comment.