Skip to content

Commit

Permalink
improve: remove empty monsters callbacks and register setReward in mo…
Browse files Browse the repository at this point in the history
…nster lib

Removed empty callbacks and move the "setRewardBoss" function to the "monster type" lib.

This centralizes the call in one place, facilitating maintenance and reducing overhead.
  • Loading branch information
dudantas committed Nov 7, 2024
1 parent 1d9d886 commit 341125b
Show file tree
Hide file tree
Showing 219 changed files with 195 additions and 2,882 deletions.
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/apocalypse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/apprentice_sheng.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/bazir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/black_knight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/bullwark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/custodian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/dharalion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-canary/monster/bosses/shadowpelt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/alchemist_container.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/antenna.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/apocalypse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/apprentice_sheng.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/armenius.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/bazir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/bibby_bloodbath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/big_boss_trolliver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/black_knight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/brain_head.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,4 @@ monster.voices = {
{ text = "My lich-knights will conquer this world for me!", yell = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/bullwark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/cerebellum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,4 @@ monster.voices = {
{ text = "My lich-knights will conquer this world for me!", yell = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
14 changes: 0 additions & 14 deletions data-otservbr-global/monster/bosses/chikhaton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
Loading

0 comments on commit 341125b

Please sign in to comment.