Pixelmon Mod - Bug tracker

[7.0.6] NPC Shopkeeper selling item with no Buy price set awaiting team input

Ticket description:
While adding a new shopkeeper I ran into this interesting issue. The NPC has an item which has no "buy" price set in shopItems.json or its own shopkeeper file, which resulted in the NPC offering the item for sale at a price of $-1 (NPC gave the player $1 and the item, resulting in infinite money and items.)

Expected behavior: I had expected the NPC to simply not have the item in the buy tab of the store until a price was added.

Comments

#18522 Posted by AngelicRune » 13 Jun 2019 11:44

Hey, Rune here! So I took at look at the Json and from what I can see there are a lot of items with no definitive "Buy" price. Which item in particular was causing the issue?

You should also be able to remedy the situation simply by editing the json and saving it server side. If you have any further issues, feel free to submit another bug report with the affected item and whatnot.

Thank you!

#18523 Posted by reiyooki » 13 Jun 2019 16:40

The item in question was Luck Incense.

We did remedy the problem by removing the item from breederitems_en_us.json, but I wouldn't have expected to need to do that if the item didn't have a buy price set.

From shopItems.json
Code: Select all      {
         "name": "pixelmon:luck_incense",
         "sell": 28
      },


From the NPC json (breederitems_en_us.json)
Code: Select all   {
     "name" : "pixelmon:luck_incense",
     "variation" : false
   },

#18562 Posted by Blv3 » 27 Jun 2019 13:48

Have you tried defining the buy price and setting it to '0'?

#18566 Posted by reiyooki » 28 Jun 2019 15:20

Setting the buy price to 0 keeps the item available, but at a price of 0.

Image

I assume there should be a simple If/then check to verify prices being less than or equal to 0 and not showing the item if so that's just somehow not working?

Ticket details

  • Ticket ID: 13826
  • Project: Pixelmon Mod
  • Status: Awaiting team input
  • Component: Other
  • Project version: 7.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: spongeforge-1.12.2-2768-7.1.6-RC3616
  • What else would be useful to know?: (unknown)
  • Assigned to: (unassigned)
  • Reported by: reiyooki
  • Reporter's tickets: (List all tickets)
  • Reported on: 12 Jun 2019 23:55
  • Ticket last visited by: MattBlower on 08 Jul 2019 13:00