Skip to content

Commit

Permalink
refactor: concoctions to core (opentibiabr#2769)
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires authored Jul 26, 2024
1 parent 7a14bad commit c6d5eb1
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 87 deletions.
85 changes: 0 additions & 85 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2717,91 +2717,6 @@ Storage = {
TibiorasBox = 63977,
},

-- Reserved storage from 64000 - 64099
TibiaDrome = {
-- General Upgrades
BestiaryBetterment = {
TimeLeft = 64000,
LastActivatedAt = 64001,
},
CharmUpgrade = {
TimeLeft = 64002,
LastActivatedAt = 64003,
},
KooldownAid = {
LastActivatedAt = 64005,
},
StaminaExtension = {
LastActivatedAt = 64007,
},
StrikeEnhancement = {
TimeLeft = 64008,
LastActivatedAt = 64009,
},
WealthDuplex = {
TimeLeft = 64010,
LastActivatedAt = 64011,
},
-- Resilience
FireResilience = {
TimeLeft = 64012,
LastActivatedAt = 64013,
},
IceResilience = {
TimeLeft = 64014,
LastActivatedAt = 64015,
},
EarthResilience = {
TimeLeft = 64016,
LastActivatedAt = 64017,
},
EnergyResilience = {
TimeLeft = 64018,
LastActivatedAt = 64019,
},
HolyResilience = {
TimeLeft = 64020,
LastActivatedAt = 64021,
},
DeathResilience = {
TimeLeft = 64022,
LastActivatedAt = 64023,
},
PhysicalResilience = {
TimeLeft = 64024,
LastActivatedAt = 64025,
},
-- Amplifications
FireAmplification = {
TimeLeft = 64026,
LastActivatedAt = 64027,
},
IceAmplification = {
TimeLeft = 64028,
LastActivatedAt = 64029,
},
EarthAmplification = {
TimeLeft = 64030,
LastActivatedAt = 64031,
},
EnergyAmplification = {
TimeLeft = 64032,
LastActivatedAt = 64033,
},
HolyAmplification = {
TimeLeft = 64034,
LastActivatedAt = 64035,
},
DeathAmplification = {
TimeLeft = 64036,
LastActivatedAt = 64037,
},
PhysicalAmplification = {
TimeLeft = 64038,
LastActivatedAt = 64039,
},
},

VipSystem = {
OnlineCoinsGain = 150002,
OnlineTokensGain = 150003,
Expand Down
85 changes: 85 additions & 0 deletions data/libs/core/global_storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,90 @@ Global = {
FamiliarSummonEvent10 = 30054,
FamiliarSummonEvent60 = 30055,
CobraFlask = 30056,

-- Reserved storage from 64000 - 64099
TibiaDrome = {
-- General Upgrades
BestiaryBetterment = {
TimeLeft = 64000,
LastActivatedAt = 64001,
},
CharmUpgrade = {
TimeLeft = 64002,
LastActivatedAt = 64003,
},
KooldownAid = {
LastActivatedAt = 64005,
},
StaminaExtension = {
LastActivatedAt = 64007,
},
StrikeEnhancement = {
TimeLeft = 64008,
LastActivatedAt = 64009,
},
WealthDuplex = {
TimeLeft = 64010,
LastActivatedAt = 64011,
},
-- Resilience
FireResilience = {
TimeLeft = 64012,
LastActivatedAt = 64013,
},
IceResilience = {
TimeLeft = 64014,
LastActivatedAt = 64015,
},
EarthResilience = {
TimeLeft = 64016,
LastActivatedAt = 64017,
},
EnergyResilience = {
TimeLeft = 64018,
LastActivatedAt = 64019,
},
HolyResilience = {
TimeLeft = 64020,
LastActivatedAt = 64021,
},
DeathResilience = {
TimeLeft = 64022,
LastActivatedAt = 64023,
},
PhysicalResilience = {
TimeLeft = 64024,
LastActivatedAt = 64025,
},
-- Amplifications
FireAmplification = {
TimeLeft = 64026,
LastActivatedAt = 64027,
},
IceAmplification = {
TimeLeft = 64028,
LastActivatedAt = 64029,
},
EarthAmplification = {
TimeLeft = 64030,
LastActivatedAt = 64031,
},
EnergyAmplification = {
TimeLeft = 64032,
LastActivatedAt = 64033,
},
HolyAmplification = {
TimeLeft = 64034,
LastActivatedAt = 64035,
},
DeathAmplification = {
TimeLeft = 64036,
LastActivatedAt = 64037,
},
PhysicalAmplification = {
TimeLeft = 64038,
LastActivatedAt = 64039,
},
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ local configs = {
for concoctionKey, concoctionId in pairs(Concoction.Ids) do
Concoction.new({
id = concoctionId,
timeLeftStorage = Storage.TibiaDrome[concoctionKey].TimeLeft,
lastActivatedAtStorage = Storage.TibiaDrome[concoctionKey].LastActivatedAt,
timeLeftStorage = Global.Storage.TibiaDrome[concoctionKey].TimeLeft,
lastActivatedAtStorage = Global.Storage.TibiaDrome[concoctionKey].LastActivatedAt,
config = configs[concoctionId] or {},
}):register()
end
Expand Down

0 comments on commit c6d5eb1

Please sign in to comment.