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: gem atelier drop loot #2152

Merged
merged 1 commit into from
Jan 27, 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
1 change: 0 additions & 1 deletion data/libs/functions/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ function Player.sendWeatherEffect(self, groundEffect, fallEffect, thunderEffect)
if topCreature and topCreature:isPlayer() and topCreature:getAccountType() < ACCOUNT_TYPE_SENIORTUTOR then
position:sendMagicEffect(CONST_ME_BIGCLOUDS, self)
doTargetCombatHealth(0, self, COMBAT_ENERGYDAMAGE, -weatherConfig.minDMG, -weatherConfig.maxDMG, CONST_ME_NONE)
--self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You were hit by lightning and lost some health.")
end
end
end
Expand Down
14 changes: 14 additions & 0 deletions data/scripts/eventcallbacks/monster/ondroploot_gem_atelier.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local callback = EventCallback()

function callback.monsterOnDropLoot(monster, corpse)
if not monster or not corpse then
return
end
local player = Player(corpse:getCorpseOwner())
if not player or not player:canReceiveLoot() then
return
end
corpse:addLoot(monster:generateGemAtelierLoot())
end

callback:register()
3 changes: 2 additions & 1 deletion data/scripts/reward_chest/boss_death.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ function bossDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUn
rolls = math.floor(rolls)
end

local playerLoot = monsterType:getBossReward(lootFactor, _ == 1, false, {})
local playerLoot = creature:generateGemAtelierLoot()
playerLoot = monsterType:getBossReward(lootFactor, _ == 1, false, playerLoot)
for _ = 2, rolls do
playerLoot = monsterType:getBossReward(lootFactor, false, true, playerLoot)
end
Expand Down
2 changes: 1 addition & 1 deletion data/scripts/talkactions/god/zones.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function zones.onSay(player, words, param)
local params = string.split(param, ",")
local cmd = params[1]
if not cmd then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command not found.")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Command not found.")
return true
end

Expand Down
Loading