-
-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed market offers duplication money and items (#521)
Resolves #517 Resolves #520 Resolves #538 Global sync pr: https://github.com/opentibiabr/otservbr-global/pull/797/files Changed max market offer price from uint32_t to uint64_t (from 999999999 to 999999999999 client limitation)
- Loading branch information
Showing
13 changed files
with
101 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
-- return true = There are others migrations file | ||
-- return false = This is the last migration file | ||
function onUpdateDatabase() | ||
return false | ||
Spdlog.info("Updating database to version 2 (Fix market price size)") | ||
db.query("ALTER TABLE `market_history` CHANGE `price` `price` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';") | ||
db.query("ALTER TABLE `market_offers` CHANGE `price` `price` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';") | ||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- return true = There are others migrations file | ||
-- return false = This is the last migration file | ||
function onUpdateDatabase() | ||
return false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9dd8a10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eu testei aqui, uma venda ao valor de 999999999999 gps, deu certo, contudo não constou no historico de compra/venda do item no market.
A compra no valor:
O item chegando:
O Historico de compra/venda:
E parece que valores como 9.999.999.999.999 GPS bugam o balance descontando errado (não testei a fundo ainda)
9dd8a10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quanto ao bug do balance, eu testei, e até onde me lembro, retira o valor correto, pois a função que remove e adiciona dinheiro também é uint64_t e chega no limite de 999,999,999,999
Mas se você encontrar alguma incongruência, é só dizer.
PS: Por favor, não utilizar os commits para reportar problemas. Devemos testar enquanto estiver em pr, caso encontre algum problema depois de mergeado, abra um issue, pois dificilmente iremos ir nos commits acompanhar conversas, o local correto de acompanhar os problemas é nos issues, assim evita que a gente acabe esquecendo de resolver algo...