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

fix: minor console errors #2271

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local config = {
pos = Position(33497, 32196, 7),
herbId = 5953,
herbWeight = 1,
storage = ThreatenedDreams.Mission03.RavenHerbTimer,
storage = Storage.Quest.U11_40.ThreatenedDreams.Mission03.RavenHerbTimer,
}

local createRavenHerb = GlobalEvent("createRavenHerb")
Expand Down Expand Up @@ -55,5 +55,5 @@ function ravenHerb.onUse(player, item, fromPosition, target, toPosition, isHotke
return true
end

ravenHerb:aid(ThreatenedDreams.Mission03.RavenHerbTimer)
ravenHerb:id(25783)
ravenHerb:register()
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ local npcSpawns = {

local spawnsNpcByTime = GlobalEvent("SpawnsNpcByTime")

function spawnsByTimeEvent.onPeriodChange(period)
function spawnsNpcByTime.onPeriodChange(period)
for _, npcSpawn in ipairs(npcSpawns) do
if npcSpawn.spawnPeriod == period then
local spawnNpc = Game.createNpc(npcSpawn.name, npcSpawn.position)
if spawnNpc then
spawnNpc:setMasterPos(npcSpawn.position)
npcSpawn.position:sendMagicEffect(CONST_ME_TELEPORT)
logger.info("[NPC Spawn] {} has spawned", npcSpawn.name)
spawnNpc:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
end
elseif npcSpawn.despawnPeriod == period then
local despawnNpc = Npc(npcSpawn.name)
if despawnNpc then
despawnNpc:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
despawnNpc:remove()
logger.info("[NPC Despawn] {} has despawned", npcSpawn.name)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion data/libs/core/global_storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Global = {
Storage = {
FamiliarSummonEvent10 = 30054,
FamiliarSummonEvent60 = 30055,
CobraFlask = 30055,
CobraFlask = 30056,
},
}
Loading