P0nk / Cosmic

MapleStory Global v83 server emulator
https://discord.gg/JU5aQapVZK
GNU Affero General Public License v3.0
394 stars 201 forks source link

EXP coupons purchased from cash shop stack #252

Open wejrox opened 1 month ago

wejrox commented 1 month ago

Describe the bug

In this server, you can buy 2x multiple times and they all stack. I'm not certain, but I think this applies exponentially too, so rates x 2 x 2 instead of rates x 4.

To Reproduce Steps to reproduce the behavior:

  1. Type @rates
  2. Note the rate
  3. Buy x2 exp coupon
  4. Repeat 1-2
  5. Buy x2 exp
  6. Repeat 1-2

Observe the behaviour.

Expected behavior

Exp rate is multiplied by 2.

In vanilla, if you buy three 2x exp coupons, you don't get 8x exp, only 2x.

Screenshots If applicable, add screenshots to help explain your problem.

wejrox commented 1 month ago

Turns out I had the config flag USE_STACK_COUPON_RATES enabled. However, it seems like if it's disabled only one EXP coupon can apply at once, which is not correct with vanilla. There was more complicated logic to allow some event coupons and some other usables to stack with the cash shop coupon.