Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cyclopedia house auction #3022

Merged
merged 38 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fef5579
init
murilo09 Oct 27, 2024
f16662f
Code format - (Clang-format)
github-actions[bot] Oct 27, 2024
8b3e60f
sonar issues
murilo09 Oct 27, 2024
bf22602
revert
murilo09 Oct 28, 2024
6ace26f
Merge branch 'main' into test-house
murilo09 Oct 29, 2024
75fc10d
fix: load state into house object
phacUFPE Oct 29, 2024
f6a76ff
feat: show move out info
murilo09 Oct 30, 2024
d27a246
fix days to end bid
murilo09 Oct 30, 2024
9f7cc62
Merge branch 'main' into test-house
murilo09 Oct 30, 2024
6a35471
fix load house logic
murilo09 Oct 30, 2024
e057cd0
feat: transfer
murilo09 Oct 30, 2024
95c16ed
Code format - (Clang-format)
github-actions[bot] Oct 30, 2024
19ce395
missing column schema.sql
murilo09 Oct 30, 2024
1a8c761
some fixes
murilo09 Oct 30, 2024
aab4b95
error handling
murilo09 Oct 30, 2024
f53b628
Code format - (Clang-format)
github-actions[bot] Oct 30, 2024
f3667aa
missing errors
murilo09 Oct 30, 2024
cbbdc2d
configurable days to close bid
murilo09 Oct 30, 2024
53bf0cf
Merge branch 'main' into test-house
murilo09 Oct 30, 2024
798ece7
fix compilation
murilo09 Oct 30, 2024
eead52a
Merge branch 'main' into test-house
majestyotbr Oct 30, 2024
da4398d
fix migration
murilo09 Oct 30, 2024
6a5ecf2
sonar issue
murilo09 Oct 30, 2024
c75da85
fix copy
murilo09 Oct 31, 2024
45e0baf
Merge branch 'main' into test-house
murilo09 Oct 31, 2024
1a2934d
Code format - (Clang-format)
github-actions[bot] Oct 31, 2024
7370433
fix: using enum
murilo09 Oct 31, 2024
0fe8b2d
fix: remove items from house when removing owner
murilo09 Oct 31, 2024
ff66f91
Merge branch 'main' into test-house
murilo09 Oct 31, 2024
2c5bf60
Merge branch 'main' into test-house
murilo09 Nov 1, 2024
26a2d60
Merge branch 'main' into test-house
murilo09 Nov 4, 2024
e2e9ddf
fix: reversed houseBidId with accountId on db query
phacUFPE Nov 19, 2024
e717041
Merge branch 'main' into test-house
murilo09 Dec 9, 2024
c36436d
Lua code format - (Stylua)
github-actions[bot] Dec 9, 2024
b4dc46b
fix: files removed by resolving conflicts
murilo09 Dec 9, 2024
e9d6a33
fix ubuntu build
murilo09 Dec 31, 2024
58b3bc2
Merge branch 'main' into test-house
murilo09 Dec 31, 2024
c81cf1a
fix migration version log
murilo09 Dec 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,11 @@ Setting this to false may pose risks; if a house is abandoned and contains a lar
]]
-- Periods: daily/weekly/monthly/yearly/never
-- Base: sqm,rent,sqm+rent
toggleCyclopediaHouseAuction = true
daysToCloseBid = 7
housePriceRentMultiplier = 0.0
housePriceEachSQM = 1000
houseRentPeriod = "never"
houseRentPeriod = "monthly"
houseRentRate = 1.0
houseOwnedByAccount = false
houseBuyLevel = 100
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/10.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 11 (Guilds Balance)")
logger.info("Updating database to version 10 (Guilds Balance)")
db.query("ALTER TABLE `guilds` ADD `balance` bigint(20) UNSIGNED NOT NULL DEFAULT '0';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/11.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 12 (Player get daily reward)")
logger.info("Updating database to version 11 (Player get daily reward)")
db.query("ALTER TABLE `players` ADD `isreward` tinyint(1) NOT NULL DEFAULT 1")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/12.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 13 (Boosted Creature Outfit)")
logger.info("Updating database to version 12 (Boosted Creature Outfit)")
db.query("ALTER TABLE boosted_creature ADD `looktype` int(11) NOT NULL DEFAULT 136;")
db.query("ALTER TABLE boosted_creature ADD `lookfeet` int(11) NOT NULL DEFAULT 0;")
db.query("ALTER TABLE boosted_creature ADD `looklegs` int(11) NOT NULL DEFAULT 0;")
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/13.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 14 (Fixed mana spent)")
logger.info("Updating database to version 13 (Fixed mana spent)")
db.query("ALTER TABLE `players` CHANGE `manaspent` `manaspent` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/14.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 15 (Magic Shield Spell)")
logger.info("Updating database to version 14 (Magic Shield Spell)")
db.query("ALTER TABLE `players` ADD `manashield` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `skill_manaleech_amount`")
db.query("ALTER TABLE `players` ADD `max_manashield` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `manashield`")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/15.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 16 (Rook sample and GOD player values)")
logger.info("Updating database to version 15 (Rook sample and GOD player values)")
-- Rook Sample
db.query("UPDATE `players` SET `maglevel` = 2, `manaspent` = 5936, `skill_club` = 12, `skill_club_tries` = 155, `skill_sword` = 12, `skill_sword_tries` = 155, `skill_axe` = 12, `skill_axe_tries` = 155, `skill_dist` = 12, `skill_dist_tries` = 93 WHERE `id` = 1;")
-- GOD
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/16.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
print("Updating database to version 17 (Tutorial support)")
print("Updating database to version 16 (Tutorial support)")
db.query("ALTER TABLE `players` ADD `istutorial` SMALLINT(1) NOT NULL DEFAULT '0'")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/17.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 18 (Fix guild creation myaac)")
logger.info("Updating database to version 17 (Fix guild creation myaac)")
db.query("ALTER TABLE `guilds` ADD `level` int(11) NOT NULL DEFAULT 1")
db.query("ALTER TABLE `guilds` ADD `points` int(11) NOT NULL DEFAULT 0")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/18.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 19 (Prey system rework + Task hunting system)")
logger.info("Updating database to version 18 (Prey system rework + Task hunting system)")
db.query([[
ALTER TABLE `players`
DROP `prey_stamina_1`,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/19.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 20 (Gamestore accepting Tournament Coins)")
logger.info("Updating database to version 19 (Gamestore accepting Tournament Coins)")

db.query("ALTER TABLE `accounts` ADD `tournament_coins` int(11) NOT NULL DEFAULT 0 AFTER `coins`")
db.query("ALTER TABLE `store_history` ADD `coin_type` tinyint(1) NOT NULL DEFAULT 0 AFTER `description`")
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/2.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 3 (account refactor)")
logger.info("Updating database to version 2 (account refactor)")

db.query([[
LOCK TABLES
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/20.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 21 (Fix market price size)")
logger.info("Updating database to version 20 (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';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/21.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 22 (forge and tier system)")
logger.info("Updating database to version 21 (forge and tier system)")
db.query("ALTER TABLE `market_offers` ADD `tier` tinyint UNSIGNED NOT NULL DEFAULT '0';")
db.query("ALTER TABLE `market_history` ADD `tier` tinyint UNSIGNED NOT NULL DEFAULT '0';")
db.query("ALTER TABLE `players` ADD `forge_dusts` bigint(21) NOT NULL DEFAULT '0';")
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/22.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 23 (fix offline training skill size)")
logger.info("Updating database to version 22 (fix offline training skill size)")
db.query([[
ALTER TABLE `players`
MODIFY offlinetraining_skill tinyint(2) NOT NULL DEFAULT '-1';
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/23.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 24 (forge history)")
logger.info("Updating database to version 23 (forge history)")
db.query([[
CREATE TABLE IF NOT EXISTS `forge_history` (
`id` int NOT NULL AUTO_INCREMENT,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/24.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 25 (random mount outfit window)")
logger.info("Updating database to version 24 (random mount outfit window)")
db.query("ALTER TABLE `players` ADD `randomize_mount` SMALLINT(1) NOT NULL DEFAULT '0'")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/25.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 26 (reward bag fix)")
logger.info("Updating database to version 25 (reward bag fix)")
db.query("UPDATE player_rewards SET pid = 0 WHERE itemtype = 19202;")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/26.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 27 (towns)")
logger.info("Updating database to version 26 (towns)")

db.query([[
CREATE TABLE IF NOT EXISTS `towns` (
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/27.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 28 (bosstiary system)")
logger.info("Updating database to version 27 (bosstiary system)")
db.query("ALTER TABLE `players` ADD `boss_points` int NOT NULL DEFAULT '0';")
db.query([[
CREATE TABLE IF NOT EXISTS `boosted_boss` (
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/28.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 29 (transfer coins)")
logger.info("Updating database to version 28 (transfer coins)")
db.query("ALTER TABLE `accounts` ADD `coins_transferable` int unsigned NOT NULL DEFAULT '0';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/29.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 30 (looktypeEx)")
logger.info("Updating database to version 29 (looktypeEx)")
db.query("ALTER TABLE `boosted_boss` ADD `looktypeEx` int unsigned NOT NULL DEFAULT '0';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/3.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 4 (prey tick)")
logger.info("Updating database to version 3 (prey tick)")

db.query([[
ALTER TABLE `prey_slots`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/30.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 31 (loyalty)")
logger.info("Updating database to version 30 (loyalty)")
db.query([[
ALTER TABLE `accounts` ADD COLUMN `premdays_purchased` int(11) NOT NULL DEFAULT 0;
]])
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/31.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 32 (account_sessions)")
logger.info("Updating database to version 31 (account_sessions)")
db.query([[
CREATE TABLE IF NOT EXISTS `account_sessions` (
`id` VARCHAR(191) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/32.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 33 (wheel of destiny)")
logger.info("Updating database to version 32 (wheel of destiny)")
db.query([[
CREATE TABLE IF NOT EXISTS `player_wheeldata` (
`player_id` int(11) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/33.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 34 (add primary keys)")
logger.info("Updating database to version 33 (add primary keys)")
db.query([[
ALTER TABLE `player_prey`
ADD PRIMARY KEY (`player_id`, `slot`);
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/34.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 35 (bosstiary tracker)")
logger.info("Updating database to version 34 (bosstiary tracker)")
db.query("ALTER TABLE `player_bosstiary` ADD `tracker` blob NOT NULL;")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/35.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 36 (fix account premdays and lastday)")
logger.info("Updating database to version 35 (fix account premdays and lastday)")

local resultQuery = db.storeQuery("SELECT `id`, `premdays`, `lastday` FROM `accounts` WHERE (`premdays` > 0 OR `lastday` > 0) AND `lastday` <= " .. os.time())
if resultQuery ~= false then
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/36.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 37 (add coin_type to accounts)")
logger.info("Updating database to version 36 (add coin_type to accounts)")
db.query("ALTER TABLE `coins_transactions` ADD `coin_type` tinyint(1) UNSIGNED NOT NULL DEFAULT '1';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/37.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 38 (add pronoun to players)")
logger.info("Updating database to version 37 (add pronoun to players)")
db.query("ALTER TABLE `players` ADD `pronoun` int(11) NOT NULL DEFAULT '0';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/38.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 39 (create kv store)")
logger.info("Updating database to version 38 (create kv store)")
db.query([[
CREATE TABLE IF NOT EXISTS `kv_store` (
`key_name` varchar(191) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/39.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 40 (house transfer ownership on startup)")
logger.info("Updating database to version 39 (house transfer ownership on startup)")
db.query("ALTER TABLE `houses` ADD `new_owner` int(11) NOT NULL DEFAULT '-1';")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/4.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 5 (boosted creature)")
logger.info("Updating database to version 4 (boosted creature)")
db.query([[CREATE TABLE IF NOT EXISTS `boosted_creature` (
`boostname` TEXT,
`date` varchar(250) NOT NULL DEFAULT '',
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/40.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 41 (optimize house_lists)")
logger.info("Updating database to version 40 (optimize house_lists)")

db.query([[
ALTER TABLE `house_lists`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/41.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 42 (fix xpboost types)")
logger.info("Updating database to version 41 (fix xpboost types)")

db.query([[
ALTER TABLE `players`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/42.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 43 (fix guildwar_kills_unique)")
logger.info("Updating database to version 42 (fix guildwar_kills_unique)")

db.query([[
ALTER TABLE `guildwar_kills`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/43.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 44 (feat frags_limit, payment and duration_days in guild wars)")
logger.info("Updating database to version 43 (feat frags_limit, payment and duration_days in guild wars)")

db.query([[
ALTER TABLE `guild_wars`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/44.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 45 (fix: mana shield column size for more than 65k)")
logger.info("Updating database to version 44 (fix: mana shield column size for more than 65k)")

db.query([[
ALTER TABLE `players`
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/45.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 46 (feat: vip groups)")
logger.info("Updating database to version 45 (feat: vip groups)")

db.query([[
CREATE TABLE IF NOT EXISTS `account_vipgroups` (
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/46.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 47 (fix: creature speed and conditions)")
logger.info("Updating database to version 46 (fix: creature speed and conditions)")

db.query("ALTER TABLE `players` MODIFY `conditions` mediumblob NOT NULL;")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/47.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 46 (hireling)")
logger.info("Updating database to version 47 (hireling)")

db.query([[
CREATE TABLE IF NOT EXISTS `player_hirelings` (
Expand Down
27 changes: 27 additions & 0 deletions data-otservbr-global/migrations/48.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function onUpdateDatabase()
logger.info("Updating database to version 48 (House Auction)")

db.query([[
ALTER TABLE `houses`
DROP `bid`,
DROP `bid_end`,
DROP `last_bid`,
DROP `highest_bidder`
]])

db.query([[
ALTER TABLE `houses`
ADD `bidder` int(11) NOT NULL DEFAULT '0',
ADD `bidder_name` varchar(255) NOT NULL DEFAULT '',
ADD `highest_bid` int(11) NOT NULL DEFAULT '0',
ADD `internal_bid` int(11) NOT NULL DEFAULT '0',
ADD `bid_end_date` int(11) NOT NULL DEFAULT '0',
ADD `state` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
ADD `transfer_status` tinyint(1) DEFAULT '0'
]])

db.query([[
ALTER TABLE `accounts`
ADD `house_bid_id` int(11) NOT NULL DEFAULT '0'
]])
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/5.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 6 (quickloot)")
logger.info("Updating database to version 5 (quickloot)")
db.query("ALTER TABLE `players` ADD `quickloot_fallback` TINYINT DEFAULT 0")
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/6.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 7 (Stash supply)")
logger.info("Updating database to version 6 (Stash supply)")
db.query([[CREATE TABLE IF NOT EXISTS `player_stash` (
`player_id` INT(16) NOT NULL,
`item_id` INT(16) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/7.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function onUpdateDatabase()
logger.info("Updating database to version 8 (recruiter system)")
logger.info("Updating database to version 7 (recruiter system)")
db.query("ALTER TABLE `accounts` ADD `recruiter` INT(6) DEFAULT 0")
end
53 changes: 27 additions & 26 deletions data-otservbr-global/migrations/8.lua
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
function onUpdateDatabase()
logger.info("Updating database to version 9 (Bestiary cpp)")
logger.info("Updating database to version 8 (Bestiary cpp)")
db.query([[CREATE TABLE IF NOT EXISTS `player_charms` (
`player_guid` INT(250) NOT NULL ,
`charm_points` VARCHAR(250) NULL ,
`charm_expansion` BOOLEAN NULL ,
`rune_wound` INT(250) NULL ,
`rune_enflame` INT(250) NULL ,
`rune_poison` INT(250) NULL ,
`rune_freeze` INT(250) NULL ,
`rune_zap` INT(250) NULL ,
`rune_curse` INT(250) NULL ,
`rune_cripple` INT(250) NULL ,
`rune_parry` INT(250) NULL ,
`rune_dodge` INT(250) NULL ,
`rune_adrenaline` INT(250) NULL ,
`rune_numb` INT(250) NULL,
`rune_cleanse` INT(250) NULL ,
`rune_bless` INT(250) NULL ,
`rune_scavenge` INT(250) NULL ,
`rune_gut` INT(250) NULL ,
`rune_low_blow` INT(250) NULL ,
`rune_divine` INT(250) NULL ,
`rune_vamp` INT(250) NULL ,
`rune_void` INT(250) NULL ,
`UsedRunesBit` VARCHAR(250) NULL ,
`UnlockedRunesBit` VARCHAR(250) NULL,
`tracker list` BLOB NULL ) ENGINE = InnoDB DEFAULT CHARSET=utf8;]])
`player_guid` INT(250) NOT NULL ,
`charm_points` VARCHAR(250) NULL ,
`charm_expansion` BOOLEAN NULL ,
`rune_wound` INT(250) NULL ,
`rune_enflame` INT(250) NULL ,
`rune_poison` INT(250) NULL ,
`rune_freeze` INT(250) NULL ,
`rune_zap` INT(250) NULL ,
`rune_curse` INT(250) NULL ,
`rune_cripple` INT(250) NULL ,
`rune_parry` INT(250) NULL ,
`rune_dodge` INT(250) NULL ,
`rune_adrenaline` INT(250) NULL ,
`rune_numb` INT(250) NULL,
`rune_cleanse` INT(250) NULL ,
`rune_bless` INT(250) NULL ,
`rune_scavenge` INT(250) NULL ,
`rune_gut` INT(250) NULL ,
`rune_low_blow` INT(250) NULL ,
`rune_divine` INT(250) NULL ,
`rune_vamp` INT(250) NULL ,
`rune_void` INT(250) NULL ,
`UsedRunesBit` VARCHAR(250) NULL ,
`UnlockedRunesBit` VARCHAR(250) NULL,
`tracker list` BLOB NULL ) ENGINE = InnoDB DEFAULT CHARSET=utf8;
]])
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/9.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 10 (Mount Colors and familiars)")
logger.info("Updating database to version 9 (Mount Colors and familiars)")
db.query("ALTER TABLE `players` ADD `lookmountbody` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookmountfeet` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookmounthead` tinyint(3) unsigned NOT NULL DEFAULT '0'")
Expand Down
Loading
Loading