Skip to content

Commit

Permalink
[Fix] multiple purchase of the same mount from store. (#259)
Browse files Browse the repository at this point in the history
When buying a mount, it was possible to buy it indefinitely, causing the player to lose coins.
  • Loading branch information
Corlyone authored Mar 21, 2022
1 parent deeb21f commit 3e94dc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/modules/scripts/gamestore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,10 @@ function GameStore.processOutfitPurchase(player, offerSexIdTable, addon)
end

function GameStore.processMountPurchase(player, offerId)
if player:hasMount(offerId) then
return error({code = 0, message = "You already own this mount."})
end

player:addMount(offerId)
end

Expand Down

0 comments on commit 3e94dc2

Please sign in to comment.