-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
0f49b47
commit e8b5bef
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
data-otservbr-global/scripts/game_migrations/20241711122214_golden_outfit_to_kv.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,17 @@ | ||
local migration = Migration("20241711122214_golden_outfit_to_kv_storage") | ||
|
||
local function migrateGoldenOutfit(player) | ||
local goldeOutfitStorageValue = 51015 | ||
local value = player:getPlayerStorageValue(goldeOutfitStorageValue) | ||
|
||
if value > 0 then | ||
player:kv():set("golden-outfit-quest", value) | ||
player:setPlayerStorageValue(goldeOutfitStorageValue, -1) | ||
end | ||
end | ||
|
||
function migration:onExecute() | ||
self:forEachPlayer(migrateGoldenOutfit) | ||
end | ||
|
||
migration:register() |
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