forked from opentibiabr/canary
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0d02c6
commit a364162
Showing
4 changed files
with
28 additions
and
38 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
28 changes: 28 additions & 0 deletions
28
...r-global/scripts/game_migrations/20241711122214_golden_and_royal_outfit_to_kv_storage.lua
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,28 @@ | ||
local function migrateGoldenOutfit(player) | ||
local goldeOutfitStorageValue = 51015 | ||
local value = player:getStorageValue(goldeOutfitStorageValue) | ||
|
||
if value > 0 then | ||
player:kv():set("golden-outfit-quest", value) | ||
player:setStorageValue(goldeOutfitStorageValue, -1) | ||
end | ||
end | ||
|
||
local function migrateRoyalCostumeOutfit(player) | ||
local royalCostumeStorageValue = 51026 | ||
local value = player:getStorageValue(royalCostumeStorageValue) | ||
|
||
if value > 0 then | ||
player:kv():set("royal-costume-outfit-quest", value) | ||
player:setStorageValue(royalCostumeStorageValue, -1) | ||
end | ||
end | ||
|
||
local migration = Migration("20241711122214_golden_and_royal_outfit_to_kv_storage") | ||
|
||
function migration:onExecute() | ||
self:forEachPlayer(migrateGoldenOutfit) | ||
self:forEachPlayer(migrateRoyalCostumeOutfit) | ||
end | ||
|
||
migration:register() |
17 changes: 0 additions & 17 deletions
17
data-otservbr-global/scripts/game_migrations/20241711122214_golden_outfit_to_kv.lua
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
data-otservbr-global/scripts/game_migrations/20241711128698_royal_costume_outfit_to_kv.lua
This file was deleted.
Oops, something went wrong.