Skip to content

Commit

Permalink
fix: gamestore nil player (opentibiabr#2715)
Browse files Browse the repository at this point in the history
Related to opentibiabr#2694
  • Loading branch information
dudantas authored Jun 27, 2024
1 parent 609a187 commit d3ddea0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions data/modules/scripts/gamestore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,23 @@ end

-- Both functions use same formula!
function parseOpenTransactionHistory(playerId, msg)
local player = Player(playerId)
if not player then
return
end

local page = 1
GameStore.DefaultValues.DEFAULT_VALUE_ENTRIES_PER_PAGE = msg:getByte()
sendStoreTransactionHistory(playerId, page, GameStore.DefaultValues.DEFAULT_VALUE_ENTRIES_PER_PAGE)
player:updateUIExhausted()
end

function parseRequestTransactionHistory(playerId, msg)
local player = Player(playerId)
if not player then
return
end

local page = msg:getU32()
sendStoreTransactionHistory(playerId, page + 1, GameStore.DefaultValues.DEFAULT_VALUE_ENTRIES_PER_PAGE)
player:updateUIExhausted()
Expand Down

0 comments on commit d3ddea0

Please sign in to comment.