diff --git a/data-canary/monster/bosses/apocalypse.lua b/data-canary/monster/bosses/apocalypse.lua
index fba0ab1613a..47957c3ceab 100644
--- a/data-canary/monster/bosses/apocalypse.lua
+++ b/data-canary/monster/bosses/apocalypse.lua
@@ -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)
diff --git a/data-canary/monster/bosses/apprentice_sheng.lua b/data-canary/monster/bosses/apprentice_sheng.lua
index 5e16a274500..07eeb42917a 100644
--- a/data-canary/monster/bosses/apprentice_sheng.lua
+++ b/data-canary/monster/bosses/apprentice_sheng.lua
@@ -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)
diff --git a/data-canary/monster/bosses/bazir.lua b/data-canary/monster/bosses/bazir.lua
index 6c4a6eeccb5..353c392a3b0 100644
--- a/data-canary/monster/bosses/bazir.lua
+++ b/data-canary/monster/bosses/bazir.lua
@@ -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)
diff --git a/data-canary/monster/bosses/black_knight.lua b/data-canary/monster/bosses/black_knight.lua
index 1ca457b449e..fd9ff673ab4 100644
--- a/data-canary/monster/bosses/black_knight.lua
+++ b/data-canary/monster/bosses/black_knight.lua
@@ -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)
diff --git a/data-canary/monster/bosses/bullwark.lua b/data-canary/monster/bosses/bullwark.lua
index 7674d1dec01..1aa7974cfa0 100644
--- a/data-canary/monster/bosses/bullwark.lua
+++ b/data-canary/monster/bosses/bullwark.lua
@@ -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)
diff --git a/data-canary/monster/bosses/custodian.lua b/data-canary/monster/bosses/custodian.lua
index 21b9721d6a8..cf2d0c1fdf4 100644
--- a/data-canary/monster/bosses/custodian.lua
+++ b/data-canary/monster/bosses/custodian.lua
@@ -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)
diff --git a/data-canary/monster/bosses/dharalion.lua b/data-canary/monster/bosses/dharalion.lua
index 3f86d4a5269..3d3cb689684 100644
--- a/data-canary/monster/bosses/dharalion.lua
+++ b/data-canary/monster/bosses/dharalion.lua
@@ -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)
diff --git a/data-canary/monster/bosses/shadowpelt.lua b/data-canary/monster/bosses/shadowpelt.lua
index 16fb1e60256..dcae734c0d3 100644
--- a/data-canary/monster/bosses/shadowpelt.lua
+++ b/data-canary/monster/bosses/shadowpelt.lua
@@ -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)
diff --git a/data-otservbr-global/migrations/46.lua b/data-otservbr-global/migrations/46.lua
index 86a6d8ffec1..506da3a132b 100644
--- a/data-otservbr-global/migrations/46.lua
+++ b/data-otservbr-global/migrations/46.lua
@@ -1,3 +1,7 @@
function onUpdateDatabase()
- return false -- true = There are others migrations file | false = this is the last migration file
+ logger.info("Updating database to version 47 (fix: creature speed and conditions)")
+
+ db.query("ALTER TABLE `players` MODIFY `conditions` mediumblob NOT NULL;")
+
+ return true
end
diff --git a/data-otservbr-global/migrations/47.lua b/data-otservbr-global/migrations/47.lua
new file mode 100644
index 00000000000..86a6d8ffec1
--- /dev/null
+++ b/data-otservbr-global/migrations/47.lua
@@ -0,0 +1,3 @@
+function onUpdateDatabase()
+ return false -- true = There are others migrations file | false = this is the last migration file
+end
diff --git a/data-otservbr-global/monster/bosses/alchemist_container.lua b/data-otservbr-global/monster/bosses/alchemist_container.lua
index 62905d5975e..5a15740a4f3 100644
--- a/data-otservbr-global/monster/bosses/alchemist_container.lua
+++ b/data-otservbr-global/monster/bosses/alchemist_container.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/antenna.lua b/data-otservbr-global/monster/bosses/antenna.lua
index f1a165177cc..127d9fe77bf 100644
--- a/data-otservbr-global/monster/bosses/antenna.lua
+++ b/data-otservbr-global/monster/bosses/antenna.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/apocalypse.lua b/data-otservbr-global/monster/bosses/apocalypse.lua
index 3e60fe75e34..422ebf84059 100644
--- a/data-otservbr-global/monster/bosses/apocalypse.lua
+++ b/data-otservbr-global/monster/bosses/apocalypse.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/apprentice_sheng.lua b/data-otservbr-global/monster/bosses/apprentice_sheng.lua
index f0c6feacd95..b5d326f94a2 100644
--- a/data-otservbr-global/monster/bosses/apprentice_sheng.lua
+++ b/data-otservbr-global/monster/bosses/apprentice_sheng.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/armenius.lua b/data-otservbr-global/monster/bosses/armenius.lua
index ffe6c7b412e..b80f2ff3b06 100644
--- a/data-otservbr-global/monster/bosses/armenius.lua
+++ b/data-otservbr-global/monster/bosses/armenius.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/bazir.lua b/data-otservbr-global/monster/bosses/bazir.lua
index e9abbed723c..f9aa138933b 100644
--- a/data-otservbr-global/monster/bosses/bazir.lua
+++ b/data-otservbr-global/monster/bosses/bazir.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/bibby_bloodbath.lua b/data-otservbr-global/monster/bosses/bibby_bloodbath.lua
index 8c1b09af2b5..d16b2f287d9 100644
--- a/data-otservbr-global/monster/bosses/bibby_bloodbath.lua
+++ b/data-otservbr-global/monster/bosses/bibby_bloodbath.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/big_boss_trolliver.lua b/data-otservbr-global/monster/bosses/big_boss_trolliver.lua
index 24bc4ef5250..187b8e05d92 100644
--- a/data-otservbr-global/monster/bosses/big_boss_trolliver.lua
+++ b/data-otservbr-global/monster/bosses/big_boss_trolliver.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/black_knight.lua b/data-otservbr-global/monster/bosses/black_knight.lua
index 2905e1a7814..359ef3e2d5b 100644
--- a/data-otservbr-global/monster/bosses/black_knight.lua
+++ b/data-otservbr-global/monster/bosses/black_knight.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/brain_head.lua b/data-otservbr-global/monster/bosses/brain_head.lua
index c67524c5411..0c8b59b4a4a 100644
--- a/data-otservbr-global/monster/bosses/brain_head.lua
+++ b/data-otservbr-global/monster/bosses/brain_head.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/bullwark.lua b/data-otservbr-global/monster/bosses/bullwark.lua
index 2bc9ff91f02..2ae627598c9 100644
--- a/data-otservbr-global/monster/bosses/bullwark.lua
+++ b/data-otservbr-global/monster/bosses/bullwark.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/cerebellum.lua b/data-otservbr-global/monster/bosses/cerebellum.lua
index b83fcec8615..5ca05351efb 100644
--- a/data-otservbr-global/monster/bosses/cerebellum.lua
+++ b/data-otservbr-global/monster/bosses/cerebellum.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/chikhaton.lua b/data-otservbr-global/monster/bosses/chikhaton.lua
index 53a430621ca..63b5629431c 100644
--- a/data-otservbr-global/monster/bosses/chikhaton.lua
+++ b/data-otservbr-global/monster/bosses/chikhaton.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/clubarc_the_plunderer.lua b/data-otservbr-global/monster/bosses/clubarc_the_plunderer.lua
index aa10611af90..d2e7ca6c29f 100644
--- a/data-otservbr-global/monster/bosses/clubarc_the_plunderer.lua
+++ b/data-otservbr-global/monster/bosses/clubarc_the_plunderer.lua
@@ -108,18 +108,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)
diff --git a/data-otservbr-global/monster/bosses/custodian.lua b/data-otservbr-global/monster/bosses/custodian.lua
index d004ab5c3df..2a2e414d3d9 100644
--- a/data-otservbr-global/monster/bosses/custodian.lua
+++ b/data-otservbr-global/monster/bosses/custodian.lua
@@ -113,18 +113,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)
diff --git a/data-otservbr-global/monster/bosses/dharalion.lua b/data-otservbr-global/monster/bosses/dharalion.lua
index 3233e57448b..9268919df94 100644
--- a/data-otservbr-global/monster/bosses/dharalion.lua
+++ b/data-otservbr-global/monster/bosses/dharalion.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/bosses/diblis_the_fair.lua b/data-otservbr-global/monster/bosses/diblis_the_fair.lua
index 531dc6c2818..585fb0eff0a 100644
--- a/data-otservbr-global/monster/bosses/diblis_the_fair.lua
+++ b/data-otservbr-global/monster/bosses/diblis_the_fair.lua
@@ -123,18 +123,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)
diff --git a/data-otservbr-global/monster/bosses/diseased_bill.lua b/data-otservbr-global/monster/bosses/diseased_bill.lua
index 42df3b5c771..bc6babe9171 100644
--- a/data-otservbr-global/monster/bosses/diseased_bill.lua
+++ b/data-otservbr-global/monster/bosses/diseased_bill.lua
@@ -114,18 +114,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)
diff --git a/data-otservbr-global/monster/bosses/diseased_dan.lua b/data-otservbr-global/monster/bosses/diseased_dan.lua
index c44f9bc9702..f3b0de85388 100644
--- a/data-otservbr-global/monster/bosses/diseased_dan.lua
+++ b/data-otservbr-global/monster/bosses/diseased_dan.lua
@@ -114,18 +114,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)
diff --git a/data-otservbr-global/monster/bosses/diseased_fred.lua b/data-otservbr-global/monster/bosses/diseased_fred.lua
index 59304042e5c..41994a777ea 100644
--- a/data-otservbr-global/monster/bosses/diseased_fred.lua
+++ b/data-otservbr-global/monster/bosses/diseased_fred.lua
@@ -114,18 +114,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)
diff --git a/data-otservbr-global/monster/bosses/doctor_marrow.lua b/data-otservbr-global/monster/bosses/doctor_marrow.lua
index cccdd2e4d57..cd694d83b62 100644
--- a/data-otservbr-global/monster/bosses/doctor_marrow.lua
+++ b/data-otservbr-global/monster/bosses/doctor_marrow.lua
@@ -98,18 +98,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)
diff --git a/data-otservbr-global/monster/bosses/ekatrix.lua b/data-otservbr-global/monster/bosses/ekatrix.lua
index 99c7fc0f603..42500ee134f 100644
--- a/data-otservbr-global/monster/bosses/ekatrix.lua
+++ b/data-otservbr-global/monster/bosses/ekatrix.lua
@@ -111,18 +111,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)
diff --git a/data-otservbr-global/monster/bosses/energized_raging_mage.lua b/data-otservbr-global/monster/bosses/energized_raging_mage.lua
index 0d3aea8aaf0..643ea7428a3 100644
--- a/data-otservbr-global/monster/bosses/energized_raging_mage.lua
+++ b/data-otservbr-global/monster/bosses/energized_raging_mage.lua
@@ -115,18 +115,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)
diff --git a/data-otservbr-global/monster/bosses/fleshslicer.lua b/data-otservbr-global/monster/bosses/fleshslicer.lua
index 53aafc0fd31..7308101c0d4 100644
--- a/data-otservbr-global/monster/bosses/fleshslicer.lua
+++ b/data-otservbr-global/monster/bosses/fleshslicer.lua
@@ -99,18 +99,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)
diff --git a/data-otservbr-global/monster/bosses/freegoiz.lua b/data-otservbr-global/monster/bosses/freegoiz.lua
index eee6234add3..8f2ad6839b3 100644
--- a/data-otservbr-global/monster/bosses/freegoiz.lua
+++ b/data-otservbr-global/monster/bosses/freegoiz.lua
@@ -167,18 +167,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)
diff --git a/data-otservbr-global/monster/bosses/gaffir.lua b/data-otservbr-global/monster/bosses/gaffir.lua
index a3e2feb16a6..a51115cb094 100644
--- a/data-otservbr-global/monster/bosses/gaffir.lua
+++ b/data-otservbr-global/monster/bosses/gaffir.lua
@@ -141,18 +141,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)
diff --git a/data-otservbr-global/monster/bosses/general_murius.lua b/data-otservbr-global/monster/bosses/general_murius.lua
index 4c761e0b89f..f3cf1837f0f 100644
--- a/data-otservbr-global/monster/bosses/general_murius.lua
+++ b/data-otservbr-global/monster/bosses/general_murius.lua
@@ -129,18 +129,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)
diff --git a/data-otservbr-global/monster/bosses/glitterscale.lua b/data-otservbr-global/monster/bosses/glitterscale.lua
index 0705a895176..c14fae7f785 100644
--- a/data-otservbr-global/monster/bosses/glitterscale.lua
+++ b/data-otservbr-global/monster/bosses/glitterscale.lua
@@ -101,18 +101,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)
diff --git a/data-otservbr-global/monster/bosses/grandfather_tridian.lua b/data-otservbr-global/monster/bosses/grandfather_tridian.lua
index 6c2f0e9f188..3d58c8d768d 100644
--- a/data-otservbr-global/monster/bosses/grandfather_tridian.lua
+++ b/data-otservbr-global/monster/bosses/grandfather_tridian.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua
index 442c014dcbb..53ed2381c4f 100644
--- a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua
+++ b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua
@@ -121,18 +121,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)
diff --git a/data-otservbr-global/monster/bosses/groam.lua b/data-otservbr-global/monster/bosses/groam.lua
index e010d50e708..8e9e56a2c5f 100644
--- a/data-otservbr-global/monster/bosses/groam.lua
+++ b/data-otservbr-global/monster/bosses/groam.lua
@@ -109,18 +109,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)
diff --git a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua
index 479757ca620..85507170974 100644
--- a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua
+++ b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/hairman_the_huge.lua b/data-otservbr-global/monster/bosses/hairman_the_huge.lua
index 735c1b3b263..5b0aa24de1d 100644
--- a/data-otservbr-global/monster/bosses/hairman_the_huge.lua
+++ b/data-otservbr-global/monster/bosses/hairman_the_huge.lua
@@ -107,18 +107,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)
diff --git a/data-otservbr-global/monster/bosses/heoni.lua b/data-otservbr-global/monster/bosses/heoni.lua
index b5e9cfdcfd3..9f099de756d 100644
--- a/data-otservbr-global/monster/bosses/heoni.lua
+++ b/data-otservbr-global/monster/bosses/heoni.lua
@@ -105,18 +105,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)
diff --git a/data-otservbr-global/monster/bosses/incredibly_old_witch.lua b/data-otservbr-global/monster/bosses/incredibly_old_witch.lua
index 8680042f7ca..4cd69a5fef2 100644
--- a/data-otservbr-global/monster/bosses/incredibly_old_witch.lua
+++ b/data-otservbr-global/monster/bosses/incredibly_old_witch.lua
@@ -104,18 +104,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)
diff --git a/data-otservbr-global/monster/bosses/infernatil.lua b/data-otservbr-global/monster/bosses/infernatil.lua
index c7ca8c53050..0a493c91177 100644
--- a/data-otservbr-global/monster/bosses/infernatil.lua
+++ b/data-otservbr-global/monster/bosses/infernatil.lua
@@ -176,18 +176,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)
diff --git a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua
index e0b1c5e1ecc..ff6cc6e8654 100644
--- a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua
+++ b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/kraknaknork's_demon.lua b/data-otservbr-global/monster/bosses/kraknaknork's_demon.lua
index 8902bd9e527..a1579035a6f 100644
--- a/data-otservbr-global/monster/bosses/kraknaknork's_demon.lua
+++ b/data-otservbr-global/monster/bosses/kraknaknork's_demon.lua
@@ -97,18 +97,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)
diff --git a/data-otservbr-global/monster/bosses/kraknaknork.lua b/data-otservbr-global/monster/bosses/kraknaknork.lua
index 2bb4eb32b4a..c639a0c8bfd 100644
--- a/data-otservbr-global/monster/bosses/kraknaknork.lua
+++ b/data-otservbr-global/monster/bosses/kraknaknork.lua
@@ -112,14 +112,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onThink = function(monster, interval) end
-
-mType.onAppear = function(monster, creature) 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)
diff --git a/data-otservbr-global/monster/bosses/kroazur.lua b/data-otservbr-global/monster/bosses/kroazur.lua
index 1664c14347a..ea38b19db8f 100644
--- a/data-otservbr-global/monster/bosses/kroazur.lua
+++ b/data-otservbr-global/monster/bosses/kroazur.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/lisa.lua b/data-otservbr-global/monster/bosses/lisa.lua
index 7cbff8d7d49..2890e8d692a 100644
--- a/data-otservbr-global/monster/bosses/lisa.lua
+++ b/data-otservbr-global/monster/bosses/lisa.lua
@@ -130,18 +130,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)
diff --git a/data-otservbr-global/monster/bosses/mad_mage.lua b/data-otservbr-global/monster/bosses/mad_mage.lua
index 2ff8144d310..307f26a9aa0 100644
--- a/data-otservbr-global/monster/bosses/mad_mage.lua
+++ b/data-otservbr-global/monster/bosses/mad_mage.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/bosses/mad_technomancer.lua b/data-otservbr-global/monster/bosses/mad_technomancer.lua
index 7d72216b88a..0a329a858a6 100644
--- a/data-otservbr-global/monster/bosses/mad_technomancer.lua
+++ b/data-otservbr-global/monster/bosses/mad_technomancer.lua
@@ -104,18 +104,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)
diff --git a/data-otservbr-global/monster/bosses/morik_the_gladiator.lua b/data-otservbr-global/monster/bosses/morik_the_gladiator.lua
index 5a8a012ca84..670294b12e8 100644
--- a/data-otservbr-global/monster/bosses/morik_the_gladiator.lua
+++ b/data-otservbr-global/monster/bosses/morik_the_gladiator.lua
@@ -109,18 +109,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)
diff --git a/data-otservbr-global/monster/bosses/morshabaal.lua b/data-otservbr-global/monster/bosses/morshabaal.lua
index 4273977e2eb..363c103cad2 100644
--- a/data-otservbr-global/monster/bosses/morshabaal.lua
+++ b/data-otservbr-global/monster/bosses/morshabaal.lua
@@ -145,10 +145,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/bosses/munster.lua b/data-otservbr-global/monster/bosses/munster.lua
index daeeac7655e..21c2761d0f8 100644
--- a/data-otservbr-global/monster/bosses/munster.lua
+++ b/data-otservbr-global/monster/bosses/munster.lua
@@ -109,18 +109,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)
diff --git a/data-otservbr-global/monster/bosses/pythius_the_rotten.lua b/data-otservbr-global/monster/bosses/pythius_the_rotten.lua
index 80f694af6bc..742285c193f 100644
--- a/data-otservbr-global/monster/bosses/pythius_the_rotten.lua
+++ b/data-otservbr-global/monster/bosses/pythius_the_rotten.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/raging_mage.lua b/data-otservbr-global/monster/bosses/raging_mage.lua
index 5fd30131b8a..84e0232f37f 100644
--- a/data-otservbr-global/monster/bosses/raging_mage.lua
+++ b/data-otservbr-global/monster/bosses/raging_mage.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/bosses/raxias.lua b/data-otservbr-global/monster/bosses/raxias.lua
index ea62576f52d..3f0f7cf1ce6 100644
--- a/data-otservbr-global/monster/bosses/raxias.lua
+++ b/data-otservbr-global/monster/bosses/raxias.lua
@@ -103,18 +103,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)
diff --git a/data-otservbr-global/monster/bosses/renegade_orc.lua b/data-otservbr-global/monster/bosses/renegade_orc.lua
index 53f075751ae..157b75d352a 100644
--- a/data-otservbr-global/monster/bosses/renegade_orc.lua
+++ b/data-otservbr-global/monster/bosses/renegade_orc.lua
@@ -115,18 +115,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)
diff --git a/data-otservbr-global/monster/bosses/rukor_zad.lua b/data-otservbr-global/monster/bosses/rukor_zad.lua
index 361365745b5..bbcf1706943 100644
--- a/data-otservbr-global/monster/bosses/rukor_zad.lua
+++ b/data-otservbr-global/monster/bosses/rukor_zad.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/smuggler_baron_silvertoe.lua b/data-otservbr-global/monster/bosses/smuggler_baron_silvertoe.lua
index b59d09d2387..c35cc2dcf40 100644
--- a/data-otservbr-global/monster/bosses/smuggler_baron_silvertoe.lua
+++ b/data-otservbr-global/monster/bosses/smuggler_baron_silvertoe.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/spider_queen.lua b/data-otservbr-global/monster/bosses/spider_queen.lua
index 1f2b018f26c..88a0aa939c1 100644
--- a/data-otservbr-global/monster/bosses/spider_queen.lua
+++ b/data-otservbr-global/monster/bosses/spider_queen.lua
@@ -94,18 +94,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)
diff --git a/data-otservbr-global/monster/bosses/splasher.lua b/data-otservbr-global/monster/bosses/splasher.lua
index 426d3be3c26..825f56607db 100644
--- a/data-otservbr-global/monster/bosses/splasher.lua
+++ b/data-otservbr-global/monster/bosses/splasher.lua
@@ -110,18 +110,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)
diff --git a/data-otservbr-global/monster/bosses/teleskor.lua b/data-otservbr-global/monster/bosses/teleskor.lua
index 0c27b032658..e5941477479 100644
--- a/data-otservbr-global/monster/bosses/teleskor.lua
+++ b/data-otservbr-global/monster/bosses/teleskor.lua
@@ -104,18 +104,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)
diff --git a/data-otservbr-global/monster/bosses/the_abomination.lua b/data-otservbr-global/monster/bosses/the_abomination.lua
index e6ba0b1ae06..0249b2453ae 100644
--- a/data-otservbr-global/monster/bosses/the_abomination.lua
+++ b/data-otservbr-global/monster/bosses/the_abomination.lua
@@ -125,18 +125,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)
diff --git a/data-otservbr-global/monster/bosses/the_astral_source.lua b/data-otservbr-global/monster/bosses/the_astral_source.lua
index abc46bfc1d4..008da5078b5 100644
--- a/data-otservbr-global/monster/bosses/the_astral_source.lua
+++ b/data-otservbr-global/monster/bosses/the_astral_source.lua
@@ -96,18 +96,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)
diff --git a/data-otservbr-global/monster/bosses/the_blightfather.lua b/data-otservbr-global/monster/bosses/the_blightfather.lua
index 1cb8c870901..7e1c0515e87 100644
--- a/data-otservbr-global/monster/bosses/the_blightfather.lua
+++ b/data-otservbr-global/monster/bosses/the_blightfather.lua
@@ -108,18 +108,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)
diff --git a/data-otservbr-global/monster/bosses/the_book_of_death.lua b/data-otservbr-global/monster/bosses/the_book_of_death.lua
index 4f2d3288447..53d37c08795 100644
--- a/data-otservbr-global/monster/bosses/the_book_of_death.lua
+++ b/data-otservbr-global/monster/bosses/the_book_of_death.lua
@@ -100,18 +100,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)
diff --git a/data-otservbr-global/monster/bosses/the_brainstealer.lua b/data-otservbr-global/monster/bosses/the_brainstealer.lua
index 57a4beba537..78d783d4618 100644
--- a/data-otservbr-global/monster/bosses/the_brainstealer.lua
+++ b/data-otservbr-global/monster/bosses/the_brainstealer.lua
@@ -129,18 +129,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)
diff --git a/data-otservbr-global/monster/bosses/the_collector.lua b/data-otservbr-global/monster/bosses/the_collector.lua
index b3fa70f85c6..5fd5a4a6336 100644
--- a/data-otservbr-global/monster/bosses/the_collector.lua
+++ b/data-otservbr-global/monster/bosses/the_collector.lua
@@ -98,18 +98,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)
diff --git a/data-otservbr-global/monster/bosses/the_evil_eye.lua b/data-otservbr-global/monster/bosses/the_evil_eye.lua
index f712959cdd7..b3be845c629 100644
--- a/data-otservbr-global/monster/bosses/the_evil_eye.lua
+++ b/data-otservbr-global/monster/bosses/the_evil_eye.lua
@@ -123,18 +123,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)
diff --git a/data-otservbr-global/monster/bosses/the_first_dragon.lua b/data-otservbr-global/monster/bosses/the_first_dragon.lua
index 34294280dd1..921f8394622 100644
--- a/data-otservbr-global/monster/bosses/the_first_dragon.lua
+++ b/data-otservbr-global/monster/bosses/the_first_dragon.lua
@@ -108,18 +108,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)
diff --git a/data-otservbr-global/monster/bosses/the_frog_prince.lua b/data-otservbr-global/monster/bosses/the_frog_prince.lua
index d90c6c78b2e..745757dc621 100644
--- a/data-otservbr-global/monster/bosses/the_frog_prince.lua
+++ b/data-otservbr-global/monster/bosses/the_frog_prince.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/the_monster.lua b/data-otservbr-global/monster/bosses/the_monster.lua
index c7f84935b20..368bff98af0 100644
--- a/data-otservbr-global/monster/bosses/the_monster.lua
+++ b/data-otservbr-global/monster/bosses/the_monster.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/verminor.lua b/data-otservbr-global/monster/bosses/verminor.lua
index 1712cccab2e..43b4c194257 100644
--- a/data-otservbr-global/monster/bosses/verminor.lua
+++ b/data-otservbr-global/monster/bosses/verminor.lua
@@ -166,18 +166,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)
diff --git a/data-otservbr-global/monster/bosses/visco.lua b/data-otservbr-global/monster/bosses/visco.lua
index 96223ee28c0..d78729aeaf6 100644
--- a/data-otservbr-global/monster/bosses/visco.lua
+++ b/data-otservbr-global/monster/bosses/visco.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/warlord_ruzad.lua b/data-otservbr-global/monster/bosses/warlord_ruzad.lua
index b66a9c3284b..1970e2d47f6 100644
--- a/data-otservbr-global/monster/bosses/warlord_ruzad.lua
+++ b/data-otservbr-global/monster/bosses/warlord_ruzad.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/weakened_demon.lua b/data-otservbr-global/monster/bosses/weakened_demon.lua
index 7daf2f5dfb2..936849b379f 100644
--- a/data-otservbr-global/monster/bosses/weakened_demon.lua
+++ b/data-otservbr-global/monster/bosses/weakened_demon.lua
@@ -95,14 +95,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onThink = function(monster, interval) end
-
-mType.onAppear = function(monster, creature) 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)
diff --git a/data-otservbr-global/monster/bosses/weakened_shlorg.lua b/data-otservbr-global/monster/bosses/weakened_shlorg.lua
index 615bd45f158..3734d602406 100644
--- a/data-otservbr-global/monster/bosses/weakened_shlorg.lua
+++ b/data-otservbr-global/monster/bosses/weakened_shlorg.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/williwasp.lua b/data-otservbr-global/monster/bosses/williwasp.lua
index 64a90d09de1..93868eba760 100644
--- a/data-otservbr-global/monster/bosses/williwasp.lua
+++ b/data-otservbr-global/monster/bosses/williwasp.lua
@@ -104,18 +104,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)
diff --git a/data-otservbr-global/monster/bosses/yaga_the_crone.lua b/data-otservbr-global/monster/bosses/yaga_the_crone.lua
index 4987d01b4c2..5f47c5c907c 100644
--- a/data-otservbr-global/monster/bosses/yaga_the_crone.lua
+++ b/data-otservbr-global/monster/bosses/yaga_the_crone.lua
@@ -120,18 +120,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)
diff --git a/data-otservbr-global/monster/bosses/zarabustor.lua b/data-otservbr-global/monster/bosses/zarabustor.lua
index 8bb36a5e904..fbe771c51b9 100644
--- a/data-otservbr-global/monster/bosses/zarabustor.lua
+++ b/data-otservbr-global/monster/bosses/zarabustor.lua
@@ -128,18 +128,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)
diff --git a/data-otservbr-global/monster/bosses/zavarash.lua b/data-otservbr-global/monster/bosses/zavarash.lua
index a3f41dc6d04..3fd5b60c1e4 100644
--- a/data-otservbr-global/monster/bosses/zavarash.lua
+++ b/data-otservbr-global/monster/bosses/zavarash.lua
@@ -136,18 +136,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)
diff --git a/data-otservbr-global/monster/bosses/zevelon_duskbringer.lua b/data-otservbr-global/monster/bosses/zevelon_duskbringer.lua
index 7dd4739741e..836ecdf37c2 100644
--- a/data-otservbr-global/monster/bosses/zevelon_duskbringer.lua
+++ b/data-otservbr-global/monster/bosses/zevelon_duskbringer.lua
@@ -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)
diff --git a/data-otservbr-global/monster/bosses/zoralurk.lua b/data-otservbr-global/monster/bosses/zoralurk.lua
index e8095a70f68..6afc231f0d9 100644
--- a/data-otservbr-global/monster/bosses/zoralurk.lua
+++ b/data-otservbr-global/monster/bosses/zoralurk.lua
@@ -125,18 +125,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)
diff --git a/data-otservbr-global/monster/bosses/zushuka.lua b/data-otservbr-global/monster/bosses/zushuka.lua
index 2491261be7b..6e5c027d4c4 100644
--- a/data-otservbr-global/monster/bosses/zushuka.lua
+++ b/data-otservbr-global/monster/bosses/zushuka.lua
@@ -145,18 +145,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)
diff --git a/data-otservbr-global/monster/constructs/iron_servant_replica.lua b/data-otservbr-global/monster/constructs/iron_servant_replica.lua
index 4ff09899972..a0fa2c74c74 100644
--- a/data-otservbr-global/monster/constructs/iron_servant_replica.lua
+++ b/data-otservbr-global/monster/constructs/iron_servant_replica.lua
@@ -113,4 +113,27 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
+mType.onSpawn = function(monster)
+ local chance = math.random(100)
+ if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismDiamond) >= 1 and Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismGolden) >= 1 then
+ if chance > 30 then
+ local monsterType = math.random(2) == 1 and "diamond servant replica" or "golden servant replica"
+ Game.createMonster(monsterType, monster:getPosition(), false, true)
+ monster:remove()
+ end
+ return
+ end
+
+ if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismDiamond) >= 1 and chance > 30 then
+ Game.createMonster("diamond servant replica", monster:getPosition(), false, true)
+ monster:remove()
+ return
+ end
+
+ if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismGolden) >= 1 and chance > 30 then
+ Game.createMonster("golden servant replica", monster:getPosition(), false, true)
+ monster:remove()
+ end
+end
+
mType:register(monster)
diff --git a/data-otservbr-global/monster/event_creatures/the_mutated_pumpkin.lua b/data-otservbr-global/monster/event_creatures/the_mutated_pumpkin.lua
index 5e219736804..4abdfe16340 100644
--- a/data-otservbr-global/monster/event_creatures/the_mutated_pumpkin.lua
+++ b/data-otservbr-global/monster/event_creatures/the_mutated_pumpkin.lua
@@ -130,18 +130,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)
diff --git a/data-otservbr-global/monster/humans/cobra_assassin.lua b/data-otservbr-global/monster/humans/cobra_assassin.lua
index a2206a77ad5..fa834503e56 100644
--- a/data-otservbr-global/monster/humans/cobra_assassin.lua
+++ b/data-otservbr-global/monster/humans/cobra_assassin.lua
@@ -121,4 +121,8 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
+mType.onSpawn = function(monster)
+ monster:handleCobraOnSpawn()
+end
+
mType:register(monster)
diff --git a/data-otservbr-global/monster/humans/cobra_scout.lua b/data-otservbr-global/monster/humans/cobra_scout.lua
index 7aded2b24ec..6fc3e893497 100644
--- a/data-otservbr-global/monster/humans/cobra_scout.lua
+++ b/data-otservbr-global/monster/humans/cobra_scout.lua
@@ -126,4 +126,8 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
+mType.onSpawn = function(monster)
+ monster:handleCobraOnSpawn()
+end
+
mType:register(monster)
diff --git a/data-otservbr-global/monster/humans/cobra_vizier.lua b/data-otservbr-global/monster/humans/cobra_vizier.lua
index c6052ab7829..934b015842a 100644
--- a/data-otservbr-global/monster/humans/cobra_vizier.lua
+++ b/data-otservbr-global/monster/humans/cobra_vizier.lua
@@ -129,4 +129,8 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
+mType.onSpawn = function(monster)
+ monster:handleCobraOnSpawn()
+end
+
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua
index d399413ed93..03a093b3afb 100644
--- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua
+++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua
@@ -141,10 +141,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua
index 07fef10a1fd..2fe0c2d05ce 100644
--- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua
+++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua
@@ -121,10 +121,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua b/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua
index 606427d8afe..d3343d38d23 100644
--- a/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua
+++ b/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua
@@ -128,10 +128,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua b/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua
index b6806adbed6..5c7ff8775e3 100644
--- a/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua
+++ b/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua
@@ -134,10 +134,4 @@ monster.immunities = {
{ type = "bleed", condition = true },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua b/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua
index 3c849c72aa3..5246bf87bc4 100644
--- a/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua
+++ b/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua
@@ -128,10 +128,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua b/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua
index 511c78787aa..06562f10883 100644
--- a/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua
+++ b/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua
@@ -131,10 +131,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua
index e469fa36986..1b170cb7447 100644
--- a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua
+++ b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua
@@ -129,10 +129,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua
index 26aceb32010..c1cd61949aa 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua
@@ -130,18 +130,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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua
index e3eef7671c6..cf456f603fb 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua
@@ -145,18 +145,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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua
index a1ec678bdf0..fc7fc63b2ad 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua
@@ -139,18 +139,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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua
index 3e0914007db..ecddb810da0 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua
index 976fe5fe317..b6d08409ec8 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua
@@ -155,18 +155,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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua
index 83f14ead593..3361299d9a9 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua
index 04df78685ac..42fc6498721 100644
--- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua
+++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua
@@ -136,18 +136,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)
diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_baron_from_below.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_baron_from_below.lua
index a381c3b07d6..1a666a75342 100644
--- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_baron_from_below.lua
+++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_baron_from_below.lua
@@ -151,18 +151,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)
diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua
index 17cb6520d29..60769958a14 100644
--- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua
+++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua
@@ -152,18 +152,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)
diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_duke_of_the_depths.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_duke_of_the_depths.lua
index 99053b93882..29f3d1d3e40 100644
--- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_duke_of_the_depths.lua
+++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_duke_of_the_depths.lua
@@ -152,18 +152,4 @@ monster.heals = {
{ type = COMBAT_FIREDAMAGE, percent = 100 },
}
-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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua
index 307f1b27380..1d2507cb3e5 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua
@@ -113,18 +113,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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua
index 83308c9c2fc..9fbbf66ce16 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua
index 85a6444085b..dda3018993c 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua
@@ -136,18 +136,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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua
index ab309d2f583..6c816a7ee52 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua
index e4abf230b1d..a3a283b0a7f 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua
index fb871252bea..52582834231 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua
@@ -113,18 +113,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)
diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua
index 4efff07d202..7de35d1b9d1 100644
--- a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua
+++ b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua
@@ -111,18 +111,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua
index 7ad855bc88a..a7c9f071385 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua
@@ -186,18 +186,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua
index 3f32bac95d4..8213e9a4d51 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua
@@ -141,18 +141,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua
index 364b4f864a8..b8fff3b3006 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua
@@ -141,18 +141,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua
index df016edfd84..856dbf02d2b 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua
index 066e22237c0..f95b0b69093 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua
@@ -158,18 +158,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua
index 72c908104af..1eef0866ceb 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua
@@ -153,18 +153,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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua
index 30b99353cdf..7cb57a1040d 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua
index 03fa92d3394..41e8b074228 100644
--- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua
+++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua
index 17d68ca6994..c4228eefe54 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua
@@ -149,18 +149,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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua
index 5d5f729e749..1f73944519a 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua
@@ -146,18 +146,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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua
index 6fa44fff690..5f50a0c3e22 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua
index 2def55d9283..c45a1fc4ef0 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua
@@ -147,18 +147,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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua
index fef77ab81cf..e13c2f7fd22 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua
index c664a5e21d2..ab868b6f58c 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua
@@ -152,18 +152,4 @@ monster.heals = {
{ type = COMBAT_DEATHDAMAGE, percent = 100 },
}
-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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua
index 8fcbd1ddbab..b3f64c4331a 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua
index f1d96fe25bc..30dd34b9766 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua
@@ -164,18 +164,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)
diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua
index 7bf8e0c82ad..902c9a28950 100644
--- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua
+++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua
@@ -150,18 +150,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua
index ced550fbc84..f2de105033d 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua
@@ -142,18 +142,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua
index 518eda46ac2..851867e0161 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua
index c996116a336..930a744f326 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua
index cafd09f34a7..b723715c55d 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua
@@ -122,18 +122,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua
index 8507c3a0c1c..188f11c9dc6 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua
index 6673313045f..9dcb6503d38 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua
@@ -146,18 +146,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)
diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua
index 042ce32e981..957ad10e5ff 100644
--- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua
+++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua
@@ -136,18 +136,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua
index 04c1b3a2589..8f14e9d3fb1 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua
@@ -106,18 +106,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua
index 2d6c0e44405..6350b49a3c6 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua
@@ -145,18 +145,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua
index 075c308d7df..aa3f5589fc5 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua
@@ -103,18 +103,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua
index 273ab8f579e..d765d016a8a 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua
@@ -103,18 +103,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua
index d81c9b4faf1..e7eb2443a4d 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua
@@ -137,18 +137,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua
index 14b92badfbe..0c8dba87dac 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua
@@ -136,18 +136,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua
index 99f5be41e19..7e1f3fc214a 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua
@@ -106,18 +106,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua
index c40159545ed..e0efdb42d16 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua
@@ -128,18 +128,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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua
index c9d7601584f..3870524d5a9 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua
index 5d68108bba4..672bd5ecc0c 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua
index c8e7198a2e1..6bf55bf348d 100644
--- a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua
+++ b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua
index debd09c9bb9..aaa7f1936af 100644
--- a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua
+++ b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua
@@ -109,18 +109,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)
diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua
index 947a56a0187..4085e5eab86 100644
--- a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua
+++ b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/kilmaresh/bragrumol.lua b/data-otservbr-global/monster/quests/kilmaresh/bragrumol.lua
index bb7ef950744..125a017735b 100644
--- a/data-otservbr-global/monster/quests/kilmaresh/bragrumol.lua
+++ b/data-otservbr-global/monster/quests/kilmaresh/bragrumol.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/kilmaresh/mozradek.lua b/data-otservbr-global/monster/quests/kilmaresh/mozradek.lua
index 8602923a08b..da498edede4 100644
--- a/data-otservbr-global/monster/quests/kilmaresh/mozradek.lua
+++ b/data-otservbr-global/monster/quests/kilmaresh/mozradek.lua
@@ -111,18 +111,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)
diff --git a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua
index 96a8dd39081..1060d49b26f 100644
--- a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua
+++ b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua
@@ -147,18 +147,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)
diff --git a/data-otservbr-global/monster/quests/kilmaresh/xogixath.lua b/data-otservbr-global/monster/quests/kilmaresh/xogixath.lua
index 3c77465e1ab..70dc531f5ce 100644
--- a/data-otservbr-global/monster/quests/kilmaresh/xogixath.lua
+++ b/data-otservbr-global/monster/quests/kilmaresh/xogixath.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/liquid_black/jaul.lua b/data-otservbr-global/monster/quests/liquid_black/jaul.lua
index 965bbacb14c..7802788a73e 100644
--- a/data-otservbr-global/monster/quests/liquid_black/jaul.lua
+++ b/data-otservbr-global/monster/quests/liquid_black/jaul.lua
@@ -123,18 +123,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)
diff --git a/data-otservbr-global/monster/quests/liquid_black/obujos.lua b/data-otservbr-global/monster/quests/liquid_black/obujos.lua
index 1f32fd54f1c..5e732cdcbd0 100644
--- a/data-otservbr-global/monster/quests/liquid_black/obujos.lua
+++ b/data-otservbr-global/monster/quests/liquid_black/obujos.lua
@@ -115,18 +115,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)
diff --git a/data-otservbr-global/monster/quests/liquid_black/tanjis.lua b/data-otservbr-global/monster/quests/liquid_black/tanjis.lua
index 586af950be3..f726e36fe55 100644
--- a/data-otservbr-global/monster/quests/liquid_black/tanjis.lua
+++ b/data-otservbr-global/monster/quests/liquid_black/tanjis.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua b/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua
index 43d0a1502c3..09ed0f19be8 100644
--- a/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua
+++ b/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua
@@ -125,10 +125,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua
index 8f3bf7f6166..9607bf8310c 100644
--- a/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua
+++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/plunder_patriarch.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/plunder_patriarch.lua
index 25d7c224f09..42fbf1fcdd9 100644
--- a/data-otservbr-global/monster/quests/primal_ordeal_quest/plunder_patriarch.lua
+++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/plunder_patriarch.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
index 7ad43b016c9..b0ba0ae8686 100644
--- a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
+++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
@@ -162,16 +162,6 @@ local function initialize(monster)
end
-- Functions for the fight
-mType.onAppear = function(monster, creature)
- if monster:getId() == creature:getId() then
- initialize(monster)
- end
-
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
local function getHazardPoints(monster)
local hazard = Hazard.getByName("hazard.gnomprona-gardens")
if not hazard then
diff --git a/data-otservbr-global/monster/quests/roshamuul/gaz'haragoth.lua b/data-otservbr-global/monster/quests/roshamuul/gaz'haragoth.lua
index 0e6d5695d33..6dce4e10838 100644
--- a/data-otservbr-global/monster/quests/roshamuul/gaz'haragoth.lua
+++ b/data-otservbr-global/monster/quests/roshamuul/gaz'haragoth.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/roshamuul/omrafir.lua b/data-otservbr-global/monster/quests/roshamuul/omrafir.lua
index e3f09b27dd0..03254912b71 100644
--- a/data-otservbr-global/monster/quests/roshamuul/omrafir.lua
+++ b/data-otservbr-global/monster/quests/roshamuul/omrafir.lua
@@ -148,18 +148,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)
diff --git a/data-otservbr-global/monster/quests/roshamuul/prince_drazzak.lua b/data-otservbr-global/monster/quests/roshamuul/prince_drazzak.lua
index f969d02e6aa..d2a65e59fea 100644
--- a/data-otservbr-global/monster/quests/roshamuul/prince_drazzak.lua
+++ b/data-otservbr-global/monster/quests/roshamuul/prince_drazzak.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua
index cfd0f53f7fa..cf81168aa00 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua
@@ -127,12 +127,6 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
local intervalBetweenExecutions = 10000
local zone = Zone.getByName("boss.goshnar's-megalomania-purple")
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua
index 8e8effb5e08..787ab94b662 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua
@@ -138,12 +138,6 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
local intervalBetweenExecutions = 10000
local zone = Zone.getByName("boss.goshnar's-megalomania-purple")
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua
index 3f1cb2c4421..468e6a312e4 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua
@@ -144,16 +144,6 @@ mType.onThink = function(monster, interval)
end
end
-mType.onAppear = function(monster, creature) end
-
-mType.onSpawn = function(monsterCallback)
- if monsterCallback:getType():isRewardBoss() then
- monsterCallback:setReward(true)
- end
-
- firstTime = 0
-end
-
mType.onDisappear = function(monster, creature)
if creature:getName() == "Goshnar's Cruelty" then
local eyeCreature = Creature("A Greedy Eye")
@@ -163,8 +153,4 @@ mType.onDisappear = function(monster, creature)
end
end
-mType.onMove = function(monster, creature, fromPosition, toPosition) end
-
-mType.onSay = function(monster, creature, type, message) end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua
index 16d995988a5..e17e581212e 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua
@@ -185,8 +185,4 @@ mType.onDisappear = function(monster, creature)
end
end
-mType.onMove = function(monster, creature, fromPosition, toPosition) end
-
-mType.onSay = function(monster, creature, type, message) end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua
index f218e0b7e9f..cc6652eb9d9 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua
@@ -133,18 +133,6 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onThink = function(monster, interval) end
-
-mType.onAppear = function(monster, creature) end
-
-mType.onSpawn = function(monster)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-
- monster:resetHatredDamageMultiplier()
-end
-
mType.onDisappear = function(monster, creature)
if creature:getName() == "Goshnar's Hatred" then
for _, monsterName in pairs(SoulWarQuest.burningHatredMonsters) do
@@ -156,8 +144,4 @@ mType.onDisappear = function(monster, creature)
end
end
-mType.onMove = function(monster, creature, fromPosition, toPosition) end
-
-mType.onSay = function(monster, creature, type, message) end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua
index c4598e9bbe0..1cda5185bbe 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua
@@ -147,16 +147,4 @@ mType.onThink = function(monster, interval)
end
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)
diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua
index 7501e466f54..1daedf2a191 100644
--- a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua
+++ b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua
index 214b8c6f2ce..6f7f41694fe 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua
@@ -138,18 +138,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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua
index 3b9dd8e0eea..5423c6e2e9e 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua b/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua
index 5506350848b..70b6c25bb1e 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua
@@ -134,18 +134,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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua
index 39fed1dc78c..57ccdba515a 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua b/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua
index 2b195487dfd..1e28879cd9c 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua
@@ -134,18 +134,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)
diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua
index 50ad689b7c7..08f757afcfc 100644
--- a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua
+++ b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua
index 46b5cf6c91d..af8b385ddb2 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua
@@ -150,18 +150,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua
index 868fe08e756..f129a99f00a 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua
@@ -145,23 +145,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onThink = function(monster, interval) end
-
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- -- reset global storage state to default / ensure sqm's reset for the next team
- Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.Deaths, -1)
- Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.StepsOn, -1)
- Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.ResetSteps, 1)
- monster:registerEvent("facelessBaneImmunity")
- 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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua
index 9c693024899..88688c4fffc 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua
@@ -152,18 +152,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/malofur_mangrinder.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/malofur_mangrinder.lua
index 2bd63f042be..651ee8cb59b 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/malofur_mangrinder.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/malofur_mangrinder.lua
@@ -145,18 +145,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/maxxenius.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/maxxenius.lua
index 8db50108f56..a54257df723 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/maxxenius.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/maxxenius.lua
@@ -152,18 +152,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua
index d62affd19a4..3d5675c4486 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua
@@ -178,18 +178,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)
diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/the_nightmare_beast.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/the_nightmare_beast.lua
index d0520193aad..3937edcd2d4 100644
--- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/the_nightmare_beast.lua
+++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/the_nightmare_beast.lua
@@ -154,18 +154,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)
diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua
index aba0cc866b4..3f5ad2a3cd7 100644
--- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua
+++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua
@@ -131,10 +131,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua
index 9d86b77cd48..34d15a0a248 100644
--- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua
+++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua
@@ -161,10 +161,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/lion_commander.lua b/data-otservbr-global/monster/quests/the_order_of_lion/lion_commander.lua
index f409fca3c4b..378bbc0e1a5 100644
--- a/data-otservbr-global/monster/quests/the_order_of_lion/lion_commander.lua
+++ b/data-otservbr-global/monster/quests/the_order_of_lion/lion_commander.lua
@@ -111,19 +111,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster ~= creature then
- return true
- end
- for i = 1, 5 do
- local sum = Game.createMonster(monster:getType():getSummonList()[math.random(1, #monster:getType():getSummonList())].name, monster:getPosition(), true)
- if sum then
- monster:setSummon(sum)
- sum:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- sum:setStorageValue(Storage.TheOrderOfTheLion.Drume.Commander, 1)
- end
- end
- monster:setStorageValue(Storage.TheOrderOfTheLion.Drume.Commander, 1)
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua
index fd31fa62806..f46ff987e92 100644
--- a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua
+++ b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua
@@ -112,20 +112,4 @@ monster.immunities = {
{ type = "bleed", condition = false },
}
-mType.onAppear = function(monster, creature)
- if monster ~= creature then
- return true
- end
- local sum
- for i = 1, 5 do
- sum = Game.createMonster(monster:getType():getSummonList()[math.random(1, #monster:getType():getSummonList())].name, monster:getPosition(), true)
- if sum then
- monster:setSummon(sum)
- sum:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- sum:setStorageValue(Storage.TheOrderOfTheLion.Drume.Commander, 1)
- end
- end
- monster:setStorageValue(Storage.TheOrderOfTheLion.Drume.Commander, 1)
-end
-
mType:register(monster)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/brokul.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/brokul.lua
index ffe52519e85..f05a8adae85 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/brokul.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/brokul.lua
@@ -129,18 +129,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua
index f9d04e40db4..60717045935 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua
@@ -137,18 +137,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/gorzindel.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/gorzindel.lua
index 4d549175bab..7a31d798d9a 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/gorzindel.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/gorzindel.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua
index 23390f0145f..453c3be3389 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua
@@ -119,18 +119,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua
index 57589cb7b17..f27050df438 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua
index 685b1f10f07..bb01cf3c515 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua
@@ -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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua
index c57bf0815ae..5de851ac4c1 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua
@@ -131,20 +131,6 @@ mType.onThink = function(monster, interval)
end
end
-mType.onAppear = function(monster, creature)
- if monster:getId() == creature:getId() then
- monster:setStorageValue(GrandMasterOberonConfig.Storage.Asking, 1)
- monster:setStorageValue(GrandMasterOberonConfig.Storage.Life, 1)
- end
- 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)
if type ~= TALKTYPE_SAY then
return false
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/preceptor_lazare.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/preceptor_lazare.lua
index c9db8d4446c..f5477192be6 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/preceptor_lazare.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/preceptor_lazare.lua
@@ -130,18 +130,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua
index fa175a85a2b..ad7e340ffb2 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua
@@ -105,18 +105,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua
index 491b946adba..2d0e1069f30 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua
@@ -183,18 +183,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua b/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua
index 699f0550d52..7df23258767 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua
@@ -140,18 +140,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)
diff --git a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua
index f482dfe4b9e..f93e6785563 100644
--- a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua
+++ b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua
@@ -129,18 +129,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)
diff --git a/data-otservbr-global/monster/raids/chayenne.lua b/data-otservbr-global/monster/raids/chayenne.lua
index 0f8f64d9686..2ab96a01c2d 100644
--- a/data-otservbr-global/monster/raids/chayenne.lua
+++ b/data-otservbr-global/monster/raids/chayenne.lua
@@ -105,18 +105,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)
diff --git a/data-otservbr-global/monster/raids/chizzoron_the_distorter.lua b/data-otservbr-global/monster/raids/chizzoron_the_distorter.lua
index 7fbc5d3cd71..3569332eaf2 100644
--- a/data-otservbr-global/monster/raids/chizzoron_the_distorter.lua
+++ b/data-otservbr-global/monster/raids/chizzoron_the_distorter.lua
@@ -123,18 +123,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)
diff --git a/data-otservbr-global/monster/raids/ferumbras.lua b/data-otservbr-global/monster/raids/ferumbras.lua
index c3dfea647ea..f49eb8075ab 100644
--- a/data-otservbr-global/monster/raids/ferumbras.lua
+++ b/data-otservbr-global/monster/raids/ferumbras.lua
@@ -168,18 +168,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)
diff --git a/data-otservbr-global/monster/raids/furyosa.lua b/data-otservbr-global/monster/raids/furyosa.lua
index acbf9711298..bc4ffdc3477 100644
--- a/data-otservbr-global/monster/raids/furyosa.lua
+++ b/data-otservbr-global/monster/raids/furyosa.lua
@@ -133,18 +133,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)
diff --git a/data-otservbr-global/monster/raids/ghazbaran.lua b/data-otservbr-global/monster/raids/ghazbaran.lua
index 5f57655679f..f014e06e82a 100644
--- a/data-otservbr-global/monster/raids/ghazbaran.lua
+++ b/data-otservbr-global/monster/raids/ghazbaran.lua
@@ -164,18 +164,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)
diff --git a/data-otservbr-global/monster/raids/glooth_bomb.lua b/data-otservbr-global/monster/raids/glooth_bomb.lua
index b1973e7b8ec..a69c59a3c6c 100644
--- a/data-otservbr-global/monster/raids/glooth_bomb.lua
+++ b/data-otservbr-global/monster/raids/glooth_bomb.lua
@@ -114,18 +114,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)
diff --git a/data-otservbr-global/monster/raids/hirintror.lua b/data-otservbr-global/monster/raids/hirintror.lua
index 12a4d20d183..aa3ac63011d 100644
--- a/data-otservbr-global/monster/raids/hirintror.lua
+++ b/data-otservbr-global/monster/raids/hirintror.lua
@@ -125,18 +125,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)
diff --git a/data-otservbr-global/monster/raids/mawhawk.lua b/data-otservbr-global/monster/raids/mawhawk.lua
index f00407ca304..697638fdda4 100644
--- a/data-otservbr-global/monster/raids/mawhawk.lua
+++ b/data-otservbr-global/monster/raids/mawhawk.lua
@@ -121,18 +121,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)
diff --git a/data-otservbr-global/monster/raids/morgaroth.lua b/data-otservbr-global/monster/raids/morgaroth.lua
index 2e965cc99ec..02a65453da4 100644
--- a/data-otservbr-global/monster/raids/morgaroth.lua
+++ b/data-otservbr-global/monster/raids/morgaroth.lua
@@ -178,18 +178,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)
diff --git a/data-otservbr-global/monster/raids/ocyakao.lua b/data-otservbr-global/monster/raids/ocyakao.lua
index 2e036c0837b..5321a0b59ff 100644
--- a/data-otservbr-global/monster/raids/ocyakao.lua
+++ b/data-otservbr-global/monster/raids/ocyakao.lua
@@ -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)
diff --git a/data-otservbr-global/monster/raids/orshabaal.lua b/data-otservbr-global/monster/raids/orshabaal.lua
index 7d7ef6052df..2054c1e2a3b 100644
--- a/data-otservbr-global/monster/raids/orshabaal.lua
+++ b/data-otservbr-global/monster/raids/orshabaal.lua
@@ -167,18 +167,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)
diff --git a/data-otservbr-global/monster/raids/the_pale_count.lua b/data-otservbr-global/monster/raids/the_pale_count.lua
index 31a40bcfff2..29f1cf6b043 100644
--- a/data-otservbr-global/monster/raids/the_pale_count.lua
+++ b/data-otservbr-global/monster/raids/the_pale_count.lua
@@ -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)
diff --git a/data-otservbr-global/monster/raids/the_welter.lua b/data-otservbr-global/monster/raids/the_welter.lua
index addb7008d75..7e2f2c3ed8f 100644
--- a/data-otservbr-global/monster/raids/the_welter.lua
+++ b/data-otservbr-global/monster/raids/the_welter.lua
@@ -137,18 +137,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)
diff --git a/data-otservbr-global/monster/raids/tyrn.lua b/data-otservbr-global/monster/raids/tyrn.lua
index 0c19ac9944f..158a4e93833 100644
--- a/data-otservbr-global/monster/raids/tyrn.lua
+++ b/data-otservbr-global/monster/raids/tyrn.lua
@@ -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)
diff --git a/data-otservbr-global/monster/raids/white_pale.lua b/data-otservbr-global/monster/raids/white_pale.lua
index 06b6dcab4f3..17d093fb5bf 100644
--- a/data-otservbr-global/monster/raids/white_pale.lua
+++ b/data-otservbr-global/monster/raids/white_pale.lua
@@ -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)
diff --git a/data-otservbr-global/monster/raids/zulazza_the_corruptor.lua b/data-otservbr-global/monster/raids/zulazza_the_corruptor.lua
index b7d14d9c966..0c2212c2a45 100644
--- a/data-otservbr-global/monster/raids/zulazza_the_corruptor.lua
+++ b/data-otservbr-global/monster/raids/zulazza_the_corruptor.lua
@@ -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)
diff --git a/data-otservbr-global/monster/undeads/ahau.lua b/data-otservbr-global/monster/undeads/ahau.lua
index 9d7f0f17c9c..ce5704769a9 100644
--- a/data-otservbr-global/monster/undeads/ahau.lua
+++ b/data-otservbr-global/monster/undeads/ahau.lua
@@ -130,18 +130,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)
diff --git a/data-otservbr-global/scripts/actions/bosses_levers/brokul.lua b/data-otservbr-global/scripts/actions/bosses_levers/brokul.lua
deleted file mode 100644
index 2cdded463af..00000000000
--- a/data-otservbr-global/scripts/actions/bosses_levers/brokul.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-local config = {
- boss = {
- name = "Brokul",
- position = Position(33483, 31434, 15),
- },
- requiredLevel = 150,
- playerPositions = {
- { pos = Position(33522, 31465, 15), teleport = Position(33483, 31445, 15), effect = CONST_ME_TELEPORT },
- { pos = Position(33520, 31465, 15), teleport = Position(33483, 31445, 15), effect = CONST_ME_TELEPORT },
- { pos = Position(33521, 31465, 15), teleport = Position(33483, 31445, 15), effect = CONST_ME_TELEPORT },
- { pos = Position(33523, 31465, 15), teleport = Position(33483, 31445, 15), effect = CONST_ME_TELEPORT },
- { pos = Position(33524, 31465, 15), teleport = Position(33483, 31445, 15), effect = CONST_ME_TELEPORT },
- },
- specPos = {
- from = Position(33469, 31430, 15),
- to = Position(33497, 31453, 15),
- },
- exit = Position(33522, 31468, 15),
-}
-
-local lever = BossLever(config)
-lever:aid(34000)
-lever:register()
diff --git a/data-otservbr-global/scripts/actions/bosses_levers/grand_master_oberon.lua b/data-otservbr-global/scripts/actions/bosses_levers/grand_master_oberon.lua
deleted file mode 100644
index e7a1a104d52..00000000000
--- a/data-otservbr-global/scripts/actions/bosses_levers/grand_master_oberon.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-local config = {
- boss = {
- name = "Grand Master Oberon",
- position = Position(33364, 31317, 9),
- },
- playerPositions = {
- { pos = Position(33362, 31344, 9), teleport = Position(33364, 31322, 9) },
- { pos = Position(33363, 31344, 9), teleport = Position(33364, 31322, 9) },
- { pos = Position(33364, 31344, 9), teleport = Position(33364, 31322, 9) },
- { pos = Position(33365, 31344, 9), teleport = Position(33364, 31322, 9) },
- { pos = Position(33366, 31344, 9), teleport = Position(33364, 31322, 9) },
- },
- specPos = {
- from = Position(33357, 31312, 9),
- to = Position(33371, 31324, 9),
- },
- exit = Position(33364, 31341, 9),
-}
-
-local lever = BossLever(config)
-lever:aid(57605)
-lever:register()
diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua
index 1cbca17c563..bfeac7acad0 100644
--- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua
+++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua
@@ -1,392 +1,354 @@
local stage = configManager.getNumber(configKeys.FREE_QUEST_STAGE)
local questTable = {
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 2 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 4 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 7 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 9 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 12 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.Shooting, storageValue = 5 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 16 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 20 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 23 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete, storageValue = 2 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.Rank, storageValue = 1440 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, storageValue = 2 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, storageValue = 2 },
- { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Questline, storageValue = 10 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneVI, storageValue = 10 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneV, storageValue = 10 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneIV, storageValue = 30 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Points, storageValue = 10 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Points, storageValue = 10 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Points, storageValue = 10 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Questline, storageValue = 51 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission01, storageValue = 6 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission02, storageValue = 8 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission03, storageValue = 6 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission04, storageValue = 6 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission05, storageValue = 8 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission06, storageValue = 5 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission07, storageValue = 5 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission08, storageValue = 4 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission09, storageValue = 2 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission10, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedDan, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedBill, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedFred, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.BadSide, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.MatrixState, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToAzerus, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToBog, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToMatrix, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToQuara, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Questline, storageValue = 7 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.JamesfrancisTask, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.BossTimer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone1, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone2, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone3, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Answer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.MotA.QuestionId, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.sulphur, storageValue = 4 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Tar, storageValue = 3 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Ice, storageValue = 3 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Objects, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Temp, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.LookType, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.BossTimer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Life.Mission, storageValue = 7 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Life.BossTimer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Vaporized, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Decaying, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Humans.BossTimer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Mission, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Monsters, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Exorcisms, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Time, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.BossTimer, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.EntranceAccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.AccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 1 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 4 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 7 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 16 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 26 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 29 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 32 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 35 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 38 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 41 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 43 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 46 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 47 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 50 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 55 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 56 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 58 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 61 },
- { storage = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, storageValue = 2 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.Tomes, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.LastLoreKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.TimeGuardianKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.HorrorKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.DragonkingKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.ThornKnightKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.LloydKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.LadyTenebrisKilled, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessMachine, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessLavaTeleport, storageValue = 1 },
- { storage = Storage.Quest.U8_0.BarbarianTest.Questline, storageValue = 8 },
- { storage = Storage.Quest.U8_0.BarbarianTest.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U8_0.BarbarianTest.Mission02, storageValue = 3 },
- { storage = Storage.Quest.U8_0.BarbarianTest.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, storageValue = 21 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, storageValue = 2 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, storageValue = 5 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, storageValue = 6 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, storageValue = 3 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding01, storageValue = 1 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding02, storageValue = 1 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding03, storageValue = 1 },
- { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, storageValue = 3 },
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, storageValue = 2 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, storageValue = 5 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay, storageValue = 1 },
- { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin, storageValue = 1 },
- { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, storageValue = 1 },
- { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, storageValue = 1 },
- { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar, storageValue = 1 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Questline, storageValue = 40 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission02, storageValue = 5 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission04, storageValue = 2 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission05, storageValue = 6 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission06, storageValue = 8 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission07, storageValue = 3 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission08, storageValue = 4 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission09, storageValue = 2 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission10, storageValue = 2 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission11, storageValue = 2 },
- { storage = Storage.Quest.U8_0.TheIceIslands.Mission12, storageValue = 6 },
- { storage = Storage.Quest.U8_0.TheIceIslands.yakchalDoor, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Questline, storageValue = 25 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission01, storageValue = 7 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission02, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission03, storageValue = 6 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission04, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission05, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission06, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission07, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.TimGuard, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Questline, storageValue = 29 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission02[1], storageValue = 4 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission04, storageValue = 2 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05[1], storageValue = 2 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission06, storageValue = 5 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission07[1], storageValue = 2 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission08, storageValue = 2 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission09[1], storageValue = 3 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission10[1], storageValue = 2 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission10.MagicCarpetDoor, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.TomeofKnowledge, storageValue = 12 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver1, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver2, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver3, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.KingTibianus, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Leeland, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Angus, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Wyrdin, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Telas, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Humgolf, storageValue = 1 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, storageValue = 3 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, storageValue = 3 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.TheErrand, storageValue = 2 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, storageValue = 1 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, storageValue = 3 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, storageValue = 5 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, storageValue = 1 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, storageValue = 1 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, storageValue = 2 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, storageValue = 1 },
- { storage = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, storageValue = 4 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Questline, storageValue = 1 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, storageValue = 2 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, storageValue = 8 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, storageValue = 2 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, storageValue = 4 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, storageValue = 2 },
- { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, storageValue = 1 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 1 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 2 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission02, storageValue = 5 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission04, storageValue = 3 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission05, storageValue = 3 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission06, storageValue = 2 },
- { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission07, storageValue = 1 },
- { storage = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, storageValue = 1 },
- { storage = Storage.Quest.U8_1.TibiaTales.DefaultStart, storageValue = 1 },
- { storage = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 },
- { storage = 12450, storageValue = 6 },
- { storage = 12330, storageValue = 1 },
- { storage = 12332, storageValue = 13 },
- { storage = 12333, storageValue = 3 },
- { storage = Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, storageValue = 1 },
- { storage = Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, storageValue = 2 },
- { storage = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, storageValue = 2 },
- { storage = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, storageValue = 12 },
- { storage = 100157, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, storageValue = 29 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, storageValue = 3 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, storageValue = 3 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, storageValue = 3 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, storageValue = 3 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, storageValue = 3 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, storageValue = 4 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, storageValue = 6 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, storageValue = 2 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, storageValue = 2 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, storageValue = 1 },
- { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 },
- { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 },
- { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 },
- { storage = Storage.Quest.U10_50.OramondQuest.QuestLine, storageValue = 1 },
- { storage = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, storageValue = 3000 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Questline, storageValue = 1 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Home, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Subterranean, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Measurements, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Ordnance, storageValue = 3 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Charting, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Growth, storageValue = 2 },
- { storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Diremaw, storageValue = 2 },
- { storage = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, storageValue = 1 },
- { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission01[1], storageValue = 16 },
- { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission02.KroazurAccess, storageValue = 1 },
- { storage = Storage.Quest.U9_80.AdventurersGuild.QuestLine, storageValue = 1 },
- { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 1 },
- { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 2 },
- { storage = Storage.Quest.U10_80.TheLostBrotherQuest, storageValue = 3 },
- { storage = Storage.Quest.U10_55.Dawnport.Questline, storageValue = 1 },
- { storage = Storage.Quest.U10_55.Dawnport.GoMain, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessDeath, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessViolet, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessEarth, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessFire, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessIce, storageValue = 1 },
- { storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessGolden, storageValue = 1 },
- { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors, storageValue = 1 },
- { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut, storageValue = 1 },
- { storage = Storage.Kilmaresh.AccessDoor, storageValue = 1 },
- { storage = Storage.Kilmaresh.CatacombDoors, storageValue = 1 },
- { storage = Storage.Quest.U12_00.TheDreamCourts.AccessDoors, storageValue = 1 },
- { storage = Storage.Quest.U12_00.TheDreamCourts.HauntedHouseAccess, storageValue = 1 },
- { storage = Storage.Quest.U12_00.TheDreamCourts.BuriedCathedralAccess, storageValue = 1 },
- { storage = Storage.Quest.U12_00.TheDreamCourts.DreamScarAccess, storageValue = 1 },
- { storage = Storage.Quest.U12_40.TheOrderOfTheLion.AccessEastSide, storageValue = 1 },
- { storage = Storage.Quest.U12_40.TheOrderOfTheLion.AccessSouthernSide, storageValue = 1 },
- { storage = Storage.Quest.U12_60.APiratesTail.TentuglyDoor, storageValue = 1 },
- { storage = Storage.Quest.U12_60.APiratesTail.RascacoonShortcut, storageValue = 1 },
- { storage = Storage.Quest.U12_70.AdventuresOfGalthen.AccessDoor, storageValue = 1 },
-
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.AccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.TrialAccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.TarAccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.BossAccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Life.AccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.AccessDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_40.CultsOfTibia.FinalBoss.AccessDoor, storageValue = 1 },
-
- { storage = Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, storageValue = 1 },
- { storage = Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, storageValue = 1 },
- { storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, storageValue = 1 },
- { storage = Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, storageValue = 1 },
- { storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 },
- { storage = Storage.Quest.U10_90.FerumbrasAscension.Statue, storageValue = 1 },
-
- { storage = Storage.Quest.U12_00.TheDreamCourts.AndrewDoor, storageValue = 1 },
-
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, storageValue = 1 },
- { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, storageValue = 1 },
-
- --[[ { storage = Storage.Quest.U11_80.TheSecretLibrary.FalconBastionAccess, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.LowerBastionAccess, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.UndergroundBastionAccess, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.ShortcutToBastion, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.OberonAccess, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MotaDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.BasinDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.SkullDoor, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.Mota, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MiniBosses.PreceptorLazare, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MiniBosses.GrandCanonDominus, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MiniBosses.GrandChaplainGaunder, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MiniBosses.GrandCommanderSoeren, storageValue = 1 },
- { storage = Storage.Quest.U11_80.TheSecretLibrary.MiniBosses.DazedLeafGolem, storageValue = 1 }, ]]
-
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToLamp, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToLamp, storageValue = 1 },
- { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory, storageValue = 1 },
-
- { storage = Storage.Quest.U12_20.GraveDanger.QuestLine, storageValue = 14 },
- { storage = Storage.Quest.U12_20.GraveDanger.Bosses.KingZelosDoor, storageValue = 1 },
-
- { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.Ingol, storageValue = 1 },
- { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.LowerIngol, storageValue = 1 },
- { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.Monster, storageValue = 1 },
- { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.MutatedAbomination, storageValue = 1 },
- { storage = Storage.Quest.U8_54.TheNewFrontier.SnakeHeadTeleport, storageValue = 1 },
- { storage = Storage.Quest.U9_4.LiquidBlackQuest.Visitor, storageValue = 5 },
- { storage = Storage.Quest.U8_4.BloodBrothers.VengothAccess, storageValue = 1 },
-
- -- Assassin Outfit quests
- { storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 },
- { storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, storageValue = 2 },
-
- -- Hunter Outfit quests
- { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 },
- { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet02, storageValue = 1 },
- { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet03, storageValue = 1 },
- { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04, storageValue = 1 },
-
- -- Norseman
- { storage = Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, storageValue = 1 },
- { storage = Storage.OutfitQuest.DefaultStart, storageValue = 1 },
-
- { storage = Storage.HeroRathleton.AccessDoor, storageValue = 1 },
- { storage = Storage.HeroRathleton.AccessTeleport1, storageValue = 1 },
- { storage = Storage.HeroRathleton.AccessTeleport2, storageValue = 1 },
- { storage = Storage.HeroRathleton.AccessTeleport3, storageValue = 1 },
-
- -- Sea Serpent Quest
- { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, storageValue = 5 },
- { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 },
-
- --The White Raven Monastery
- { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, storageValue = 1 },
- { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, storageValue = 1 },
- { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, storageValue = 2 },
- { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, storageValue = 1 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 2 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 4 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 7 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 9 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 12 },
+ { storageName = "BigfootsBurden.Shooting", storage = Storage.Quest.U9_60.BigfootsBurden.Shooting, storageValue = 5 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 16 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 20 },
+ { storageName = "BigfootsBurden.QuestLine", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 23 },
+ { storageName = "BigfootsBurden.QuestLineComplete", storage = Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete, storageValue = 2 },
+ { storageName = "BigfootsBurden.Rank", storage = Storage.Quest.U9_60.BigfootsBurden.Rank, storageValue = 1440 },
+ { storageName = "BigfootsBurden.Warzone1Access", storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, storageValue = 2 },
+ { storageName = "BigfootsBurden.Warzone2Access", storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, storageValue = 2 },
+ { storageName = "BigfootsBurden.Warzone3Access", storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, storageValue = 2 },
+ { storageName = "DangerousDepths.Questline", storage = Storage.Quest.U11_50.DangerousDepths.Questline, storageValue = 10 },
+ { storageName = "DangerousDepths.Access.LavaPumpWarzoneVI", storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneVI, storageValue = 10 },
+ { storageName = "DangerousDepths.Access.LavaPumpWarzoneV", storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneV, storageValue = 10 },
+ { storageName = "DangerousDepths.Access.LavaPumpWarzoneIV", storage = Storage.Quest.U11_50.DangerousDepths.Access.LavaPumpWarzoneIV, storageValue = 30 },
+ { storageName = "DangerousDepths.Dwarves.Points", storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Points, storageValue = 10 },
+ { storageName = "DangerousDepths.Scouts.Points", storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Points, storageValue = 10 },
+ { storageName = "DangerousDepths.Gnomes.Points", storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Points, storageValue = 10 },
+ { storageName = "InServiceOfYalahar.Questline", storage = Storage.Quest.U8_4.InServiceOfYalahar.Questline, storageValue = 51 },
+ { storageName = "InServiceOfYalahar.Mission01", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission01, storageValue = 6 },
+ { storageName = "InServiceOfYalahar.Mission02", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission02, storageValue = 8 },
+ { storageName = "InServiceOfYalahar.Mission03", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission03, storageValue = 6 },
+ { storageName = "InServiceOfYalahar.Mission04", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission04, storageValue = 6 },
+ { storageName = "InServiceOfYalahar.Mission05", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission05, storageValue = 8 },
+ { storageName = "InServiceOfYalahar.Mission06", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission06, storageValue = 5 },
+ { storageName = "InServiceOfYalahar.Mission07", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission07, storageValue = 5 },
+ { storageName = "InServiceOfYalahar.Mission08", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission08, storageValue = 4 },
+ { storageName = "InServiceOfYalahar.Mission09", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission09, storageValue = 2 },
+ { storageName = "InServiceOfYalahar.Mission10", storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission10, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SewerPipe01", storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SewerPipe02", storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SewerPipe03", storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SewerPipe04", storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DiseasedDan", storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedDan, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DiseasedBill", storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedBill, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DiseasedFred", storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedFred, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.AlchemistFormula", storage = Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.BadSide", storage = Storage.Quest.U8_4.InServiceOfYalahar.BadSide, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.GoodSide", storage = Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.MrWestDoor", storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.MrWestStatus", storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.TamerinStatus", storage = Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.MorikSummon", storage = Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.QuaraState", storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.QuaraSplasher", storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.QuaraSharptooth", storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.QuaraInky", storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.MatrixState", storage = Storage.Quest.U8_4.InServiceOfYalahar.MatrixState, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.NotesPalimuth", storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.NotesAzerus", storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DoorToAzerus", storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToAzerus, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DoorToBog", storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToBog, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DoorToLastFight", storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DoorToMatrix", storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToMatrix, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.DoorToQuara", storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToQuara, storageValue = 1 },
+ { storageName = "CultsOfTibia.Questline", storage = Storage.Quest.U11_40.CultsOfTibia.Questline, storageValue = 7 },
+ { storageName = "CultsOfTibia.Minotaurs.JamesfrancisTask", storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.JamesfrancisTask, storageValue = 1 },
+ { storageName = "CultsOfTibia.Minotaurs.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.Minotaurs.BossTimer", storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.BossTimer, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.Stone1", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone1, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.Stone2", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone2, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.Stone3", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Stone3, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.Answer", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.Answer, storageValue = 1 },
+ { storageName = "CultsOfTibia.MotA.QuestionId", storage = Storage.Quest.U11_40.CultsOfTibia.MotA.QuestionId, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.Sulphur", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Sulphur, storageValue = 4 },
+ { storageName = "CultsOfTibia.Barkless.Tar", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Tar, storageValue = 3 },
+ { storageName = "CultsOfTibia.Barkless.Ice", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Ice, storageValue = 3 },
+ { storageName = "CultsOfTibia.Barkless.Objects", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Objects, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.Temp", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.Temp, storageValue = 1 },
+ { storageName = "CultsOfTibia.Orcs.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.Orcs.LookType", storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.LookType, storageValue = 1 },
+ { storageName = "CultsOfTibia.Orcs.BossTimer", storage = Storage.Quest.U11_40.CultsOfTibia.Orcs.BossTimer, storageValue = 1 },
+ { storageName = "CultsOfTibia.Life.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Life.Mission, storageValue = 7 },
+ { storageName = "CultsOfTibia.Life.BossTimer", storage = Storage.Quest.U11_40.CultsOfTibia.Life.BossTimer, storageValue = 1 },
+ { storageName = "CultsOfTibia.Humans.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.Humans.Vaporized", storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Vaporized, storageValue = 1 },
+ { storageName = "CultsOfTibia.Humans.Decaying", storage = Storage.Quest.U11_40.CultsOfTibia.Humans.Decaying, storageValue = 1 },
+ { storageName = "CultsOfTibia.Humans.BossTimer", storage = Storage.Quest.U11_40.CultsOfTibia.Humans.BossTimer, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.Mission", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Mission, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.Monsters", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Monsters, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.Exorcisms", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Exorcisms, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.Time", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.Time, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.BossTimer", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.BossTimer, storageValue = 1 },
+ { storageName = "CultsOfTibia.Minotaurs.BossAccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.BossAccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Minotaurs.AccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Minotaurs.AccessDoor, storageValue = 1 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 1 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 4 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 7 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 16 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 26 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 29 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 32 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 35 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 38 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 41 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 43 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 46 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 47 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 50 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 55 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 56 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 58 },
+ { storageName = "ExplorerSociety.QuestLine", storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 61 },
+ { storageName = "ExplorerSociety.CalassaQuest", storage = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, storageValue = 2 },
+ { storageName = "ForgottenKnowledge.Tomes", storage = Storage.Quest.U11_02.ForgottenKnowledge.Tomes, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.LastLoreKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.LastLoreKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.TimeGuardianKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.TimeGuardianKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.HorrorKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.HorrorKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.DragonkingKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.DragonkingKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.ThornKnightKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.ThornKnightKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.LloydKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.LloydKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.LadyTenebrisKilled", storage = Storage.Quest.U11_02.ForgottenKnowledge.LadyTenebrisKilled, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessMachine", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessMachine, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessLavaTeleport", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessLavaTeleport, storageValue = 1 },
+ { storageName = "BarbarianTest.Questline", storage = Storage.Quest.U8_0.BarbarianTest.Questline, storageValue = 8 },
+ { storageName = "BarbarianTest.Mission01", storage = Storage.Quest.U8_0.BarbarianTest.Mission01, storageValue = 3 },
+ { storageName = "BarbarianTest.Mission02", storage = Storage.Quest.U8_0.BarbarianTest.Mission02, storageValue = 3 },
+ { storageName = "BarbarianTest.Mission03", storage = Storage.Quest.U8_0.BarbarianTest.Mission03, storageValue = 3 },
+ { storageName = "ChildrenOfTheRevolution.Questline", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, storageValue = 21 },
+ { storageName = "ChildrenOfTheRevolution.Mission00", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, storageValue = 2 },
+ { storageName = "ChildrenOfTheRevolution.Mission01", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, storageValue = 3 },
+ { storageName = "ChildrenOfTheRevolution.Mission02", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, storageValue = 5 },
+ { storageName = "ChildrenOfTheRevolution.Mission03", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, storageValue = 3 },
+ { storageName = "ChildrenOfTheRevolution.Mission04", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, storageValue = 6 },
+ { storageName = "ChildrenOfTheRevolution.Mission05", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, storageValue = 3 },
+ { storageName = "ChildrenOfTheRevolution.SpyBuilding01", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding01, storageValue = 1 },
+ { storageName = "ChildrenOfTheRevolution.SpyBuilding02", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding02, storageValue = 1 },
+ { storageName = "ChildrenOfTheRevolution.SpyBuilding03", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding03, storageValue = 1 },
+ { storageName = "ChildrenOfTheRevolution.StrangeSymbols", storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols, storageValue = 1 },
+ { storageName = "DjinnWar.Faction.Greeting", storage = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, storageValue = 2 },
+ { storageName = "DjinnWar.Faction.MaridDoor", storage = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, storageValue = 2 },
+ { storageName = "DjinnWar.Faction.EfreetDoor", storage = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, storageValue = 2 },
+ { storageName = "DjinnWar.EfreetFaction.Start", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, storageValue = 1 },
+ { storageName = "DjinnWar.EfreetFaction.Mission01", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, storageValue = 3 },
+ { storageName = "DjinnWar.EfreetFaction.Mission02", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, storageValue = 3 },
+ { storageName = "DjinnWar.EfreetFaction.Mission03", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, storageValue = 3 },
+ { storageName = "DjinnWar.MaridFaction.Start", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, storageValue = 1 },
+ { storageName = "DjinnWar.MaridFaction.Mission01", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, storageValue = 2 },
+ { storageName = "DjinnWar.MaridFaction.Mission02", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, storageValue = 2 },
+ { storageName = "DjinnWar.MaridFaction.RataMari", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, storageValue = 2 },
+ { storageName = "DjinnWar.MaridFaction.Mission03", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, storageValue = 3 },
+ { storageName = "InServiceOfYalahar.TheWayToYalahar", storage = Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, storageValue = 5 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.Darashia", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.Venore", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.PortHope", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.Thais", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay, storageValue = 1 },
+ { storageName = "InServiceOfYalahar.SearoutesAroundYalahar.Carlin", storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin, storageValue = 1 },
+ { storageName = "TheHiddenCityOfBeregar.DefaultStart", storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, storageValue = 1 },
+ { storageName = "TheHiddenCityOfBeregar.GoingDown", storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, storageValue = 1 },
+ { storageName = "TheHiddenCityOfBeregar.WayToBeregar", storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar, storageValue = 1 },
+ { storageName = "TheIceIslands.Questline", storage = Storage.Quest.U8_0.TheIceIslands.Questline, storageValue = 40 },
+ { storageName = "TheIceIslands.Mission01", storage = Storage.Quest.U8_0.TheIceIslands.Mission01, storageValue = 3 },
+ { storageName = "TheIceIslands.Mission02", storage = Storage.Quest.U8_0.TheIceIslands.Mission02, storageValue = 5 },
+ { storageName = "TheIceIslands.Mission03", storage = Storage.Quest.U8_0.TheIceIslands.Mission03, storageValue = 3 },
+ { storageName = "TheIceIslands.Mission04", storage = Storage.Quest.U8_0.TheIceIslands.Mission04, storageValue = 2 },
+ { storageName = "TheIceIslands.Mission05", storage = Storage.Quest.U8_0.TheIceIslands.Mission05, storageValue = 6 },
+ { storageName = "TheIceIslands.Mission06", storage = Storage.Quest.U8_0.TheIceIslands.Mission06, storageValue = 8 },
+ { storageName = "TheIceIslands.Mission07", storage = Storage.Quest.U8_0.TheIceIslands.Mission07, storageValue = 3 },
+ { storageName = "TheIceIslands.Mission08", storage = Storage.Quest.U8_0.TheIceIslands.Mission08, storageValue = 4 },
+ { storageName = "TheIceIslands.Mission09", storage = Storage.Quest.U8_0.TheIceIslands.Mission09, storageValue = 2 },
+ { storageName = "TheIceIslands.Mission10", storage = Storage.Quest.U8_0.TheIceIslands.Mission10, storageValue = 2 },
+ { storageName = "TheIceIslands.Mission11", storage = Storage.Quest.U8_0.TheIceIslands.Mission11, storageValue = 2 },
+ { storageName = "TheIceIslands.Mission12", storage = Storage.Quest.U8_0.TheIceIslands.Mission12, storageValue = 6 },
+ { storageName = "TheIceIslands.yakchalDoor", storage = Storage.Quest.U8_0.TheIceIslands.yakchalDoor, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.Questline", storage = Storage.Quest.U8_2.TheInquisitionQuest.Questline, storageValue = 25 },
+ { storageName = "TheInquisitionQuest.Mission01", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission01, storageValue = 7 },
+ { storageName = "TheInquisitionQuest.Mission02", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission02, storageValue = 3 },
+ { storageName = "TheInquisitionQuest.Mission03", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission03, storageValue = 6 },
+ { storageName = "TheInquisitionQuest.Mission04", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission04, storageValue = 3 },
+ { storageName = "TheInquisitionQuest.Mission05", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission05, storageValue = 3 },
+ { storageName = "TheInquisitionQuest.Mission06", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission06, storageValue = 3 },
+ { storageName = "TheInquisitionQuest.Mission07", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission07, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.GrofGuard", storage = Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.KulagGuard", storage = Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.TimGuard", storage = Storage.Quest.U8_2.TheInquisitionQuest.TimGuard, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.WalterGuard", storage = Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard, storageValue = 1 },
+ { storageName = "TheInquisitionQuest.StorkusVampiredust", storage = Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust, storageValue = 1 },
+ { storageName = "TheNewFrontier.Questline", storage = Storage.Quest.U8_54.TheNewFrontier.Questline, storageValue = 29 },
+ { storageName = "TheNewFrontier.Mission01", storage = Storage.Quest.U8_54.TheNewFrontier.Mission01, storageValue = 3 },
+ { storageName = "TheNewFrontier.Mission02[1]", storage = Storage.Quest.U8_54.TheNewFrontier.Mission02[1], storageValue = 4 },
+ { storageName = "TheNewFrontier.Mission03", storage = Storage.Quest.U8_54.TheNewFrontier.Mission03, storageValue = 3 },
+ { storageName = "TheNewFrontier.Mission04", storage = Storage.Quest.U8_54.TheNewFrontier.Mission04, storageValue = 2 },
+ { storageName = "TheNewFrontier.Mission05[1]", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05[1], storageValue = 2 },
+ { storageName = "TheNewFrontier.Mission06", storage = Storage.Quest.U8_54.TheNewFrontier.Mission06, storageValue = 5 },
+ { storageName = "TheNewFrontier.Mission07[1]", storage = Storage.Quest.U8_54.TheNewFrontier.Mission07[1], storageValue = 2 },
+ { storageName = "TheNewFrontier.Mission08", storage = Storage.Quest.U8_54.TheNewFrontier.Mission08, storageValue = 2 },
+ { storageName = "TheNewFrontier.Mission09[1]", storage = Storage.Quest.U8_54.TheNewFrontier.Mission09[1], storageValue = 3 },
+ { storageName = "TheNewFrontier.Mission10[1]", storage = Storage.Quest.U8_54.TheNewFrontier.Mission10[1], storageValue = 2 },
+ { storageName = "TheNewFrontier.Mission10.MagicCarpetDoor", storage = Storage.Quest.U8_54.TheNewFrontier.Mission10.MagicCarpetDoor, storageValue = 1 },
+ { storageName = "TheNewFrontier.TomeofKnowledge", storage = Storage.Quest.U8_54.TheNewFrontier.TomeofKnowledge, storageValue = 12 },
+ { storageName = "TheNewFrontier.Mission02.Beaver1", storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver1, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission02.Beaver2", storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver2, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission02.Beaver3", storage = Storage.Quest.U8_54.TheNewFrontier.Mission02.Beaver3, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.KingTibianus", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.KingTibianus, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.Leeland", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Leeland, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.Angus", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Angus, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.Wyrdin", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Wyrdin, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.Telas", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Telas, storageValue = 1 },
+ { storageName = "TheNewFrontier.Mission05.Humgolf", storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Humgolf, storageValue = 1 },
+ { storageName = "TheShatteredIsles.DefaultStart", storage = Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, storageValue = 3 },
+ { storageName = "TheShatteredIsles.TheGovernorDaughter", storage = Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, storageValue = 3 },
+ { storageName = "TheShatteredIsles.TheErrand", storage = Storage.Quest.U7_8.TheShatteredIsles.TheErrand, storageValue = 2 },
+ { storageName = "TheShatteredIsles.AccessToMeriana", storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, storageValue = 1 },
+ { storageName = "TheShatteredIsles.APoemForTheMermaid", storage = Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, storageValue = 3 },
+ { storageName = "TheShatteredIsles.ADjinnInLove", storage = Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, storageValue = 5 },
+ { storageName = "TheShatteredIsles.AccessToLagunaIsland", storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, storageValue = 1 },
+ { storageName = "TheShatteredIsles.AccessToGoroma", storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, storageValue = 1 },
+ { storageName = "TheShatteredIsles.Shipwrecked", storage = Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, storageValue = 2 },
+ { storageName = "TheShatteredIsles.DragahsSpellbook", storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, storageValue = 1 },
+ { storageName = "TheShatteredIsles.TheCounterspell", storage = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, storageValue = 4 },
+ { storageName = "TheThievesGuildQuest.Questline", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Questline, storageValue = 1 },
+ { storageName = "TheThievesGuildQuest.Mission01", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, storageValue = 2 },
+ { storageName = "TheThievesGuildQuest.Mission02", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, storageValue = 3 },
+ { storageName = "TheThievesGuildQuest.Mission03", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, storageValue = 3 },
+ { storageName = "TheThievesGuildQuest.Mission04", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, storageValue = 8 },
+ { storageName = "TheThievesGuildQuest.Mission05", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, storageValue = 2 },
+ { storageName = "TheThievesGuildQuest.Mission06", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, storageValue = 4 },
+ { storageName = "TheThievesGuildQuest.Mission07", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, storageValue = 2 },
+ { storageName = "TheThievesGuildQuest.Mission08", storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, storageValue = 1 },
+ { storageName = "TheTravellingTrader.Mission01", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 1 },
+ { storageName = "TheTravellingTrader.Mission01_2", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 2 },
+ { storageName = "TheTravellingTrader.Mission02", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission02, storageValue = 5 },
+ { storageName = "TheTravellingTrader.Mission03", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission03, storageValue = 3 },
+ { storageName = "TheTravellingTrader.Mission04", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission04, storageValue = 3 },
+ { storageName = "TheTravellingTrader.Mission05", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission05, storageValue = 3 },
+ { storageName = "TheTravellingTrader.Mission06", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission06, storageValue = 2 },
+ { storageName = "TheTravellingTrader.Mission07", storage = Storage.Quest.U8_1.TheTravellingTrader.Mission07, storageValue = 1 },
+ { storageName = "BarbarianArena.QuestLogGreenhorn", storage = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, storageValue = 1 },
+ { storageName = "TibiaTales.DefaultStart", storage = Storage.Quest.U8_1.TibiaTales.DefaultStart, storageValue = 1 },
+ { storageName = "TibiaTales.ToAppeaseTheMightyQuest", storage = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 },
+ { storageName = "12450", storage = 12450, storageValue = 6 },
+ { storageName = "12330", storage = 12330, storageValue = 1 },
+ { storageName = "12332", storage = 12332, storageValue = 13 },
+ { storageName = "12333", storage = 12333, storageValue = 3 },
+ { storageName = "FriendsAndTraders.DefaultStart", storage = Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, storageValue = 1 },
+ { storageName = "FriendsAndTraders.TheSweatyCyclops", storage = Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, storageValue = 2 },
+ { storageName = "FriendsAndTraders.TheMermaidMarina", storage = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, storageValue = 2 },
+ { storageName = "FriendsAndTraders.TheBlessedStake", storage = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, storageValue = 12 },
+ { storageName = "100157", storage = 100157, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.Questline", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, storageValue = 29 },
+ { storageName = "WrathOfTheEmperor.Mission01", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, storageValue = 3 },
+ { storageName = "WrathOfTheEmperor.Mission02", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, storageValue = 3 },
+ { storageName = "WrathOfTheEmperor.Mission03", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, storageValue = 3 },
+ { storageName = "WrathOfTheEmperor.Mission04", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, storageValue = 3 },
+ { storageName = "WrathOfTheEmperor.Mission05", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, storageValue = 3 },
+ { storageName = "WrathOfTheEmperor.Mission06", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, storageValue = 4 },
+ { storageName = "WrathOfTheEmperor.Mission07", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, storageValue = 6 },
+ { storageName = "WrathOfTheEmperor.Mission08", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, storageValue = 2 },
+ { storageName = "WrathOfTheEmperor.Mission09", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, storageValue = 2 },
+ { storageName = "WrathOfTheEmperor.Mission10", storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, storageValue = 1 },
+ { storageName = "TheApeCity.Started", storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 },
+ { storageName = "TheApeCity.Questline", storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 },
+ { storageName = "BanutaSecretTunnel.DeeperBanutaShortcut", storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 },
+ { storageName = "OramondQuest.QuestLine", storage = Storage.Quest.U10_50.OramondQuest.QuestLine, storageValue = 1 },
+ { storageName = "OramondQuest.ToTakeRoots.Mission", storage = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, storageValue = 3000 },
+ { storageName = "DangerousDepths.Questline", storage = Storage.Quest.U11_50.DangerousDepths.Questline, storageValue = 1 },
+ { storageName = "DangerousDepths.Dwarves.Home", storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Home, storageValue = 2 },
+ { storageName = "DangerousDepths.Dwarves.Subterranean", storage = Storage.Quest.U11_50.DangerousDepths.Dwarves.Subterranean, storageValue = 2 },
+ { storageName = "DangerousDepths.Gnomes.Measurements", storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Measurements, storageValue = 2 },
+ { storageName = "DangerousDepths.Gnomes.Ordnance", storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Ordnance, storageValue = 3 },
+ { storageName = "DangerousDepths.Gnomes.Charting", storage = Storage.Quest.U11_50.DangerousDepths.Gnomes.Charting, storageValue = 2 },
+ { storageName = "DangerousDepths.Scouts.Growth", storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Growth, storageValue = 2 },
+ { storageName = "DangerousDepths.Scouts.Diremaw", storage = Storage.Quest.U11_50.DangerousDepths.Scouts.Diremaw, storageValue = 2 },
+ { storageName = "ThreatenedDreams.QuestLine", storage = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, storageValue = 1 },
+ { storageName = "ThreatenedDreams.Mission01[1]", storage = Storage.Quest.U11_40.ThreatenedDreams.Mission01[1], storageValue = 16 },
+ { storageName = "ThreatenedDreams.Mission02.KroazurAccess", storage = Storage.Quest.U11_40.ThreatenedDreams.Mission02.KroazurAccess, storageValue = 1 },
+ { storageName = "AdventurersGuild.QuestLine", storage = Storage.Quest.U9_80.AdventurersGuild.QuestLine, storageValue = 1 },
+ { storageName = "TheGreatDragonHunt.WarriorSkeleton", storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 1 },
+ { storageName = "TheGreatDragonHunt.WarriorSkeleton_2", storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 2 },
+ { storageName = "TheLostBrotherQuest", storage = Storage.Quest.U10_80.TheLostBrotherQuest, storageValue = 3 },
+ { storageName = "Dawnport.Questline", storage = Storage.Quest.U10_55.Dawnport.Questline, storageValue = 1 },
+ { storageName = "Dawnport.GoMain", storage = Storage.Quest.U10_55.Dawnport.GoMain, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessDeath", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessDeath, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessViolet", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessViolet, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessEarth", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessEarth, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessFire", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessFire, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessIce", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessIce, storageValue = 1 },
+ { storageName = "ForgottenKnowledge.AccessGolden", storage = Storage.Quest.U11_02.ForgottenKnowledge.AccessGolden, storageValue = 1 },
+ { storageName = "GrimvaleQuest.AncientFeudDoors", storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors, storageValue = 1 },
+ { storageName = "GrimvaleQuest.AncientFeudShortcut", storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut, storageValue = 1 },
+ { storageName = "Kilmaresh.AccessDoor", storage = Storage.Kilmaresh.AccessDoor, storageValue = 1 },
+ { storageName = "Kilmaresh.CatacombDoors", storage = Storage.Kilmaresh.CatacombDoors, storageValue = 1 },
+ { storageName = "TheOrderOfTheLion.AccessEastSide", storage = Storage.Quest.U12_40.TheOrderOfTheLion.AccessEastSide, storageValue = 1 },
+ { storageName = "TheOrderOfTheLion.AccessSouthernSide", storage = Storage.Quest.U12_40.TheOrderOfTheLion.AccessSouthernSide, storageValue = 1 },
+ { storageName = "APiratesTail.TentuglyDoor", storage = Storage.Quest.U12_60.APiratesTail.TentuglyDoor, storageValue = 1 },
+ { storageName = "APiratesTail.RascacoonShortcut", storage = Storage.Quest.U12_60.APiratesTail.RascacoonShortcut, storageValue = 1 },
+ { storageName = "AdventuresOfGalthen.AccessDoor", storage = Storage.Quest.U12_70.AdventuresOfGalthen.AccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.AccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.AccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.TrialAccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.TrialAccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.TarAccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.TarAccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Barkless.BossAccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Barkless.BossAccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Life.AccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Life.AccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.Misguided.AccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.Misguided.AccessDoor, storageValue = 1 },
+ { storageName = "CultsOfTibia.FinalBoss.AccessDoor", storage = Storage.Quest.U11_40.CultsOfTibia.FinalBoss.AccessDoor, storageValue = 1 },
+ { storageName = "FerumbrasAscension.FirstDoor", storage = Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, storageValue = 1 },
+ { storageName = "FerumbrasAscension.MonsterDoor", storage = Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, storageValue = 1 },
+ { storageName = "FerumbrasAscension.TarbazDoor", storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, storageValue = 1 },
+ { storageName = "FerumbrasAscension.HabitatsAccess", storage = Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, storageValue = 1 },
+ { storageName = "FerumbrasAscension.TheLordOfTheLiceAccess", storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 },
+ { storageName = "FerumbrasAscension.Statue", storage = Storage.Quest.U10_90.FerumbrasAscension.Statue, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.AwarnessEmperor", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.BossRoom", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.InnerSanctum", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.Rebel", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.SleepingDragon", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.Wote10", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.Zizzle", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, storageValue = 1 },
+ { storageName = "WrathOfTheEmperor.TeleportAccess.Zlak", storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, storageValue = 1 },
+ { storageName = "DjinnWar.EfreetFaction.DoorToLamp", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToLamp, storageValue = 1 },
+ { storageName = "DjinnWar.EfreetFaction.DoorToMaridTerritory", storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, storageValue = 1 },
+ { storageName = "DjinnWar.MaridFaction.DoorToLamp", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToLamp, storageValue = 1 },
+ { storageName = "DjinnWar.MaridFaction.DoorToEfreetTerritory", storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory, storageValue = 1 },
+ { storageName = "GraveDanger.QuestLine", storage = Storage.Quest.U12_20.GraveDanger.QuestLine, storageValue = 14 },
+ { storageName = "GraveDanger.Bosses.KingZelosDoor", storage = Storage.Quest.U12_20.GraveDanger.Bosses.KingZelosDoor, storageValue = 1 },
+ { storageName = "CradleOfMonsters.Access.Ingol", storage = Storage.Quest.U13_10.CradleOfMonsters.Access.Ingol, storageValue = 1 },
+ { storageName = "CradleOfMonsters.Access.LowerIngol", storage = Storage.Quest.U13_10.CradleOfMonsters.Access.LowerIngol, storageValue = 1 },
+ { storageName = "CradleOfMonsters.Access.Monster", storage = Storage.Quest.U13_10.CradleOfMonsters.Access.Monster, storageValue = 1 },
+ { storageName = "CradleOfMonsters.Access.MutatedAbomination", storage = Storage.Quest.U13_10.CradleOfMonsters.Access.MutatedAbomination, storageValue = 1 },
+ { storageName = "TheNewFrontier.SnakeHeadTeleport", storage = Storage.Quest.U8_54.TheNewFrontier.SnakeHeadTeleport, storageValue = 1 },
+ { storageName = "LiquidBlackQuest.Visitor", storage = Storage.Quest.U9_4.LiquidBlackQuest.Visitor, storageValue = 5 },
+ { storageName = "BloodBrothers.VengothAccess", storage = Storage.Quest.U8_4.BloodBrothers.VengothAccess, storageValue = 1 },
+ { storageName = "KillingInTheNameOf.BudrikMinos", storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 },
+ { storageName = "ToOutfoxAFoxQuest.Questline", storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, storageValue = 2 },
+ { storageName = "HunterOutfits.HunterMusicSheet01", storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 },
+ { storageName = "HunterOutfits.HunterMusicSheet02", storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet02, storageValue = 1 },
+ { storageName = "HunterOutfits.HunterMusicSheet03", storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet03, storageValue = 1 },
+ { storageName = "HunterOutfits.HunterMusicSheet04", storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04, storageValue = 1 },
+ { storageName = "TheIceIslands.NorsemanOutfit", storage = Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, storageValue = 1 },
+ { storageName = "OutfitQuest.DefaultStart", storage = Storage.OutfitQuest.DefaultStart, storageValue = 1 },
+ { storageName = "HeroRathleton.AccessDoor", storage = Storage.HeroRathleton.AccessDoor, storageValue = 1 },
+ { storageName = "HeroRathleton.AccessTeleport1", storage = Storage.HeroRathleton.AccessTeleport1, storageValue = 1 },
+ { storageName = "HeroRathleton.AccessTeleport2", storage = Storage.HeroRathleton.AccessTeleport2, storageValue = 1 },
+ { storageName = "HeroRathleton.AccessTeleport3", storage = Storage.HeroRathleton.AccessTeleport3, storageValue = 1 },
+ { storageName = "TheHuntForTheSeaSerpent.FishForASerpent", storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, storageValue = 5 },
+ { storageName = "TheHuntForTheSeaSerpent.QuestLine", storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 },
+ { storageName = "TheWhiteRavenMonastery.QuestLog", storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, storageValue = 1 },
+ { storageName = "TheWhiteRavenMonastery.Passage", storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, storageValue = 1 },
+ { storageName = "TheWhiteRavenMonastery.Diary", storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, storageValue = 2 },
+ { storageName = "TheWhiteRavenMonastery.Door", storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, storageValue = 1 },
}
-- from Position: (33201, 31762, 1)
@@ -405,8 +367,15 @@ local function playerFreeQuestStart(playerId, index)
return
end
- if player:getStorageValue(questTable[index].storage) ~= questTable[index].storageValue then
- player:setStorageValue(questTable[index].storage, questTable[index].storageValue)
+ local questData = questTable[index]
+ local currentStorageValue = player:getStorageValue(questData.storage)
+
+ if not questData.storage then
+ logger.warn("[Freequest System]: error storage for '" .. questData.storageName .. "' is nil for the index")
+ elseif currentStorageValue ~= questData.storageValue then
+ player:setStorageValue(questData.storage, questData.storageValue)
+ elseif currentStorageValue == -1 then
+ logger.warn("[Freequest System]: warning Storage '" .. questData.storageName .. "' currently nil for player ID " .. playerId)
end
end
diff --git a/data-otservbr-global/scripts/creaturescripts/others/login.lua b/data-otservbr-global/scripts/creaturescripts/others/login.lua
index 8457209e90a..c833dfd90fb 100644
--- a/data-otservbr-global/scripts/creaturescripts/others/login.lua
+++ b/data-otservbr-global/scripts/creaturescripts/others/login.lua
@@ -12,18 +12,18 @@ function playerLogin.onLogin(player)
town = table.contains(freeTowns, town:getName()) and town or Town(defaultTown)
player:teleportTo(town:getTemplePosition())
player:setTown(town)
- player:sendTextMessage(MESSAGE_FAILURE, "Your premium time has expired.")
+ player:sendTextMessage(MESSAGE_FAILURE, "Your premium time has expired!")
if sex == 1 then
- player:setOutfit({ lookType = 128, lookFeet = 114, lookLegs = 134, lookHead = 114, lookAddons = 0 })
+ player:setOutfit({ lookType = 128, lookHead = 114, lookBody = 120, lookLegs = 132, lookFeet = 115, lookAddons = 0 })
elseif sex == 0 then
- player:setOutfit({ lookType = 136, lookFeet = 114, lookLegs = 134, lookHead = 114, lookAddons = 0 })
+ player:setOutfit({ lookType = 136, lookHead = 114, lookBody = 120, lookLegs = 132, lookFeet = 115, lookAddons = 0 })
end
if home and not player:isPremium() then
setHouseOwner(home, 0)
- player:sendTextMessage(MESSAGE_GAME_HIGHLIGHT, "You've lost your house because you are not premium anymore.")
- player:sendTextMessage(MESSAGE_GAME_HIGHLIGHT, "Your items from house are send to your inbox.")
+ player:sendTextMessage(MESSAGE_GAME_HIGHLIGHT, "You have lost your house because you are no longer a premium account.")
+ player:sendTextMessage(MESSAGE_GAME_HIGHLIGHT, "Your items from the house have been sent to your inbox.")
end
end
diff --git a/data-otservbr-global/scripts/lib/monster_functions.lua b/data-otservbr-global/scripts/lib/monster_functions.lua
new file mode 100644
index 00000000000..cdb56c5e177
--- /dev/null
+++ b/data-otservbr-global/scripts/lib/monster_functions.lua
@@ -0,0 +1,8 @@
+function Monster:handleCobraOnSpawn()
+ if Game.getStorageValue(Global.Storage.CobraFlask) >= os.time() then
+ monster:setHealth(monster:getMaxHealth() * 0.75)
+ monster:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
+ else
+ Game.setStorageValue(Global.Storage.CobraFlask, -1)
+ end
+end
diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua
index 7828b7d935e..bd4e2b171fe 100644
--- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua
+++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua
@@ -1,91 +1,69 @@
-local crystals = {
- [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 },
- [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 },
- [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 },
- [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 },
- [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 },
- [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 },
- [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 },
- [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 },
-}
-
local config = {
- centerRoom = Position(33392, 31473, 14),
- BossPosition = Position(33392, 31473, 14),
+ boss = {
+ name = "Ascending Ferumbras",
+ position = Position(33392, 31473, 14),
+ },
+ timeToFightAgain = 60 * 60 * 20 * 24,
playerPositions = {
- Position(33269, 31477, 14),
- Position(33269, 31478, 14),
- Position(33269, 31479, 14),
- Position(33269, 31480, 14),
- Position(33269, 31481, 14),
- Position(33270, 31477, 14),
- Position(33270, 31478, 14),
- Position(33270, 31479, 14),
- Position(33270, 31480, 14),
- Position(33270, 31481, 14),
- Position(33271, 31477, 14),
- Position(33271, 31478, 14),
- Position(33271, 31479, 14),
- Position(33271, 31480, 14),
- Position(33271, 31481, 14),
+ { pos = Position(33270, 31477, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33269, 31477, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33269, 31478, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33269, 31479, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33269, 31480, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33269, 31481, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33270, 31478, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33270, 31479, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33270, 31480, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33270, 31481, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33271, 31477, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33271, 31478, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33271, 31479, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33271, 31480, 14), teleport = Position(33392, 31479, 14) },
+ { pos = Position(33271, 31481, 14), teleport = Position(33392, 31479, 14) },
},
- newPosition = Position(33392, 31479, 14),
-}
-
-local leverFerumbras = Action()
-
-function leverFerumbras.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- local playersTable = {}
- if item.itemid == 8911 then
- if player:getPosition() ~= Position(33270, 31477, 14) then
- item:transform(8912)
- return true
- end
- end
- if item.itemid == 8911 then
- if player:doCheckBossRoom("Ascending Ferumbras", Position(33379, 31460, 14), Position(33405, 31485, 14)) then
- Game.createMonster("Ascending Ferumbras", config.BossPosition, true, true)
- for b = 1, 10 do
- local xrand = math.random(-10, 10)
- local yrand = math.random(-10, 10)
- local position = Position(33392 + xrand, 31473 + yrand, 14)
- if Game.createMonster("rift invader", position) then
- end
- end
- for x = 33269, 33271 do
- for y = 31477, 31481 do
- local playerTile = Tile(Position(x, y, 14)):getTopCreature()
- if playerTile and playerTile:isPlayer() then
- playerTile:getPosition():sendMagicEffect(CONST_ME_POFF)
- playerTile:teleportTo(config.newPosition)
- playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasTimer, os.time() + 60 * 60 * 20 * 24)
- table.insert(playersTable, playerTile:getId())
- end
- end
- end
- Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, 0)
- Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 0)
- for _, crystal in pairs(crystals) do
- local pos = crystal.crystalPosition
- local stg = crystal.globalStorage
- local sqm = Tile(pos)
- if sqm then
- local item = sqm:getItemById(14961)
- if item then
- item:transform(14955)
- end
+ specPos = {
+ from = Position(33379, 31460, 14),
+ to = Position(33405, 31485, 14),
+ },
+ exit = Position(33319, 32318, 13),
+ monsters = {
+ { name = "rift invader", pos = Position(33385, 31466, 14) },
+ { name = "rift invader", pos = Position(33396, 31466, 14) },
+ { name = "rift invader", pos = Position(33392, 31480, 14) },
+ { name = "rift invader", pos = Position(33392, 31468, 14) },
+ { name = "rift invader", pos = Position(33385, 31473, 14) },
+ { name = "rift invader", pos = Position(33398, 31478, 14) },
+ { name = "rift invader", pos = Position(33384, 31478, 14) },
+ { name = "rift invader", pos = Position(33390, 31463, 14) },
+ { name = "rift invader", pos = Position(33400, 31473, 14) },
+ { name = "rift invader", pos = Position(33400, 31465, 14) },
+ },
+ onUseExtra = function(player)
+ local crystals = {
+ [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 },
+ [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 },
+ [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 },
+ [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 },
+ [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 },
+ [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 },
+ [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 },
+ [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 },
+ }
+ Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, 0)
+ Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 0)
+ for _, crystal in pairs(crystals) do
+ local tile = Tile(crystal.crystalPosition)
+ if tile then
+ local item = tile:getItemById(14961)
+ if item then
+ item:transform(14955)
end
- Game.setStorageValue(stg, 0)
end
- addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33379, 31460, 14), Position(33405, 31485, 14), Position(33319, 32318, 13))
- item:transform(8912)
+ Game.setStorageValue(crystal.globalStorage, 0)
end
- elseif item.itemid == 8912 then
- item:transform(8911)
- end
- return true
-end
+ end,
+}
-leverFerumbras:uid(1021)
+local leverFerumbras = BossLever(config)
+leverFerumbras:position(Position(33270, 31476, 14))
leverFerumbras:register()
diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua
index e9592b71585..97cb6fef4f9 100644
--- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua
+++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua
@@ -1,57 +1,23 @@
local config = {
- centerRoom = Position(33215, 31456, 12),
- BossPosition = Position(33220, 31460, 12),
+ boss = {
+ name = "The Lord of the Lice",
+ position = Position(33220, 31460, 12),
+ },
+ timeToFightAgain = 2 * 24 * 60 * 60,
playerPositions = {
- Position(33197, 31475, 11),
- Position(33198, 31475, 11),
- Position(33199, 31475, 11),
- Position(33200, 31475, 11),
- Position(33201, 31475, 11),
+ { pos = Position(33201, 31475, 11), teleport = Position(33215, 31470, 12) },
+ { pos = Position(33197, 31475, 11), teleport = Position(33215, 31470, 12) },
+ { pos = Position(33198, 31475, 11), teleport = Position(33215, 31470, 12) },
+ { pos = Position(33199, 31475, 11), teleport = Position(33215, 31470, 12) },
+ { pos = Position(33200, 31475, 11), teleport = Position(33215, 31470, 12) },
+ },
+ specPos = {
+ from = Position(33187, 31429, 12),
+ to = Position(33242, 31487, 12),
},
- newPosition = Position(33215, 31470, 12),
+ exit = Position(33319, 32318, 13),
}
-local ferumbrasAscendantRatLever = Action()
-
-function ferumbrasAscendantRatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- if item.itemid == 8911 then
- if player:getPosition() ~= Position(33201, 31475, 11) then
- item:transform(8912)
- return true
- end
- end
-
- if item.itemid == 8911 then
- local playersTable = {}
- if player:doCheckBossRoom("The Lord of the Lice", Position(33187, 31429, 12), Position(33242, 31487, 12)) then
- local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30)
- for i = 1, #specs do
- spec = specs[i]
- if spec:isPlayer() then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Lord of The Lice.")
- return true
- end
- end
- Game.createMonster("the lord of the lice", config.BossPosition, true, true)
- for x = 33197, 33201 do
- local playerTile = Tile(Position(x, 31475, 11)):getTopCreature()
- if playerTile and playerTile:isPlayer() then
- playerTile:getPosition():sendMagicEffect(CONST_ME_POFF)
- playerTile:teleportTo(config.newPosition)
- playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceTimer, os.time() + 60 * 60 * 2 * 24)
- table.insert(playersTable, playerTile:getId())
- end
- end
- addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33187, 31429, 12), Position(33242, 31487, 12), Position(33319, 32318, 13))
- item:transform(8912)
- end
- elseif item.itemid == 8912 then
- item:transform(8911)
- end
-
- return true
-end
-
-ferumbrasAscendantRatLever:uid(1030)
-ferumbrasAscendantRatLever:register()
+local leverLordOfTheLice = BossLever(config)
+leverLordOfTheLice:position(Position(33202, 31475, 11))
+leverLordOfTheLice:register()
diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua
index 9e061a2f4a4..6782d30c024 100644
--- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua
+++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua
@@ -1,56 +1,23 @@
local config = {
- centerRoom = Position(33406, 32418, 14),
- BossPosition = Position(33406, 32418, 14),
+ boss = {
+ name = "The Shatterer",
+ position = Position(33406, 32418, 14),
+ },
+ timeToFightAgain = 2 * 24 * 60 * 60,
playerPositions = {
- Position(33403, 32465, 13),
- Position(33404, 32465, 13),
- Position(33405, 32465, 13),
- Position(33406, 32465, 13),
- Position(33407, 32465, 13),
+ { pos = Position(33403, 32465, 13), teleport = Position(33398, 32414, 14) },
+ { pos = Position(33404, 32465, 13), teleport = Position(33398, 32414, 14) },
+ { pos = Position(33405, 32465, 13), teleport = Position(33398, 32414, 14) },
+ { pos = Position(33406, 32465, 13), teleport = Position(33398, 32414, 14) },
+ { pos = Position(33407, 32465, 13), teleport = Position(33398, 32414, 14) },
+ },
+ specPos = {
+ from = Position(33377, 32390, 14),
+ to = Position(33446, 32447, 14),
},
- newPosition = Position(33398, 32414, 14),
+ exit = Position(33319, 32318, 13),
}
-local ferumbrasAscendantTheShattererLever = Action()
-
-function ferumbrasAscendantTheShattererLever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- if item.itemid == 8912 then
- if player:getPosition() ~= Position(33403, 32465, 13) then
- item:transform(8911)
- return true
- end
- end
- if item.itemid == 8912 then
- local playersTable = {}
- if player:doCheckBossRoom("The Shatterer", Position(33377, 32390, 14), Position(33446, 32447, 14)) then
- local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30)
- for i = 1, #specs do
- spec = specs[i]
- if spec:isPlayer() then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Shatterer.")
- return true
- end
- end
- Game.createMonster("The Shatterer", config.BossPosition, true, true)
- for x = 33403, 33407 do
- local playerTile = Tile(Position(x, 32465, 13)):getTopCreature()
- if playerTile and playerTile:isPlayer() then
- playerTile:getPosition():sendMagicEffect(CONST_ME_POFF)
- playerTile:teleportTo(config.newPosition)
- playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererTimer, os.time() + 60 * 60 * 2 * 24)
- table.insert(playersTable, playerTile:getId())
- end
- end
- addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33377, 32390, 14), Position(33446, 32447, 14), Position(33319, 32318, 13))
- item:transform(8911)
- end
- elseif item.itemid == 8911 then
- item:transform(8912)
- end
-
- return true
-end
-
-ferumbrasAscendantTheShattererLever:uid(1029)
-ferumbrasAscendantTheShattererLever:register()
+local leverShatterer = BossLever(config)
+leverShatterer:position(Position(33402, 32465, 13))
+leverShatterer:register()
diff --git a/data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua
index 698ada382b2..ff4c20ff88d 100644
--- a/data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua
+++ b/data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua
@@ -1,168 +1,50 @@
-local lever = Action()
-
local config = {
- centerRoom = { x = 33616, y = 31022, z = 14 },
- range = 10,
- storage = Storage.Quest.U11_02.TheFirstDragon.FirstDragonTimer,
- monsterPosition = {
- { position = Position(33574, 31013, 14) },
- { position = Position(33592, 31013, 14) },
- { position = Position(33583, 31022, 14) },
- { position = Position(33574, 31031, 14) },
- { position = Position(33592, 31031, 14) },
+ boss = {
+ name = "spirit of fertility",
+ position = Position(33625, 31021, 14),
},
+ timeToFightAgain = 20 * 60 * 60,
playerPositions = {
- Position(33582, 30993, 14),
- Position(33583, 30993, 14),
- Position(33584, 30993, 14),
- Position(33582, 30994, 14),
- Position(33583, 30994, 14),
- Position(33584, 30994, 14),
- Position(33582, 30995, 14),
- Position(33583, 30995, 14),
- Position(33584, 30995, 14),
- Position(33582, 30996, 14),
- Position(33583, 30996, 14),
- Position(33584, 30996, 14),
- Position(33582, 30997, 14),
- Position(33583, 30997, 14),
- Position(33584, 30997, 14),
- },
- toPosition1 = Position(33574, 31017, 14),
- roomTile1 = {
- { fromPosition = Position(33582, 30993, 14) },
- { fromPosition = Position(33583, 30993, 14) },
- { fromPosition = Position(33584, 30993, 14) },
- },
- toPosition2 = Position(33592, 31017, 14),
- roomTile2 = {
- { fromPosition = Position(33582, 30994, 14) },
- { fromPosition = Position(33583, 30994, 14) },
- { fromPosition = Position(33584, 30994, 14) },
- },
- toPosition3 = Position(33592, 31035, 14),
- roomTile3 = {
- { fromPosition = Position(33582, 30995, 14) },
- { fromPosition = Position(33583, 30995, 14) },
- { fromPosition = Position(33584, 30995, 14) },
- },
- toPosition4 = Position(33574, 31035, 14),
- roomTile4 = {
- { fromPosition = Position(33582, 30996, 14) },
- { fromPosition = Position(33583, 30996, 14) },
- { fromPosition = Position(33584, 30996, 14) },
- },
- toPosition5 = Position(33583, 31026, 14),
- roomTile5 = {
- { fromPosition = Position(33582, 30997, 14) },
- { fromPosition = Position(33583, 30997, 14) },
- { fromPosition = Position(33584, 30997, 14) },
- },
- clearArea = {
+ { pos = Position(33583, 30993, 14), teleport = Position(33592, 31017, 14) },
+ { pos = Position(33582, 30993, 14), teleport = Position(33574, 31017, 14) },
+ { pos = Position(33584, 30993, 14), teleport = Position(33592, 31035, 14) },
+ { pos = Position(33582, 30994, 14), teleport = Position(33574, 31035, 14) },
+ { pos = Position(33583, 30994, 14), teleport = Position(33583, 31026, 14) },
+ { pos = Position(33584, 30994, 14), teleport = Position(33574, 31017, 14) },
+ { pos = Position(33582, 30995, 14), teleport = Position(33592, 31017, 14) },
+ { pos = Position(33583, 30995, 14), teleport = Position(33592, 31035, 14) },
+ { pos = Position(33584, 30995, 14), teleport = Position(33574, 31035, 14) },
+ { pos = Position(33582, 30996, 14), teleport = Position(33583, 31026, 14) },
+ { pos = Position(33583, 30996, 14), teleport = Position(33574, 31017, 14) },
+ { pos = Position(33584, 30996, 14), teleport = Position(33592, 31017, 14) },
+ { pos = Position(33582, 30997, 14), teleport = Position(33592, 31035, 14) },
+ { pos = Position(33583, 30997, 14), teleport = Position(33574, 31035, 14) },
+ { pos = Position(33584, 30997, 14), teleport = Position(33583, 31026, 14) },
+ },
+ specPos = {
from = Position(33566, 31006, 14),
to = Position(33626, 31032, 14),
},
-}
-
-local function clearMonstersInArea(fromPos, toPos)
- for z = fromPos.z, toPos.z do
- for y = fromPos.y, toPos.y do
- for x = fromPos.x, toPos.x do
- local tile = Tile(Position(x, y, z))
- if tile then
- local creature = tile:getTopCreature()
- if creature and creature:isMonster() then
- creature:remove()
- end
- end
- end
- end
- end
-end
-
-local function isRoomOccupied(fromPos, toPos)
- for z = fromPos.z, toPos.z do
- for y = fromPos.y, toPos.y do
- for x = fromPos.x, toPos.x do
- local tile = Tile(Position(x, y, z))
- if tile then
- local creature = tile:getTopCreature()
- if creature and creature:isPlayer() then
- return true
- end
- end
- end
+ monsters = {
+ { name = "fallen challenger", pos = Position(33592, 31013, 14) },
+ { name = "fallen challenger", pos = Position(33583, 31022, 14) },
+ { name = "fallen challenger", pos = Position(33574, 31013, 14) },
+ { name = "fallen challenger", pos = Position(33574, 31031, 14) },
+ { name = "fallen challenger", pos = Position(33592, 31031, 14) },
+ { name = "unbeatable dragon", pos = Position(math.random(33610, 33622), math.random(31016, 31030), 14) },
+ { name = "unbeatable dragon", pos = Position(math.random(33610, 33622), math.random(31016, 31030), 14) },
+ { name = "unbeatable dragon", pos = Position(math.random(33610, 33622), math.random(31016, 31030), 14) },
+ { name = "unbeatable dragon", pos = Position(math.random(33610, 33622), math.random(31016, 31030), 14) },
+ { name = "unbeatable dragon", pos = Position(math.random(33610, 33622), math.random(31016, 31030), 14) },
+ },
+ exit = Position(33597, 30994, 14),
+ onUseExtra = function(creature)
+ if creature and creature:isPlayer() then
+ creature:setStorageValue(Storage.Quest.U11_02.TheFirstDragon.SomewhatBeatable, 0)
end
- end
- return false
-end
-
-function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- if item.itemid == 8911 then
- for i = 1, #config.playerPositions do
- local creature = Tile(config.playerPositions[i]):getTopCreature()
- if not creature then
- item:transform(8912)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need 15 players to fight with this boss.")
- return true
- end
- end
- end
-
- if item.itemid == 8911 then
- if isRoomOccupied(config.clearArea.from, config.clearArea.to) then
- player:say("Someone is fighting against the boss! You need to wait awhile.", TALKTYPE_MONSTER_SAY)
- return true
- else
- clearMonstersInArea(config.clearArea.from, config.clearArea.to)
- end
-
- for d = 1, 5 do
- Game.createMonster("unbeatable dragon", Position(math.random(33610, 33622), math.random(31016, 31030), 14), true, true)
- end
- for b = 1, #config.monsterPosition do
- Game.createMonster("fallen challenger", config.monsterPosition[b].position, true, true)
- end
-
- for i = 1, #config.playerPositions do
- local creature = Tile(config.playerPositions[i]):getTopCreature()
- if creature then
- for i = 1, #config.roomTile1 do
- local toRoom1 = Tile(config.roomTile1[i].fromPosition):getTopCreature()
- if toRoom1 then
- toRoom1:teleportTo(config.toPosition1)
- end
- local toRoom2 = Tile(config.roomTile2[i].fromPosition):getTopCreature()
- if toRoom2 then
- toRoom2:teleportTo(config.toPosition2)
- end
- local toRoom3 = Tile(config.roomTile3[i].fromPosition):getTopCreature()
- if toRoom3 then
- toRoom3:teleportTo(config.toPosition3)
- end
- local toRoom4 = Tile(config.roomTile4[i].fromPosition):getTopCreature()
- if toRoom4 then
- toRoom4:teleportTo(config.toPosition4)
- end
- local toRoom5 = Tile(config.roomTile5[i].fromPosition):getTopCreature()
- if toRoom5 then
- toRoom5:teleportTo(config.toPosition5)
- end
- end
- creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- creature:setStorageValue(config.storage, os.time() + 20 * 3600)
- creature:setStorageValue(Storage.Quest.U11_02.TheFirstDragon.SomewhatBeatable, 0)
- end
- end
-
- addEvent(clearRoom, 60 * 60 * 1000, Position(33583, 31022, 14), 50, 50, config.storage)
- Game.createMonster("spirit of fertility", Position(33625, 31021, 14), true, true)
- item:transform(8912)
- elseif item.itemid == 8912 then
- item:transform(8911)
- end
- return true
-end
+ end,
+}
-lever:uid(30003)
-lever:register()
+local leverFirstDragon = BossLever(config)
+leverFirstDragon:position(Position(33583, 30992, 14))
+leverFirstDragon:register()
diff --git a/data-otservbr-global/scripts/quests/the_secret_library_quest/liquid_death/actions_brokulLever.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/liquid_death/actions_brokulLever.lua
index 2cab34c6e48..89c8ac4c479 100644
--- a/data-otservbr-global/scripts/quests/the_secret_library_quest/liquid_death/actions_brokulLever.lua
+++ b/data-otservbr-global/scripts/quests/the_secret_library_quest/liquid_death/actions_brokulLever.lua
@@ -1,113 +1,32 @@
-local transform = {
- [2772] = 2773,
- [2773] = 2772,
-}
-
-local leverInfo = {
- [1] = {
- bossName = "Brokul",
- bossPosition = Position(33483, 31437, 15),
- leverPosition = Position(33522, 31464, 15),
- pushPosition = Position(33522, 31465, 15),
- leverFromPos = Position(33520, 31465, 15),
- leverToPos = Position(33524, 31465, 15),
- storageTimer = Storage.Quest.U11_80.TheSecretLibrary.LiquidDeath.BrokulTimer,
- teleportTo = Position(33484, 31446, 15),
- globalTimer = Storage.Quest.U11_80.TheSecretLibrary.LiquidDeath.BrokulTimerGlobal,
- roomFromPosition = Position(33472, 31427, 15),
- roomToPosition = Position(33496, 31450, 15),
- exitPosition = Position(33528, 31464, 14),
+local config = {
+ boss = {
+ name = "Brokul",
+ position = Position(33483, 31437, 15),
},
-}
-
-local function clearBossRoom(fromPos, toPos)
- local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos)
- for _, spec in pairs(spectators) do
- if not spec:isPlayer() then
- spec:remove()
- end
- end
-end
-
-local function isBossInRoom(fromPos, toPos, bossName)
- local hasBoss = false
- local hasPlayers = false
- local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos)
-
- for _, spec in pairs(spectators) do
- if spec:isPlayer() then
- hasPlayers = true
- elseif spec:isMonster() and spec:getName():lower() == bossName:lower() then
- hasBoss = true
- end
- end
-
- return hasBoss, hasPlayers
-end
-
-local actions_liquid_brokulLever = Action()
-
-function actions_liquid_brokulLever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- if not player then
- return true
- end
-
- local playersTable = {}
- local iPos = item:getPosition()
- local pPos = player:getPosition()
-
- if item.itemid == 2772 then
- for i = 1, #leverInfo do
- if iPos == leverInfo[i].leverPosition then
- local leverTable = leverInfo[i]
- if pPos == leverTable.pushPosition then
- local hasBoss, hasPlayers = isBossInRoom(leverTable.roomFromPosition, leverTable.roomToPosition, leverTable.bossName)
-
- if hasPlayers then
- player:sendCancelMessage("The room is already occupied by other players.")
- return true
- elseif hasBoss then
- clearBossRoom(leverTable.roomFromPosition, leverTable.roomToPosition)
- end
-
- local playerCount = 0
- for i = leverTable.leverFromPos.x, leverTable.leverToPos.x do
- local newPos = Position(i, leverTable.leverFromPos.y, leverTable.leverFromPos.z)
- local creature = Tile(newPos):getTopCreature()
- if creature and creature:isPlayer() then
- if creature:getStorageValue(Storage.Quest.U11_80.TheSecretLibrary.LiquidDeath.Questline) >= 6 then
- playerCount = playerCount + 1
- table.insert(playersTable, creature:getId())
- else
- creature:sendCancelMessage("You are not qualified to face the boss.")
- end
- end
- end
-
- if playerCount < 5 then
- player:sendCancelMessage("You need 5 qualified players for this challenge.")
- return true
- end
-
- for _, playerId in ipairs(playersTable) do
- local creature = Creature(playerId)
- if creature then
- creature:setStorageValue(Storage.Quest.U11_80.TheSecretLibrary.LiquidDeath.BrokulTimer, os.time() + 20 * 60 * 60)
- creature:teleportTo(leverTable.teleportTo, true)
- creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- end
- end
-
- local monster = Game.createMonster(leverTable.bossName, leverTable.bossPosition)
- addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, leverTable.roomFromPosition, leverTable.roomToPosition, leverTable.exitPosition)
- end
+ timeToFightAgain = 20 * 60 * 60,
+ minPlayers = 5,
+ playerPositions = {
+ { pos = Position(33522, 31465, 15), teleport = Position(33484, 31446, 15) },
+ { pos = Position(33520, 31465, 15), teleport = Position(33484, 31446, 15) },
+ { pos = Position(33521, 31465, 15), teleport = Position(33484, 31446, 15) },
+ { pos = Position(33523, 31465, 15), teleport = Position(33484, 31446, 15) },
+ { pos = Position(33524, 31465, 15), teleport = Position(33484, 31446, 15) },
+ },
+ specPos = {
+ from = Position(33472, 31427, 15),
+ to = Position(33496, 31450, 15),
+ },
+ exit = Position(33528, 31464, 14),
+ onUseExtra = function(creature, infoPositions)
+ if creature and creature:isPlayer() then
+ if creature:getStorageValue(Storage.Quest.U11_80.TheSecretLibrary.LiquidDeath.Questline) >= 6 then
+ return true
end
+ return false
end
- end
-
- item:transform(transform[item.itemid])
- return true
-end
+ end,
+}
-actions_liquid_brokulLever:aid(4901)
-actions_liquid_brokulLever:register()
+local leverBrokul = BossLever(config)
+leverBrokul:aid(34000)
+leverBrokul:register()
diff --git a/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/actions_oberonLever.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/actions_oberonLever.lua
index c6e6841f714..e736be79de5 100644
--- a/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/actions_oberonLever.lua
+++ b/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/actions_oberonLever.lua
@@ -1,39 +1,26 @@
-local actions_falcon_oberon_lever = Action()
+local config = {
+ boss = {
+ name = "Grand Master Oberon",
+ createFunction = function()
+ Game.createMonster("Grand Master Oberon", Position(33365, 31318, 9), true, true):setStorageValue(Storage.Quest.U11_80.TheSecretLibrary.FalconBastion.OberonHeal, 0)
+ return true
+ end,
+ },
+ timeToFightAgain = 20 * 60 * 60,
+ playerPositions = {
+ { pos = Position(33364, 31344, 9), teleport = Position(33364, 31322, 9) },
+ { pos = Position(33362, 31344, 9), teleport = Position(33364, 31322, 9) },
+ { pos = Position(33363, 31344, 9), teleport = Position(33364, 31322, 9) },
+ { pos = Position(33365, 31344, 9), teleport = Position(33364, 31322, 9) },
+ { pos = Position(33366, 31344, 9), teleport = Position(33364, 31322, 9) },
+ },
+ specPos = {
+ from = Position(33356, 31311, 9),
+ to = Position(33376, 31328, 9),
+ },
+ exit = Position(33297, 31285, 9),
+}
-function actions_falcon_oberon_lever.onUse(player, item, fromPosition, itemEx, toPosition)
- local bossName = "Grand Master Oberon"
- local playersTable = {}
- local fromPosition_ = Position(33356, 31311, 9)
- local toPosition_ = Position(33376, 31328, 9)
- local exitPosition = Position(33297, 31285, 9)
-
- if item:getId() == 2772 then
- if doCheckBossRoom(player:getId(), bossName, fromPosition_, toPosition_) then
- for i = 33362, 33366, 1 do
- local newpos = Position(i, 31344, 9)
- local nplayer = Tile(newpos):getTopCreature()
- if nplayer and nplayer:isPlayer() then
- nplayer:teleportTo(Position(33364, 31322, 9), true)
- nplayer:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- table.insert(playersTable, nplayer:getId())
- nplayer:setStorageValue(Storage.Quest.U11_80.TheSecretLibrary.FalconBastion.OberonTimer, os.time() + 20 * 60 * 60)
- end
- end
- local oberon = Game.createMonster("Grand Master Oberon", Position(33365, 31318, 9))
- if oberon then
- oberon:setStorageValue(Storage.Quest.U11_80.TheSecretLibrary.FalconBastion.OberonHeal, 0)
- end
- Game.setStorageValue(Storage.Quest.U11_80.TheSecretLibrary.FalconBastion.OberonSay, -1)
- Game.createNpc("Oberon's Spite", Position(33361, 31320, 9))
- Game.createNpc("Oberon's Ire", Position(33367, 31320, 9))
- Game.createNpc("Oberon's Bile", Position(33361, 31316, 9))
- Game.createNpc("Oberon's Hate", Position(33367, 31316, 9))
- addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, fromPosition_, toPosition_, exitPosition)
- end
- end
-
- return true
-end
-
-actions_falcon_oberon_lever:aid(4922)
-actions_falcon_oberon_lever:register()
+local leverOberon = BossLever(config)
+leverOberon:aid(57605)
+leverOberon:register()
diff --git a/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/movements_bossEntrance.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/movements_bossEntrance.lua
index 0f000b94e7c..f6068da667b 100644
--- a/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/movements_bossEntrance.lua
+++ b/data-otservbr-global/scripts/quests/the_secret_library_quest/the_order_of_the_falcon/movements_bossEntrance.lua
@@ -36,7 +36,7 @@ function movements_falcon_bossEntrance.onStepIn(creature, item, position, fromPo
if isInArray(blockedPositions, position) then
return true
else
- if creature:getStorageValue(Storage.Quest.U11_80.TheSecretLibrary.FalconBastion.OberonTimer) <= os.time() then
+ if creature:canFightBoss("Grand Master Oberon") then
creature:teleportTo(Position(33363, 31341, 9), true)
else
creature:teleportTo(fromPosition, true)
diff --git a/data-otservbr-global/scripts/world_changes/iron_servant_transformation.lua b/data-otservbr-global/scripts/world_changes/iron_servant_transformation.lua
deleted file mode 100644
index e62cd23c876..00000000000
--- a/data-otservbr-global/scripts/world_changes/iron_servant_transformation.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-local ironServantTransformation = EventCallback("IronServantTransformationOnSpawn")
-
-ironServantTransformation.monsterOnSpawn = function(monster, position)
- if monster:getName():lower() ~= "iron servant replica" then
- return
- end
-
- local chance = math.random(100)
- if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismDiamond) >= 1 and Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismGolden) >= 1 then
- if chance > 30 then
- local monsterType = math.random(2) == 1 and "diamond servant replica" or "golden servant replica"
- Game.createMonster(monsterType, monster:getPosition(), false, true)
- monster:remove()
- end
- return
- end
-
- if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismDiamond) >= 1 and chance > 30 then
- Game.createMonster("diamond servant replica", monster:getPosition(), false, true)
- monster:remove()
- return
- end
-
- if Game.getStorageValue(Storage.Quest.U11_02.ForgottenKnowledge.MechanismGolden) >= 1 and chance > 30 then
- Game.createMonster("golden servant replica", monster:getPosition(), false, true)
- monster:remove()
- end
- return true
-end
-
-ironServantTransformation:register()
diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua
index e7db97ab859..ab887209866 100644
--- a/data-otservbr-global/startup/tables/lever.lua
+++ b/data-otservbr-global/startup/tables/lever.lua
@@ -16,12 +16,6 @@ LeverAction = {
},
},
-- The Secret Library Quest
- [4901] = {
- itemId = 2772,
- itemPos = {
- { x = 33522, y = 31464, z = 15 },
- },
- },
[4906] = {
itemId = false,
itemPos = {
@@ -29,12 +23,6 @@ LeverAction = {
{ x = 33218, y = 32096, z = 10 },
},
},
- [4922] = {
- itemId = 2772,
- itemPos = {
- { x = 33364, y = 31343, z = 9 },
- },
- },
-- Cults of Tibia Quest
[5500] = {
itemId = 8911,
@@ -315,10 +303,6 @@ LeverUnique = {
itemPos = { x = 33172, y = 31896, z = 8 },
},
-- Ferumbras' Ascension Quest
- [1021] = {
- itemId = 8911,
- itemPos = { x = 33270, y = 31476, z = 14 },
- },
[1022] = {
itemId = 8911,
itemPos = { x = 33229, y = 31499, z = 13 },
@@ -547,12 +531,6 @@ LeverUnique = {
itemId = 2773,
itemPos = { x = 33582, y = 31844, z = 10 },
},
- -- The first dragon quest lever
- -- Path: data\scripts\actions\quests\first_dragon\lever.lua
- [30003] = {
- itemId = 8911,
- itemPos = { x = 33583, y = 30992, z = 14 },
- },
-- Thais lighthouse quest
-- Path: data\scripts\quests\thais_lighthouse\action-lever.lua
[30004] = {
diff --git a/data-otservbr-global/startup/tables/writeable.lua b/data-otservbr-global/startup/tables/writeable.lua
index 226fe46c3b7..538fccdf72a 100644
--- a/data-otservbr-global/startup/tables/writeable.lua
+++ b/data-otservbr-global/startup/tables/writeable.lua
@@ -132,7 +132,6 @@ Nobody knows where the elder gods came from, or whether they had always existed
Uman Zathroth regarded Fardos's undertakings thoughtfully. Uman was sagacious and held awesome magical powers. Most importantly, however, he was driven by an insatiable hunger for knowledge and enlightenment. In his essence he resembled Fardos, but where Fardos worked openly and logically, Uman's domain was the realm of mystery. Still, he shared Fardos's interest in creation, whereas his dark half Zathroth was essentially corruptive. Zathroth was a vain god who was painfully aware that his own creative powers were poor. Because of this he looked at Fardos's work of creation with jealousy, and from the very beginning he was determined to prevent or at least corrupt it in any way he could. Fardos, who did not suspect this, asked him for assistance because he had accepted the fact that he could not achieve creation on his own, but of course Zathroth denied. Uman, however, agreed to help. And from that he and Fardos worked together on the great project that was creation.
-
Unfortunately, their combined efforts were hardly more successful. Just like before, everything Fardos and Uman created was swallowed by the void as soon as it came into existence, and the two gods sadly saw their creation run through their fingers like water through a sieve. On the other hand, Zathroth, who had been watching their efforts with suspicion, rejoiced. He ridiculed their efforts. However, his glee changed into surprise and anger when he found that something strange happened, something which perhaps Uman and Fardos did not expect themselves. To this day, nobody knows precisely what it was that caused it. Perhaps the power that had been spent lured another entity out of the void, or it might be that it simply awoke another divine entity from its slumber. Some even claim that in some mysterious way the power that had been spent by Uman and Fardos actually created a new entity. Whatever the truth may be, a new goddess stepped out of the void like a new-born mermaid from her shell. The amazed elder gods watched her divine beauty in awed admiration, for everything in her was perfect harmony. They agreed to call her Tibiasula. Zathroth, however, stood by and fumed with silent hate. But cunning as he was, he hid his resentment well and feigned to share the joy of the other elder gods.
]],
},
@@ -147,7 +146,6 @@ Zathroth watched the progress of creation with wrath and disgust. If he had had
As he grew up, Brog was pained by the fire burning inside him, until one day when it grew unbearable he summoned all his magical powers and released as much of the painful flame into the world as he could. The searing fire mixed with his rage, and from it rose Garsharak, the very first dragon, who later sired a whole race of intelligent, giant lizards, a race that would eventually bring terror and chaos into Tibia. Brog watched the terrible creature he had created rather accidentally, and he rejoiced when he saw just how fierce and powerful it was. Though he was rather stupid he, too, had the gift to create life, which in an act of vanity he next used to create the cyclopes in his own image.
-
Zathroth watched Brog's experiments with great interest. So far he had not held his son in high esteem, but here was something for which he himself admittedly had little talent for. Since he did not understand the laws of life himself he knew that Brog's gift could prove to be a great asset. He called his son to him and told him to go on with his experiments, urging him to create something more terrifying and destructive than cyclopes. Even though these giants were ferocious and strong, they were not quite as destructive as he wanted them to be. In fact, due to their love of mining and smithing the cyclopes were a creative rather than a destructive race. Worse, they were not propagating fast enough to make them a real threat to creation. For this reason Brog went on to create trolls and goblins, races that were weaker than the cyclopes, but propagated much faster. However, his undisputed masterpiece were the orcs, a race of fearsome, single-minded warriors who lived only to expand and conquer. Soon they had spread all over Tibia, and they were the scourge of all that was alive.
]],
},
@@ -723,7 +721,6 @@ Thoughts and Notations on the Noble Craft of Potion-Making, by Grandsieur Haruva
The Gods gave their gifts freely, but bestowed them not on all creatures alike. Some ancient creatures were possessed of a far-reaching will to conquer and subdue all others through their thoughts alone, while the newer beings could weave magic in defense or had strength and swiftness to defend and escape the wiles laid out to ensnare them. Some animals and plants, simple though they may seem to us, yet are deadly poisonous in order to ward off their hunter.
-
But only the more intelligent beings - and of those, only a select few - possess the art of making powerful concoctions that enhance their faculties.
The humble woodman or wanderer will never be able to fulfil the complex rites, or even grasp the concept, of the trimagical umbralistic principle of the equinox formula that is crucial to the craft of magical potions.
But still, they can drink, and appreciate, the brews we make to keep a warrior's body alive in a fight, the mage's mana when drained, the paladin's spirit when they need to gather holy force. ... (you lose interest and close the book)
@@ -742,7 +739,6 @@ The cyclops ...
... hid the ancient amulet beneath the sand, before ...should have listened to ...
Must hide... paper, hope an adventurer will...
-
... amulet will be washed ashore if not found...
To any adventurer friend: ... shovel... beach...
.. dig there. ... take it to Morris, maybe he ... decipher the engravings.
diff --git a/data/items/items.xml b/data/items/items.xml
index eb00ac6bdf3..c1b8e8a63ba 100644
--- a/data/items/items.xml
+++ b/data/items/items.xml
@@ -4435,6 +4435,9 @@
-
+
+
+
@@ -76427,5 +76430,3305 @@ Granted by TibiaGoals.com"/>
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
diff --git a/data/libs/functions/boss_lever.lua b/data/libs/functions/boss_lever.lua
index da3b81d3704..40bc8e0b4b0 100644
--- a/data/libs/functions/boss_lever.lua
+++ b/data/libs/functions/boss_lever.lua
@@ -4,6 +4,7 @@
---@field private createBoss function
---@field private timeToFightAgain number
---@field private timeToDefeat number
+---@field private minPlayers number
---@field private timeAfterKill number
---@field private requiredLevel number
---@field private disabled boolean
@@ -29,6 +30,7 @@ local config = {
}
requiredLevel = 250,
timeToFightAgain = 10 * 60 * 60, -- In seconds
+ minPlayers = 4,
playerPositions = {
{ pos = Position(33638, 32562, 13), teleport = Position(33617, 32567, 13) },
{ pos = Position(33639, 32562, 13), teleport = Position(33617, 32567, 13) },
@@ -40,7 +42,7 @@ local config = {
from = Position(33607, 32553, 13),
to = Position(33627, 32570, 13)
},
- onUseExtra = function(player)
+ onUseExtra = function(player, infoPositions)
player:teleportTo(Position(33618, 32523, 15))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
end,
@@ -56,7 +58,7 @@ setmetatable(BossLever, {
error("BossLever: boss is required")
end
return setmetatable({
- name = boss.name,
+ name = boss.name:lower(),
encounter = config.encounter,
bossPosition = boss.position,
timeToFightAgain = config.timeToFightAgain or configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN),
@@ -65,6 +67,7 @@ setmetatable(BossLever, {
requiredLevel = config.requiredLevel or 0,
createBoss = boss.createFunction,
disabled = config.disabled,
+ minPlayers = config.minPlayers or 1,
playerPositions = config.playerPositions,
onUseExtra = config.onUseExtra or function() end,
exitTeleporter = config.exitTeleporter,
@@ -146,22 +149,10 @@ end
function BossLever:onUse(player)
local monsterName = MonsterType(self.name):getName()
local isParticipant = false
- local players = {}
-
- for i = 1, #self.playerPositions do
- local pos = self.playerPositions[i].pos
- local creature = Tile(pos):getTopCreature()
-
- if not creature or not creature:isPlayer() then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need " .. #self.playerPositions .. " players to challenge " .. self.name .. ".")
- return true
- end
-
- if pos == player:getPosition() then
+ for _, v in ipairs(self.playerPositions) do
+ if Position(v.pos) == player:getPosition() then
isParticipant = true
end
-
- table.insert(players, creature)
end
if not isParticipant then
return false
@@ -194,8 +185,8 @@ function BossLever:onUse(player)
return false
end
+ local infoPositions = lever:getInfoPositions()
if creature:getGroup():getId() < GROUP_TYPE_GOD and isAccountNormal and self:lastEncounterTime(creature) > os.time() then
- local infoPositions = lever:getInfoPositions()
for _, posInfo in pairs(infoPositions) do
local currentPlayer = posInfo.creature
if currentPlayer then
@@ -218,11 +209,18 @@ function BossLever:onUse(player)
return false
end
- self.onUseExtra(creature)
- return true
+ return self.onUseExtra(creature, infoPositions) ~= false
end)
lever:checkPositions()
+ if #lever:getPlayers() < self.minPlayers then
+ lever:executeOnPlayers(function(creature)
+ local message = string.format("You need %d qualified players for this challenge.", self.minPlayers)
+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, message)
+ creature:getPosition():sendMagicEffect(CONST_ME_POFF)
+ end)
+ return false
+ end
if lever:checkConditions() then
zone:removeMonsters()
for _, monster in pairs(self.monsters) do
diff --git a/data/libs/functions/lever.lua b/data/libs/functions/lever.lua
index 54e6e5c4915..39802af49d2 100644
--- a/data/libs/functions/lever.lua
+++ b/data/libs/functions/lever.lua
@@ -5,6 +5,7 @@ setmetatable(Lever, {
local lever_data = {
positions = {},
info_positions = nil,
+ players = {},
condition = function()
return true
end,
@@ -51,6 +52,19 @@ function Lever.getInfoPositions(self)
return self.info_positions
end
+---@return table
+function Lever.getPlayers(self)
+ return self.players
+end
+
+---@param player Player
+---@return nil
+function Lever.addPlayer(self, player)
+ if player and player:isPlayer() then
+ table.insert(self.players, player)
+ end
+end
+
--[[
lever:setCondition(function(creature))
@@ -109,6 +123,7 @@ function Lever:checkPositions()
local ground = tile:getGround()
local actionID = ground:getActionId()
local uniqueID = ground:getUniqueId()
+ self:addPlayer(creature)
table.insert(array, {
tile = tile,
creature = creature,
@@ -140,6 +155,12 @@ function Lever.checkConditions(self) -- It will check the conditions defined in
return true
end
+function Lever.executeOnPlayers(self, func)
+ for _, player in pairs(self:getPlayers()) do
+ func(player)
+ end
+end
+
---@return nil
function Lever.teleportPlayers(self) -- It will teleport all players to the positions defined in setPositions()
local info = self:getInfoPositions()
diff --git a/data/scripts/actions/items/cobra_flask.lua b/data/scripts/actions/items/cobra_flask.lua
index c36d42983c5..0556373afae 100644
--- a/data/scripts/actions/items/cobra_flask.lua
+++ b/data/scripts/actions/items/cobra_flask.lua
@@ -1,19 +1,3 @@
-local applyCobraFlaskEffectOnMonsterSpawn = EventCallback("CobraFlaskEffectOnMonsterSpawn")
-
-applyCobraFlaskEffectOnMonsterSpawn.monsterOnSpawn = function(monster, position)
- if table.contains({ "cobra scout", "cobra vizier", "cobra assassin" }, monster:getName():lower()) then
- if Game.getStorageValue(Global.Storage.CobraFlask) >= os.time() then
- monster:setHealth(monster:getMaxHealth() * 0.75)
- monster:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
- else
- Game.setStorageValue(Global.Storage.CobraFlask, -1)
- end
- end
- return true
-end
-
-applyCobraFlaskEffectOnMonsterSpawn:register()
-
local cobraFlask = Action()
function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey)
diff --git a/data/scripts/creaturescripts/monster/boss_lever_death.lua b/data/scripts/creaturescripts/monster/boss_lever_death.lua
index 4e035271623..35a86a97e92 100644
--- a/data/scripts/creaturescripts/monster/boss_lever_death.lua
+++ b/data/scripts/creaturescripts/monster/boss_lever_death.lua
@@ -13,7 +13,7 @@ function onBossDeath.onDeath(creature)
return true
end
- local bossLever = BossLever[name]
+ local bossLever = BossLever[name:lower()]
if not bossLever then
return true
end
diff --git a/data/scripts/eventcallbacks/README.md b/data/scripts/eventcallbacks/README.md
index 6e0bacfcd6e..bbcee5de3c4 100644
--- a/data/scripts/eventcallbacks/README.md
+++ b/data/scripts/eventcallbacks/README.md
@@ -16,7 +16,6 @@ Event callbacks are available for several categories of game entities, such as `
- `(bool)` `creatureOnChangeOutfit`
- `(ReturnValue)` `creatureOnAreaCombat`
- `(ReturnValue)` `creatureOnTargetCombat`
-- `(void)` `creatureOnHear`
- `(void)` `creatureOnDrainHealth`
- `(void)` `creatureOnCombat`
- `(bool)` `partyOnJoin`
@@ -51,8 +50,6 @@ Event callbacks are available for several categories of game entities, such as `
- `(void)` `playerOnWalk`
- `(void)` `monsterOnDropLoot`
- `(void)` `monsterPostDropLoot`
-- `(void)` `monsterOnSpawn`
-- `(void)` `npcOnSpawn`
## Event Callback Usage
@@ -102,20 +99,8 @@ callback:register()
```lua
local callback = EventCallback("UniqueCallbackName")
-function callback.monsterOnSpawn(monster, position)
- -- custom behavior when a monster spawns
-end
-
-callback:register()
-```
-
-### Npc Callback
-
-```lua
-local callback = EventCallback("UniqueCallbackName")
-
-function callback.npcOnSpawn(npc, position)
- -- custom behavior when a npc spawns
+function callback.monsterOnDropLoot(monster, corpse)
+ logger.info("Monster {} has corpse {}", monster:getName(), corpse:getName());
end
callback:register()
diff --git a/data/scripts/eventcallbacks/creature/on_hear.lua b/data/scripts/eventcallbacks/creature/on_hear.lua
deleted file mode 100644
index 2954c81c8fb..00000000000
--- a/data/scripts/eventcallbacks/creature/on_hear.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-local callback = EventCallback("CreatureOnHearBaseEvent")
-
-function callback.creatureOnHear(creature, speaker, words, type) end
-
-callback:register()
diff --git a/data/scripts/eventcallbacks/monster/on_spawn.lua b/data/scripts/eventcallbacks/monster/on_spawn.lua
deleted file mode 100644
index 5a490a8edac..00000000000
--- a/data/scripts/eventcallbacks/monster/on_spawn.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-local callback = EventCallback("MonsterOnSpawnBase")
-
-function callback.monsterOnSpawn(monster, position)
- if not monster then
- return
- end
-
- HazardMonster.onSpawn(monster, position)
-
- if monster:getType():isRewardBoss() then
- monster:setReward(true)
- end
-
- if not monster:getType():canSpawn(position) then
- monster:remove()
- else
- local spec = Game.getSpectators(position, false, false)
- for _, creatureId in pairs(spec) do
- local monster = Monster(creatureId)
- if monster and not monster:getType():canSpawn(position) then
- monster:remove()
- end
- end
- end
-end
-
-callback:register()
diff --git a/data/scripts/lib/register_monster_type.lua b/data/scripts/lib/register_monster_type.lua
index cfb0a6bfaaa..ed5de6421d9 100644
--- a/data/scripts/lib/register_monster_type.lua
+++ b/data/scripts/lib/register_monster_type.lua
@@ -194,6 +194,9 @@ registerMonsterType.flags = function(mtype, mask)
end
if mask.flags.rewardBoss then
mtype:isRewardBoss(mask.flags.rewardBoss)
+ mtype.onSpawn = function(monster)
+ monster:setRewardBoss()
+ end
end
if mask.flags.familiar then
mtype:familiar(mask.flags.familiar)
diff --git a/data/scripts/lib/register_spells.lua b/data/scripts/lib/register_spells.lua
index 8c549859640..f2e7cacee3d 100644
--- a/data/scripts/lib/register_spells.lua
+++ b/data/scripts/lib/register_spells.lua
@@ -386,7 +386,7 @@ AREA_RING1_BURST3 = {
{ 0, 0, 1, 1, 1, 1, 1, 0, 0 },
{ 0, 1, 1, 1, 1, 1, 1, 1, 0 },
{ 1, 1, 1, 0, 0, 0, 1, 1, 1 },
- { 1, 1, 1, 0, 3, 0, 1, 1, 1 },
+ { 1, 1, 1, 0, 2, 0, 1, 1, 1 },
{ 1, 1, 1, 0, 0, 0, 1, 1, 1 },
{ 0, 1, 1, 1, 1, 1, 1, 1, 0 },
{ 0, 0, 1, 1, 1, 1, 1, 0, 0 },
diff --git a/data/scripts/spells/attack/divine_grenade.lua b/data/scripts/spells/attack/divine_grenade.lua
index b1dc6399c7d..488962cb2f8 100644
--- a/data/scripts/spells/attack/divine_grenade.lua
+++ b/data/scripts/spells/attack/divine_grenade.lua
@@ -35,7 +35,7 @@ local explodeGrenade = function(position, playerId)
end
local var = {}
- var.instantName = "Divine Grenade Explode"
+ var.instantName = "Divine Grenade"
var.runeName = ""
var.type = 2 -- VARIANT_POSITION
var.pos = position
diff --git a/data/scripts/spells/attack/energy_beam.lua b/data/scripts/spells/attack/energy_beam.lua
index d3be218c0ca..049470f0ecb 100644
--- a/data/scripts/spells/attack/energy_beam.lua
+++ b/data/scripts/spells/attack/energy_beam.lua
@@ -28,11 +28,10 @@ local spell = Spell("instant")
function spell.onCastSpell(creature, var)
local player = creature:getPlayer()
- if creature and player and player:instantSkillWOD("Beam Mastery") then
- var.runeName = "Beam Mastery"
- return combatWOD:execute(creature, var)
+ if not creature or not player then
+ return false
end
- return combat:execute(creature, var)
+ return player:instantSkillWOD("Beam Mastery") and combatWOD:execute(creature, var) or combat:execute(creature, var)
end
spell:group("attack")
diff --git a/data/scripts/spells/attack/executioners_throw.lua b/data/scripts/spells/attack/executioners_throw.lua
index 2f2220625c5..08d700bfe54 100644
--- a/data/scripts/spells/attack/executioners_throw.lua
+++ b/data/scripts/spells/attack/executioners_throw.lua
@@ -40,28 +40,11 @@ function spell.onCastSpell(creature, var)
local grade = creature:revelationStageWOD("Executioner's Throw")
if grade == 0 then
- creature:sendCancelMessage("You cannot cast this spell")
+ creature:sendCancelMessage("You need to learn this spell first")
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
-
- local cooldown = 0
- if grade >= 3 then
- cooldown = 10
- elseif grade >= 2 then
- cooldown = 14
- elseif grade >= 1 then
- cooldown = 18
- end
-
- var.instantName = "Executioner's Throw"
- if combat:execute(creature, var) then
- local condition = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 261)
- condition:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition)
- return true
- end
- return false
+ return combat:execute(creature, var)
end
spell:group("attack")
@@ -75,7 +58,7 @@ spell:range(5)
spell:needTarget(true)
spell:blockWalls(true)
spell:needWeapon(true)
-spell:cooldown(1000) -- Cooldown is calculated on the casting
+spell:cooldown(18 * 1000)
spell:groupCooldown(2 * 1000)
spell:needLearn(true)
spell:vocation("knight;true", "elite knight;true")
diff --git a/data/scripts/spells/attack/great_death_beam.lua b/data/scripts/spells/attack/great_death_beam.lua
index 02a17c78f41..84c75132d76 100644
--- a/data/scripts/spells/attack/great_death_beam.lua
+++ b/data/scripts/spells/attack/great_death_beam.lua
@@ -17,6 +17,7 @@ end
local combat1 = createCombat(initCombat, AREA_BEAM6)
local combat2 = createCombat(initCombat, AREA_BEAM7)
local combat3 = createCombat(initCombat, AREA_BEAM8)
+local combat = { combat1, combat2, combat3 }
local spell = Spell("instant")
@@ -28,32 +29,15 @@ function spell.onCastSpell(creature, var)
local grade = creature:upgradeSpellsWOD("Great Death Beam")
if grade == WHEEL_GRADE_NONE then
- creature:sendCancelMessage("You cannot cast this spell")
+ creature:sendCancelMessage("You need to learn this spell first")
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
- local cooldown = { 10, 8, 6 }
- var.runeName = "Beam Mastery"
- local executed = false
-
- local combat = { combat1, combat2, combat3 }
-
- executed = combat[grade]:execute(creature, var)
-
- if executed then
- local condition = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 260)
- local executedCooldown = cooldown[grade]
- if executedCooldown ~= nil then
- condition:setTicks((executedCooldown * 1000))
- end
- creature:addCondition(condition)
- return true
- end
- return false
+ return combat[grade]:execute(creature, var)
end
-spell:group("attack")
+spell:group("attack", "greatbeams")
spell:id(260)
spell:name("Great Death Beam")
spell:words("exevo max mort")
@@ -62,8 +46,8 @@ spell:mana(140)
spell:isPremium(false)
spell:needDirection(true)
spell:blockWalls(true)
-spell:cooldown(1000) -- Cooldown is calculated on the casting
-spell:groupCooldown(2 * 1000)
+spell:cooldown(10 * 1000)
+spell:groupCooldown(2 * 1000, 6 * 1000)
spell:needLearn(true)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
diff --git a/data/scripts/spells/attack/great_energy_beam.lua b/data/scripts/spells/attack/great_energy_beam.lua
index aae93e95c9a..f6b61f19fa4 100644
--- a/data/scripts/spells/attack/great_energy_beam.lua
+++ b/data/scripts/spells/attack/great_energy_beam.lua
@@ -28,15 +28,13 @@ local spell = Spell("instant")
function spell.onCastSpell(creature, var)
local player = creature:getPlayer()
- if creature and player and player:instantSkillWOD("Beam Mastery") then
- var.runeName = "Beam Mastery"
- return combatWOD:execute(creature, var)
+ if not creature or not player then
+ return false
end
-
- return combat:execute(creature, var)
+ return player:instantSkillWOD("Beam Mastery") and combatWOD:execute(creature, var) or combat:execute(creature, var)
end
-spell:group("attack")
+spell:group("attack", "greatbeams")
spell:id(23)
spell:name("Great Energy Beam")
spell:words("exevo gran vis lux")
@@ -47,7 +45,7 @@ spell:isPremium(false)
spell:needDirection(true)
spell:blockWalls(true)
spell:cooldown(6 * 1000)
-spell:groupCooldown(2 * 1000)
+spell:groupCooldown(2 * 1000, 6 * 1000)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
diff --git a/data/scripts/spells/attack/ice_burst.lua b/data/scripts/spells/attack/ice_burst.lua
index 9e1560f9dc9..fedcd9d5a04 100644
--- a/data/scripts/spells/attack/ice_burst.lua
+++ b/data/scripts/spells/attack/ice_burst.lua
@@ -14,50 +14,27 @@ combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local spell = Spell("instant")
function spell.onCastSpell(creature, var)
- if not creature or not creature:isPlayer() then
- return false
- end
-
local grade = creature:revelationStageWOD("Twin Burst")
if grade == 0 then
- creature:sendCancelMessage("You cannot cast this spell")
+ creature:sendCancelMessage("You need to learn this spell first")
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
- local cooldown = 0
- if grade >= 3 then
- cooldown = 14
- elseif grade >= 2 then
- cooldown = 18
- elseif grade >= 1 then
- cooldown = 22
- end
-
- var.instantName = "Twin Burst"
- if combat:execute(creature, var) then
- -- Ice cooldown
- local condition1 = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 262)
- condition1:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition1)
- -- Earth cooldown
- local condition2 = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 263)
- condition2:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition2)
- return true
- end
- return false
+ return combat:execute(creature, var)
end
-spell:group("attack")
+spell:group("attack", "burstsofnature")
spell:id(262)
spell:name("Ice Burst")
spell:words("exevo ulus frigo")
+spell:castSound(SOUND_EFFECT_TYPE_SPELL_ETERNAL_WINTER)
spell:level(300)
spell:mana(230)
spell:isPremium(true)
-spell:cooldown(1000) -- Cooldown is calculated on the casting
-spell:groupCooldown(2 * 1000)
+spell:isSelfTarget(true)
+spell:cooldown(22 * 1000)
+spell:groupCooldown(2 * 1000, 22 * 1000)
spell:needLearn(true)
spell:vocation("druid;true", "elder druid;true")
spell:register()
diff --git a/data/scripts/spells/attack/terra_burst.lua b/data/scripts/spells/attack/terra_burst.lua
index 8a805c0ba48..15ce35c4912 100644
--- a/data/scripts/spells/attack/terra_burst.lua
+++ b/data/scripts/spells/attack/terra_burst.lua
@@ -14,50 +14,27 @@ combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local spell = Spell("instant")
function spell.onCastSpell(creature, var)
- if not creature or not creature:isPlayer() then
- return false
- end
-
local grade = creature:revelationStageWOD("Twin Burst")
if grade == 0 then
- creature:sendCancelMessage("You cannot cast this spell")
+ creature:sendCancelMessage("You need to learn this spell first")
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
- local cooldown = 0
- if grade >= 3 then
- cooldown = 14
- elseif grade >= 2 then
- cooldown = 18
- elseif grade >= 1 then
- cooldown = 22
- end
-
- var.instantName = "Twin Burst"
- if combat:execute(creature, var) then
- -- Ice cooldown
- local condition1 = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 262)
- condition1:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition1)
- -- Earth cooldown
- local condition2 = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 263)
- condition2:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition2)
- return true
- end
- return false
+ return combat:execute(creature, var)
end
-spell:group("attack")
+spell:group("attack", "burstsofnature")
spell:id(263)
spell:name("Terra Burst")
spell:words("exevo ulus tera")
+spell:castSound(SOUND_EFFECT_TYPE_SPELL_WRATH_OF_NATURE)
spell:level(300)
spell:mana(230)
spell:isPremium(true)
-spell:cooldown(1000) -- Cooldown is calculated on the casting
-spell:groupCooldown(2 * 1000)
+spell:isSelfTarget(true)
+spell:cooldown(22 * 1000)
+spell:groupCooldown(2 * 1000, 22 * 1000)
spell:needLearn(true)
spell:vocation("druid;true", "elder druid;true")
spell:register()
diff --git a/data/scripts/spells/support/divine_empowerment.lua b/data/scripts/spells/support/divine_empowerment.lua
index e05203359f8..248f01a6e0f 100644
--- a/data/scripts/spells/support/divine_empowerment.lua
+++ b/data/scripts/spells/support/divine_empowerment.lua
@@ -26,18 +26,6 @@ function spell.onCastSpell(creature, var)
return false
end
- local cooldown = 0
- if grade >= 3 then
- cooldown = 24
- elseif grade >= 2 then
- cooldown = 28
- elseif grade >= 1 then
- cooldown = 32
- end
- local condition = Condition(CONDITION_SPELLCOOLDOWN, CONDITIONID_DEFAULT, 268)
- condition:setTicks((cooldown * 1000) / configManager.getFloat(configKeys.RATE_SPELL_COOLDOWN))
- creature:addCondition(condition)
-
local position = creature:getPosition()
for x = -1, 1 do
for y = -1, 1 do
@@ -63,7 +51,7 @@ spell:isPremium(true)
spell:range(7)
spell:isSelfTarget(true)
spell:isAggressive(false)
-spell:cooldown(1000) -- Cooldown is calculated on the casting
+spell:cooldown(32 * 1000)
spell:groupCooldown(2 * 1000)
spell:needLearn(true)
spell:vocation("paladin;true", "royal paladin;true")
diff --git a/docs/python-scripts/convert_monsters_callbacks.py b/docs/python-scripts/convert_monsters_callbacks.py
new file mode 100644
index 00000000000..140b2562df0
--- /dev/null
+++ b/docs/python-scripts/convert_monsters_callbacks.py
@@ -0,0 +1,116 @@
+"""
+Script for processing Lua files in a project.
+
+This script is designed to modify `.lua` files in the root directory of the project and all of its subdirectories.
+The following modifications are made to each `.lua` file:
+1. Remove empty callback functions.
+2. Remove the 'onAppear' callback function entirely, including its corresponding `end`.
+3. Clean up unnecessary blank lines resulting from the removal of callback functions.
+
+Usage:
+1. Save this script in the `docs/python-scripts` directory of your project.
+2. Open a terminal and navigate to the `docs/python-scripts` directory:
+ cd path/to/your/project/docs/python-scripts
+3. Run the script using Python:
+ python convert_monsters_callbacks.py
+
+Prerequisites:
+- Ensure Python 3 is installed.
+- Make sure you have read and write permissions for all `.lua` files in the project directory.
+
+Output:
+- The script will print the root directory being processed.
+- At the end, it will output the number of files that were modified.
+
+Example:
+Root path: /path/to/your/project
+Script completed. Modified 5 file(s).
+"""
+
+import re
+import os
+
+def get_root_path():
+ """Get the root path of the project (two levels above the current script directory)."""
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
+
+def process_lua_code(code):
+ """Process the Lua code: remove specific callbacks and clean up empty lines.
+
+ Args:
+ code (str): The Lua code to be processed.
+
+ Returns:
+ str: The modified Lua code.
+ """
+ # Remove specific callbacks including 'onAppear' and empty callbacks
+ code = re.sub(r'\n?mType\.onAppear = function\(.*?\)\n(.*?)\nend\n?', '', code, flags=re.DOTALL)
+ code = re.sub(r'\n?mType\.\w+ = function\(.*?\) end\n?', '', code)
+
+ # Remove extra blank lines created by the removal of callbacks
+ code = re.sub(r'\n{3,}', '\n\n', code) # Limit multiple blank lines to just two
+
+ return code
+
+def process_lua_file(file_path):
+ """Process a single Lua file by applying the required modifications.
+
+ Args:
+ file_path (str): The path to the Lua file to be processed.
+
+ Returns:
+ bool: True if the file was modified and saved, False otherwise.
+ """
+ try:
+ with open(file_path, 'r', encoding='utf-8') as file:
+ code = file.read()
+ except Exception as e:
+ print(f"Error reading file {file_path}: {e}")
+ return False
+
+ original_code = code
+ modified_code = process_lua_code(code)
+
+ if modified_code != original_code:
+ try:
+ with open(file_path, 'w', encoding='utf-8') as file:
+ file.write(modified_code)
+ return True
+ except Exception as e:
+ print(f"Error writing file {file_path}: {e}")
+ return False
+
+def process_all_lua_files(root_path):
+ """Process all Lua files in the root path and its subdirectories.
+
+ Args:
+ root_path (str): The root directory in which to search for Lua files.
+
+ Returns:
+ int: The count of modified Lua files.
+ """
+ modified_files_count = 0
+
+ for dirpath, _, filenames in os.walk(root_path):
+ for filename in filenames:
+ if filename.endswith(".lua"):
+ file_path = os.path.join(dirpath, filename)
+ if process_lua_file(file_path):
+ modified_files_count += 1
+
+ return modified_files_count
+
+def main():
+ """Main function to run the script.
+
+ This function determines the root path of the project, processes all Lua files
+ found in the root path and subdirectories, and prints the number of files modified.
+ """
+ root_path = get_root_path()
+ print(f"Root path: {root_path}")
+
+ modified_files_count = process_all_lua_files(root_path)
+ print(f"Script completed. Modified {modified_files_count} file(s).")
+
+if __name__ == "__main__":
+ main()
diff --git a/docs/python-scripts/modify_lua_script_interfaces.py b/docs/python-scripts/modify_lua_script_interfaces.py
new file mode 100644
index 00000000000..881a8453d90
--- /dev/null
+++ b/docs/python-scripts/modify_lua_script_interfaces.py
@@ -0,0 +1,211 @@
+import os
+import re
+import argparse
+
+# Functions that modify the file
+
+def remove_constructor_and_destructor(content):
+ # Remove the class constructor and destructor, including a blank line after the destructor
+ pattern = r"explicit\s+\w+\(lua_State\* L\)\s*:\s*LuaScriptInterface\(\"[^\"]+\"\)\s*\{[^\}]*\}\n\s*~\w+\(\)\s*override\s*=\s*default;\n\s*\n?"
+ content = re.sub(pattern, "", content, flags=re.DOTALL)
+ return content
+
+def remove_include_luascript(content):
+ # Remove the specified include and the blank line below it
+ pattern = r'#include\s+"lua/scripts/luascript.hpp"\n\n?'
+ content = re.sub(pattern, "", content)
+ return content
+
+def remove_final_luascriptinterface(content):
+ # Remove "final : LuaScriptInterface", "public LuaScriptInterface", "final :", and "LuaScriptInterface" alone
+ pattern = r'final\s*:\s*public\s+LuaScriptInterface|public\s+LuaScriptInterface|final\s*:\s*|LuaScriptInterface\s*'
+ content = re.sub(pattern, "", content)
+ # Remove extra spaces between the class name and the opening block
+ content = re.sub(r'class\s+(\w+)\s*\{', r'class \1 {', content)
+ return content
+
+def move_init_function_to_cpp(hpp_content, cpp_content, class_name):
+ # Extracts the init function from the hpp, keeping the signature
+ pattern = r'static void init\(lua_State\* L\)\s*\{[^\}]*\}'
+ match = re.search(pattern, hpp_content, flags=re.DOTALL)
+ if match:
+ # Keep the function signature in the hpp, but remove the body
+ init_function_signature = "static void init(lua_State* L);"
+ hpp_content = re.sub(pattern, init_function_signature, hpp_content, flags=re.DOTALL)
+
+ # Adjust the function signature for the cpp
+ init_function = match.group()
+ init_function = re.sub(r'static void\s+', f'void {class_name}::', init_function)
+ # Remove extra indentation
+ init_function = init_function.replace(' \n\t\t', '\n\t')
+ # Remove the extra tab from the function closure
+ init_function = init_function.replace('\n\t}', '\n}')
+
+ # Add a blank line before and after the function
+ init_function = f"\n{init_function}\n"
+
+ # Add the function to the beginning of the cpp, after the includes
+ last_include = re.findall(r'#include\s+<[^>]+>|#include\s+"[^"]+"', cpp_content)
+ if last_include:
+ last_include_pos = cpp_content.rfind(last_include[-1]) + len(last_include[-1])
+ cpp_content = cpp_content[:last_include_pos] + "\n" + init_function + cpp_content[last_include_pos:]
+ else:
+ cpp_content = init_function + cpp_content
+ return hpp_content, cpp_content
+
+def add_include_to_cpp(cpp_content):
+ # Add the new include after the last include, if it is not already present
+ include_statement = '#include "lua/functions/lua_functions_loader.hpp"'
+ if include_statement not in cpp_content:
+ # Locate the last include
+ last_include = re.findall(r'#include\s+<[^>]+>|#include\s+"[^"]+"', cpp_content)
+ if last_include:
+ last_include_pos = cpp_content.rfind(last_include[-1]) + len(last_include[-1])
+ # Make sure there are not multiple line breaks before the include
+ cpp_content = cpp_content[:last_include_pos].rstrip() + "\n" + include_statement + "\n\n" + cpp_content[last_include_pos:].lstrip()
+ return cpp_content
+
+def process_files(hpp_file_path, cpp_file_path):
+ with open(hpp_file_path, 'r', encoding='utf-8') as hpp_file:
+ hpp_content = hpp_file.read()
+
+ with open(cpp_file_path, 'r', encoding='utf-8') as cpp_file:
+ cpp_content = cpp_file.read()
+
+ # Get the class name from the hpp file
+ class_name_match = re.search(r'class\s+(\w+)', hpp_content)
+ class_name = class_name_match.group(1) if class_name_match else None
+
+ if class_name:
+ # Apply all modifications
+ hpp_content = remove_constructor_and_destructor(hpp_content)
+ hpp_content = remove_include_luascript(hpp_content)
+ hpp_content = remove_final_luascriptinterface(hpp_content)
+ hpp_content, cpp_content = move_init_function_to_cpp(hpp_content, cpp_content, class_name)
+ cpp_content = add_include_to_cpp(cpp_content)
+
+ # Save the modified files
+ with open(hpp_file_path, 'w', encoding='utf-8') as hpp_file:
+ hpp_file.write(hpp_content)
+
+ with open(cpp_file_path, 'w', encoding='utf-8') as cpp_file:
+ cpp_file.write(cpp_content)
+
+ print(f'Modifications applied to: {hpp_file_path} and {cpp_file_path}')
+
+def main(directory):
+ # Scan the specified folder and find all .hpp and .cpp files
+ for root, _, files in os.walk(directory):
+ for file in files:
+ if file.endswith('.hpp'):
+ hpp_file_path = os.path.join(root, file)
+ cpp_file_path = hpp_file_path.replace('.hpp', '.cpp')
+ if os.path.exists(cpp_file_path):
+ process_files(hpp_file_path, cpp_file_path)
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='Apply modifications to .hpp and .cpp files according to specifications.')
+ parser.add_argument('directory', type=str, nargs='?', default='../../src/lua/functions/', help='Path of the directory to be scanned.')
+ args = parser.parse_args()
+
+ main(args.directory)
+
+# Functions you want to migrate to static calls
+functions_to_convert = [
+ "getNumber",
+ "getBoolean",
+ "getString",
+ "getUserdata",
+ "getScriptEnv",
+ "getCreature",
+ "getPlayer",
+ "getPosition",
+ "getOutfit",
+ "getThing",
+ "getUserdataShared",
+ "getUserdataType",
+ "getRawUserDataShared",
+ "getErrorDesc",
+ "getFormatedLoggerMessage",
+ "getField",
+ "getFieldString",
+ "getVariant",
+ "getGuild",
+ "isTable",
+ "isString",
+ "isNumber",
+ "isBoolean",
+ "isNil",
+ "isFunction",
+ "isUserdata",
+ "reportError",
+ "reportErrorFunc",
+ "pushInstantSpell",
+ "pushVariant",
+ "pushOutfit",
+ "pushCylinder",
+ "pushBoolean",
+ "pushString",
+ "pushUserdata",
+ "pushPosition",
+ "setMetatable",
+ "setWeakMetatable",
+ "setCreatureMetatable",
+ "setItemMetatable",
+ "setField",
+ "registerVariable",
+ "registerGlobalMethod",
+ "registerGlobalVariable",
+ "registerGlobalBoolean",
+ "registerMethod",
+ "registerClass",
+ "registerTable",
+ "registerSharedClass",
+ "registerMetaMethod",
+]
+
+# Files you want to exclude from scanning (relative paths)
+files_to_exclude = [
+ os.path.normpath("lua_functions_loader.cpp"),
+ os.path.normpath("lua_functions_loader.hpp")
+]
+
+def convert_to_static(file_path):
+ with open(file_path, 'r', encoding='utf-8') as file:
+ content = file.read()
+
+ original_content = content # Keep the original content to check for changes
+
+ for function in functions_to_convert:
+ # Regex to capture function calls and replace them with Lua::function
+ # Skip calls that are part of g_configManager() and handle both regular and template functions
+ pattern = r'(?)?\('
+ replacement = rf'Lua::{function}\1('
+ content = re.sub(pattern, replacement, content)
+
+ if content != original_content:
+ with open(file_path, 'w', encoding='utf-8') as file:
+ file.write(content)
+ print(f'File converted: {file_path}')
+ else:
+ print(f'No changes made to file: {file_path}')
+
+def main(directory):
+ # Scan the specified folder and find all .cpp and .hpp files
+ for root, _, files in os.walk(directory):
+ for file in files:
+ if file.endswith(('.cpp', '.hpp')):
+ file_path = os.path.normpath(os.path.join(root, file))
+
+ # Check if the file is in the exclusion list
+ if any(os.path.basename(file_path) == exclude_file for exclude_file in files_to_exclude):
+ print(f'File ignored: {file_path}')
+ continue # Skip the specified files
+
+ convert_to_static(file_path)
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='Convert functions to static calls.')
+ parser.add_argument('directory', type=str, nargs='?', default='../../src/lua/functions/', help='Path of the directory to be scanned.')
+
+ main(args.directory)
diff --git a/schema.sql b/schema.sql
index af245067057..86ea9e1bf6b 100644
--- a/schema.sql
+++ b/schema.sql
@@ -70,7 +70,7 @@ CREATE TABLE IF NOT EXISTS `players` (
`posx` int(11) NOT NULL DEFAULT '0',
`posy` int(11) NOT NULL DEFAULT '0',
`posz` int(11) NOT NULL DEFAULT '0',
- `conditions` blob NOT NULL,
+ `conditions` mediumblob NOT NULL,
`cap` int(11) NOT NULL DEFAULT '0',
`sex` int(11) NOT NULL DEFAULT '0',
`pronoun` int(11) NOT NULL DEFAULT '0',
diff --git a/src/canary_server.cpp b/src/canary_server.cpp
index bc4a616be21..0c7d75f18c7 100644
--- a/src/canary_server.cpp
+++ b/src/canary_server.cpp
@@ -9,6 +9,7 @@
#include "canary_server.hpp"
+#include "core.hpp"
#include "config/configmanager.hpp"
#include "creatures/npcs/npcs.hpp"
#include "creatures/players/grouping/familiars.hpp"
@@ -31,8 +32,7 @@
#include "server/network/protocol/protocollogin.hpp"
#include "server/network/protocol/protocolstatus.hpp"
#include "server/network/webhook/webhook.hpp"
-
-#include "core.hpp"
+#include "creatures/players/vocations/vocation.hpp"
CanaryServer::CanaryServer(
Logger &logger,
@@ -322,6 +322,7 @@ void CanaryServer::initializeDatabase() {
&& !DatabaseManager::optimizeTables()) {
logger.debug("No tables were optimized");
}
+ g_logger().info("Database connection established!");
}
void CanaryServer::loadModules() {
diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp
index a63f42093db..823d94ab519 100644
--- a/src/creatures/combat/combat.cpp
+++ b/src/creatures/combat/combat.cpp
@@ -15,18 +15,21 @@
#include "creatures/monsters/monster.hpp"
#include "creatures/monsters/monsters.hpp"
#include "creatures/players/grouping/party.hpp"
+#include "creatures/players/player.hpp"
#include "creatures/players/imbuements/imbuements.hpp"
#include "creatures/players/wheel/player_wheel.hpp"
#include "game/game.hpp"
#include "game/scheduling/dispatcher.hpp"
#include "io/iobestiary.hpp"
#include "io/ioprey.hpp"
+#include "creatures/players/vocations/vocation.hpp"
#include "items/weapons/weapons.hpp"
#include "lib/metrics/metrics.hpp"
#include "lua/callbacks/event_callback.hpp"
#include "lua/callbacks/events_callbacks.hpp"
#include "lua/creature/events.hpp"
#include "map/spectators.hpp"
+#include "creatures/players/player.hpp"
int32_t Combat::getLevelFormula(const std::shared_ptr &player, const std::shared_ptr &wheelSpell, const CombatDamage &damage) const {
if (!player) {
@@ -1278,11 +1281,6 @@ void Combat::CombatFunc(const std::shared_ptr &caster, const Position
combatTileEffects(spectators.data(), caster, tile, params);
}
- // Wheel of destiny update beam mastery damage
- if (casterPlayer) {
- casterPlayer->wheel()->updateBeamMasteryDamage(tmpDamage, beamAffectedTotal, beamAffectedCurrent);
- }
-
postCombatEffects(caster, origin, pos, params);
}
diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp
index 0d66602ddca..327d97f3284 100644
--- a/src/creatures/combat/spells.cpp
+++ b/src/creatures/combat/spells.cpp
@@ -20,7 +20,8 @@
#include "game/game.hpp"
#include "lua/global/lua_variant.hpp"
#include "lua/scripts/lua_environment.hpp"
-#include "lua/scripts/luascript.hpp"
+#include "lua/scripts/scripts.hpp"
+#include "lib/di/container.hpp"
std::array(WheelSpellBoost_t::TOTAL_COUNT)> wheelOfDestinyRegularBoost = { 0 };
std::array(WheelSpellBoost_t::TOTAL_COUNT)> wheelOfDestinyUpgradedBoost = { 0 };
@@ -156,7 +157,7 @@ bool Spells::registerRuneLuaEvent(const std::shared_ptr &rune) {
"[{}] duplicate registered rune with id: {}, for script: {}",
__FUNCTION__,
id,
- rune->getScriptInterface()->getLoadingScriptName()
+ rune->getRuneSpellScriptInterface()->getLoadingScriptName()
);
}
return inserted;
@@ -277,29 +278,45 @@ Position Spells::getCasterPosition(const std::shared_ptr &creature, Di
return getNextPosition(dir, creature->getPosition());
}
+LuaScriptInterface* BaseSpell::getScriptInterface() const {
+ return &g_scripts().getScriptInterface();
+}
+
+bool BaseSpell::loadScriptId() {
+ LuaScriptInterface &luaInterface = g_scripts().getScriptInterface();
+ m_spellScriptId = luaInterface.getEvent();
+ if (m_spellScriptId == -1) {
+ g_logger().error("[MoveEvent::loadScriptId] Failed to load event. Script name: '{}', Module: '{}'", luaInterface.getLoadingScriptName(), luaInterface.getInterfaceName());
+ return false;
+ }
+
+ return true;
+}
+
+int32_t BaseSpell::getScriptId() const {
+ return m_spellScriptId;
+}
+
+void BaseSpell::setScriptId(int32_t newScriptId) {
+ m_spellScriptId = newScriptId;
+}
+
+bool BaseSpell::isLoadedScriptId() const {
+ return m_spellScriptId != 0;
+}
+
CombatSpell::CombatSpell(const std::shared_ptr &newCombat, bool newNeedTarget, bool newNeedDirection) :
- Script(&g_spells().getScriptInterface()),
m_combat(newCombat),
needDirection(newNeedDirection),
needTarget(newNeedTarget) {
- // Empty
-}
-
-bool CombatSpell::loadScriptCombat() {
- m_combat = g_luaEnvironment().getCombatObject(g_luaEnvironment().lastCombatId);
- return m_combat != nullptr;
}
std::shared_ptr CombatSpell::getCombat() const {
return m_combat;
}
-std::string CombatSpell::getScriptTypeName() const {
- return "onCastSpell";
-}
-
bool CombatSpell::castSpell(const std::shared_ptr &creature) {
- if (isLoadedCallback()) {
+ if (isLoadedScriptId()) {
LuaVariant var;
var.type = VARIANT_POSITION;
@@ -346,7 +363,7 @@ bool CombatSpell::castSpell(const std::shared_ptr &creature, const std
return false;
}
- if (isLoadedCallback()) {
+ if (isLoadedScriptId()) {
LuaVariant var;
if (combat->hasArea()) {
var.type = VARIANT_POSITION;
@@ -412,6 +429,8 @@ bool CombatSpell::executeCastSpell(const std::shared_ptr &creature, co
return getScriptInterface()->callFunction(2);
}
+Spell::Spell() = default;
+
bool Spell::playerSpellCheck(const std::shared_ptr &player) const {
if (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {
return false;
@@ -730,7 +749,10 @@ void Spell::applyCooldownConditions(const std::shared_ptr &player) const
g_logger().debug("[{}] spell name: {}, spellCooldown: {}, bonus: {}, augment {}", __FUNCTION__, name, spellCooldown, player->wheel()->getSpellBonus(name, WheelSpellBoost_t::COOLDOWN), augmentCooldownReduction);
spellCooldown -= player->wheel()->getSpellBonus(name, WheelSpellBoost_t::COOLDOWN);
spellCooldown -= augmentCooldownReduction;
+ const int32_t halfBaseCooldown = cooldown / 2;
+ spellCooldown = halfBaseCooldown > spellCooldown ? halfBaseCooldown : spellCooldown; // The cooldown should never be reduced less than half (50%) of its base cooldown
if (spellCooldown > 0) {
+ player->wheel()->handleTwinBurstsCooldown(player, name, spellCooldown, rateCooldown);
const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);
player->addCondition(condition);
}
@@ -752,7 +774,9 @@ void Spell::applyCooldownConditions(const std::shared_ptr &player) const
if (isUpgraded) {
spellSecondaryGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, spellGrade);
}
+ spellSecondaryGroupCooldown -= player->wheel()->getSpellBonus(name, WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN);
if (spellSecondaryGroupCooldown > 0) {
+ player->wheel()->handleBeamMasteryCooldown(player, name, spellSecondaryGroupCooldown, rateCooldown);
const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);
player->addCondition(condition);
}
@@ -1030,6 +1054,8 @@ void Spell::setLockedPZ(bool b) {
pzLocked = b;
}
+InstantSpell::InstantSpell() = default;
+
bool InstantSpell::playerCastInstant(const std::shared_ptr &player, std::string ¶m) const {
if (!playerSpellCheck(player)) {
return false;
@@ -1161,10 +1187,6 @@ bool InstantSpell::canThrowSpell(const std::shared_ptr &creature, cons
return true;
}
-std::string InstantSpell::getScriptTypeName() const {
- return "onCastSpell";
-}
-
bool InstantSpell::castSpell(const std::shared_ptr &creature) {
LuaVariant var;
var.instantName = getName();
@@ -1294,6 +1316,33 @@ bool InstantSpell::canCast(const std::shared_ptr &player) const {
return false;
}
+LuaScriptInterface* RuneSpell::getRuneSpellScriptInterface() const {
+ return &g_scripts().getScriptInterface();
+}
+
+bool RuneSpell::loadRuneSpellScriptId() {
+ LuaScriptInterface &luaInterface = g_scripts().getScriptInterface();
+ m_runeSpellScriptId = luaInterface.getEvent();
+ if (m_runeSpellScriptId == -1) {
+ g_logger().error("[MoveEvent::loadScriptId] Failed to load event. Script name: '{}', Module: '{}'", luaInterface.getLoadingScriptName(), luaInterface.getInterfaceName());
+ return false;
+ }
+
+ return true;
+}
+
+int32_t RuneSpell::getRuneSpellScriptId() const {
+ return m_runeSpellScriptId;
+}
+
+void RuneSpell::setRuneSpellScriptId(int32_t newScriptId) {
+ m_runeSpellScriptId = newScriptId;
+}
+
+bool RuneSpell::isRuneSpellLoadedScriptId() const {
+ return m_runeSpellScriptId != 0;
+}
+
ReturnValue RuneSpell::canExecuteAction(const std::shared_ptr &player, const Position &toPos) {
if (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {
return RETURNVALUE_CANNOTUSETHISOBJECT;
@@ -1329,7 +1378,7 @@ bool RuneSpell::executeUse(const std::shared_ptr &player, const std::sha
}
// If script not loaded correctly, return
- if (!isLoadedCallback()) {
+ if (!isRuneSpellLoadedScriptId()) {
return false;
}
@@ -1391,13 +1440,9 @@ bool RuneSpell::castSpell(const std::shared_ptr &creature, const std::
return internalCastSpell(creature, var, false);
}
-std::string RuneSpell::getScriptTypeName() const {
- return "onCastSpell";
-}
-
bool RuneSpell::internalCastSpell(const std::shared_ptr &creature, const LuaVariant &var, bool isHotkey) const {
bool result;
- if (isLoadedCallback()) {
+ if (isRuneSpellLoadedScriptId()) {
result = executeCastSpell(creature, var, isHotkey);
} else {
result = false;
@@ -1415,11 +1460,11 @@ bool RuneSpell::executeCastSpell(const std::shared_ptr &creature, cons
}
ScriptEnvironment* env = LuaEnvironment::getScriptEnv();
- env->setScriptId(getScriptId(), getScriptInterface());
+ env->setScriptId(getRuneSpellScriptId(), getRuneSpellScriptInterface());
- lua_State* L = getScriptInterface()->getLuaState();
+ lua_State* L = getRuneSpellScriptInterface()->getLuaState();
- getScriptInterface()->pushFunction(getScriptId());
+ getRuneSpellScriptInterface()->pushFunction(getRuneSpellScriptId());
LuaScriptInterface::pushUserdata(L, creature);
LuaScriptInterface::setCreatureMetatable(L, -1, creature);
@@ -1428,7 +1473,7 @@ bool RuneSpell::executeCastSpell(const std::shared_ptr &creature, cons
LuaScriptInterface::pushBoolean(L, isHotkey);
- return getScriptInterface()->callFunction(3);
+ return getRuneSpellScriptInterface()->callFunction(3);
}
bool RuneSpell::isInstant() const {
diff --git a/src/creatures/combat/spells.hpp b/src/creatures/combat/spells.hpp
index ab34fa6dbce..5d9edb70dd6 100644
--- a/src/creatures/combat/spells.hpp
+++ b/src/creatures/combat/spells.hpp
@@ -10,7 +10,6 @@
#pragma once
#include "lua/creature/actions.hpp"
-#include "lua/scripts/scripts.hpp"
enum class WheelSpellBoost_t : uint8_t;
enum class WheelSpellGrade_t : uint8_t;
@@ -18,12 +17,17 @@ enum class WheelSpellGrade_t : uint8_t;
class InstantSpell;
class RuneSpell;
class Spell;
+class Combat;
+class Player;
+class Creature;
+class LuaScriptInterface;
struct LuaVariant;
+struct Position;
using VocSpellMap = std::map;
-class Spells final : public Scripts {
+class Spells {
public:
Spells();
~Spells();
@@ -78,11 +82,20 @@ class BaseSpell {
virtual bool castSpell(const std::shared_ptr &creature) = 0;
virtual bool castSpell(const std::shared_ptr &creature, const std::shared_ptr &target) = 0;
+ LuaScriptInterface* getScriptInterface() const;
+ bool loadScriptId();
+ int32_t getScriptId() const;
+ void setScriptId(int32_t newScriptId);
+ bool isLoadedScriptId() const;
+
SoundEffect_t soundImpactEffect = SoundEffect_t::SILENCE;
SoundEffect_t soundCastEffect = SoundEffect_t::SPELL_OR_RUNE;
+
+protected:
+ int32_t m_spellScriptId {};
};
-class CombatSpell final : public Script, public BaseSpell, public std::enable_shared_from_this {
+class CombatSpell final : public BaseSpell, public std::enable_shared_from_this {
public:
// Constructor
CombatSpell(const std::shared_ptr &newCombat, bool newNeedTarget, bool newNeedDirection);
@@ -97,12 +110,9 @@ class CombatSpell final : public Script, public BaseSpell, public std::enable_sh
// Scripting spell
bool executeCastSpell(const std::shared_ptr &creature, const LuaVariant &var) const;
- bool loadScriptCombat();
std::shared_ptr getCombat() const;
private:
- std::string getScriptTypeName() const override;
-
std::shared_ptr m_combat;
bool needDirection;
@@ -111,7 +121,7 @@ class CombatSpell final : public Script, public BaseSpell, public std::enable_sh
class Spell : public BaseSpell {
public:
- Spell() = default;
+ Spell();
[[nodiscard]] const std::string &getName() const;
void setName(std::string n);
@@ -267,10 +277,9 @@ class Spell : public BaseSpell {
friend class SpellFunctions;
};
-class InstantSpell final : public Script, public Spell {
+class InstantSpell final : public Spell {
public:
- using Script::Script;
-
+ InstantSpell();
bool playerCastInstant(const std::shared_ptr &player, std::string ¶m) const;
bool castSpell(const std::shared_ptr &creature) override;
@@ -294,8 +303,6 @@ class InstantSpell final : public Script, public Spell {
bool canThrowSpell(const std::shared_ptr &creature, const std::shared_ptr &target) const;
private:
- [[nodiscard]] std::string getScriptTypeName() const override;
-
bool needDirection = false;
bool hasParam = false;
bool hasPlayerNameParam = false;
@@ -307,6 +314,12 @@ class RuneSpell final : public Action, public Spell {
public:
using Action::Action;
+ LuaScriptInterface* getRuneSpellScriptInterface() const;
+ bool loadRuneSpellScriptId();
+ int32_t getRuneSpellScriptId() const;
+ void setRuneSpellScriptId(int32_t newScriptId);
+ bool isRuneSpellLoadedScriptId() const;
+
ReturnValue canExecuteAction(const std::shared_ptr &player, const Position &toPos) override;
bool hasOwnErrorHandler() override;
std::shared_ptr getTarget(const std::shared_ptr &, const std::shared_ptr &targetCreature, const Position &, uint8_t) const override;
@@ -326,10 +339,10 @@ class RuneSpell final : public Action, public Spell {
void setCharges(uint32_t c);
private:
- [[nodiscard]] std::string getScriptTypeName() const override;
-
bool internalCastSpell(const std::shared_ptr &creature, const LuaVariant &var, bool isHotkey) const;
+ int32_t m_runeSpellScriptId = 0;
+
uint16_t runeId = 0;
uint32_t charges = 0;
bool hasCharges = false;
diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp
index f3ad0e5d482..2081b0572fc 100644
--- a/src/creatures/creature.cpp
+++ b/src/creatures/creature.cpp
@@ -96,10 +96,6 @@ int32_t Creature::getWalkSize() {
void Creature::onThink(uint32_t interval) {
metrics::method_latency measure(__METHOD_NAME__);
- if (!isMapLoaded && useCacheMap()) {
- isMapLoaded = true;
- updateMapCache();
- }
const auto &followCreature = getFollowCreature();
const auto &master = getMaster();
@@ -290,125 +286,18 @@ void Creature::stopEventWalk() {
}
}
-void Creature::updateMapCache() {
- if (!useCacheMap()) {
- return;
- }
-
- metrics::method_latency measure(__METHOD_NAME__);
- std::shared_ptr newTile;
- const Position &myPos = getPosition();
- Position pos(0, 0, myPos.z);
-
- for (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {
- for (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {
- pos.x = myPos.getX() + x;
- pos.y = myPos.getY() + y;
- newTile = g_game().map.getTile(pos);
- updateTileCache(newTile, pos);
- }
- }
-}
-
-void Creature::updateTileCache(const std::shared_ptr &newTile, int32_t dx, int32_t dy) {
- metrics::method_latency measure(__METHOD_NAME__);
- if (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {
- localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx] = newTile && newTile->queryAdd(0, getCreature(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR;
- }
-}
-
-void Creature::updateTileCache(const std::shared_ptr &upTile, const Position &pos) {
- const Position &myPos = getPosition();
- if (pos.z == myPos.z) {
- int32_t dx = Position::getOffsetX(pos, myPos);
- int32_t dy = Position::getOffsetY(pos, myPos);
- updateTileCache(upTile, dx, dy);
- }
-}
-
-int32_t Creature::getWalkCache(const Position &pos) {
- metrics::method_latency measure(__METHOD_NAME__);
- if (!useCacheMap()) {
- return 2;
- }
-
- const Position &myPos = getPosition();
- if (myPos.z != pos.z) {
- return 0;
- }
-
- if (pos == myPos) {
- return 1;
- }
-
- int32_t dx = Position::getOffsetX(pos, myPos);
- if (std::abs(dx) <= maxWalkCacheWidth) {
- int32_t dy = Position::getOffsetY(pos, myPos);
- if (std::abs(dy) <= maxWalkCacheHeight) {
- return localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx];
- }
- }
-
- // out of range
- return 2;
-}
-
-void Creature::onAddTileItem(const std::shared_ptr &tileItem, const Position &pos) {
- if (isMapLoaded && pos.z == getPosition().z) {
- updateTileCache(tileItem, pos);
- }
-}
-
-void Creature::onUpdateTileItem(const std::shared_ptr &updateTile, const Position &pos, const std::shared_ptr- &, const ItemType &oldType, const std::shared_ptr
- &, const ItemType &newType) {
- if (!isMapLoaded) {
- return;
- }
-
- if (oldType.blockSolid || oldType.blockPathFind || newType.blockPathFind || newType.blockSolid) {
- if (pos.z == getPosition().z) {
- updateTileCache(updateTile, pos);
- }
- }
-}
-
-void Creature::onRemoveTileItem(const std::shared_ptr &updateTile, const Position &pos, const ItemType &iType, const std::shared_ptr
- &) {
- if (!isMapLoaded) {
- return;
- }
-
- if (iType.blockSolid || iType.blockPathFind || iType.isGroundTile()) {
- if (pos.z == getPosition().z) {
- updateTileCache(updateTile, pos);
- }
- }
-}
-
void Creature::onCreatureAppear(const std::shared_ptr &creature, bool isLogin) {
metrics::method_latency measure(__METHOD_NAME__);
if (creature.get() == this) {
- if (useCacheMap()) {
- isMapLoaded = true;
- updateMapCache();
- }
-
if (isLogin) {
setLastPosition(getPosition());
}
- } else if (isMapLoaded) {
- if (creature->getPosition().z == getPosition().z) {
- updateTileCache(creature->getTile(), creature->getPosition());
- }
}
}
void Creature::onRemoveCreature(const std::shared_ptr &creature, bool) {
metrics::method_latency measure(__METHOD_NAME__);
onCreatureDisappear(creature, true);
- if (creature && creature != getCreature() && isMapLoaded) {
- if (creature->getPosition().z == getPosition().z) {
- updateTileCache(creature->getTile(), creature->getPosition());
- }
- }
// Update player from monster target list (avoid memory usage after clean)
if (const auto &monster = getMonster(); monster && monster->getAttackedCreature() == creature) {
@@ -526,101 +415,6 @@ void Creature::onCreatureMove(const std::shared_ptr &creature, const s
if (newTile->getZoneType() != oldTile->getZoneType()) {
onChangeZone(getZoneType());
}
-
- // update map cache
- if (isMapLoaded) {
- if (teleport || oldPos.z != newPos.z) {
- updateMapCache();
- } else {
- const Position &myPos = getPosition();
-
- if (oldPos.y > newPos.y) { // north
- // shift y south
- for (int32_t y = mapWalkHeight - 1; --y >= 0;) {
- std::ranges::copy(std::span(localMapCache[y]), localMapCache[y + 1]);
- }
-
- // update 0
- for (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {
- const auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() - maxWalkCacheHeight), myPos.z);
- updateTileCache(cacheTile, x, -maxWalkCacheHeight);
- }
- } else if (oldPos.y < newPos.y) { // south
- // shift y north
- for (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {
- std::ranges::copy(std::span(localMapCache[y + 1]), localMapCache[y]);
- }
-
- // update mapWalkHeight - 1
- for (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {
- const auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() + maxWalkCacheHeight), myPos.z);
- updateTileCache(cacheTile, x, maxWalkCacheHeight);
- }
- }
-
- if (oldPos.x < newPos.x) { // east
- // shift y west
- int32_t starty = 0;
- int32_t endy = mapWalkHeight - 1;
- int32_t dy = Position::getDistanceY(oldPos, newPos);
-
- if (dy < 0) {
- endy += dy;
- } else if (dy > 0) {
- starty = dy;
- }
-
- for (int32_t y = starty; y <= endy; ++y) {
- for (int32_t x = 0; x <= mapWalkWidth - 2; ++x) {
- localMapCache[y][x] = localMapCache[y][x + 1];
- }
- }
-
- // update mapWalkWidth - 1
- for (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {
- const auto &cacheTile = g_game().map.getTile(myPos.x + maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);
- updateTileCache(cacheTile, maxWalkCacheWidth, y);
- }
- } else if (oldPos.x > newPos.x) { // west
- // shift y east
- int32_t starty = 0;
- int32_t endy = mapWalkHeight - 1;
- int32_t dy = Position::getDistanceY(oldPos, newPos);
-
- if (dy < 0) {
- endy += dy;
- } else if (dy > 0) {
- starty = dy;
- }
-
- for (int32_t y = starty; y <= endy; ++y) {
- for (int32_t x = mapWalkWidth - 1; --x >= 0;) {
- localMapCache[y][x + 1] = localMapCache[y][x];
- }
- }
-
- // update 0
- for (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {
- const auto &cacheTile = g_game().map.getTile(myPos.x - maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);
- updateTileCache(cacheTile, -maxWalkCacheWidth, y);
- }
- }
-
- updateTileCache(oldTile, oldPos);
- }
- }
- } else {
- if (isMapLoaded) {
- const Position &myPos = getPosition();
-
- if (newPos.z == myPos.z) {
- updateTileCache(newTile, newPos);
- }
-
- if (oldPos.z == myPos.z) {
- updateTileCache(oldTile, oldPos);
- }
- }
}
const auto &followCreature = getFollowCreature();
@@ -1591,6 +1385,10 @@ LightInfo Creature::getCreatureLight() const {
return internalLight;
}
+uint16_t Creature::getSpeed() const {
+ return std::clamp(baseSpeed + varSpeed, 0, static_cast(std::numeric_limits::max()));
+}
+
void Creature::setSpeed(int32_t varSpeedDelta) {
// Prevents creatures from not exceeding the maximum allowed speed
if (getSpeed() >= PLAYER_MAX_SPEED) {
diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp
index fd3c5bdce5e..fcea0a6b0f2 100644
--- a/src/creatures/creature.hpp
+++ b/src/creatures/creature.hpp
@@ -194,9 +194,7 @@ class Creature : virtual public Thing, public SharedObject {
virtual uint16_t getStepSpeed() const {
return getSpeed();
}
- uint16_t getSpeed() const {
- return static_cast(baseSpeed + varSpeed);
- }
+ uint16_t getSpeed() const;
void setSpeed(int32_t varSpeedDelta);
void setBaseSpeed(uint16_t newBaseSpeed) {
@@ -490,9 +488,9 @@ class Creature : virtual public Thing, public SharedObject {
virtual void turnToCreature(const std::shared_ptr &creature);
- void onAddTileItem(const std::shared_ptr &tile, const Position &pos);
- virtual void onUpdateTileItem(const std::shared_ptr &tile, const Position &pos, const std::shared_ptr
- &oldItem, const ItemType &oldType, const std::shared_ptr
- &newItem, const ItemType &newType);
- virtual void onRemoveTileItem(const std::shared_ptr &tile, const Position &pos, const ItemType &iType, const std::shared_ptr
- &item);
+ void onAddTileItem(const std::shared_ptr & /*tile*/, const Position & /*pos*/) { }
+ virtual void onUpdateTileItem(const std::shared_ptr &tile, const Position &pos, const std::shared_ptr
- &oldItem, const ItemType &oldType, const std::shared_ptr
- &newItem, const ItemType &newType) { }
+ virtual void onRemoveTileItem(const std::shared_ptr &tile, const Position &pos, const ItemType &iType, const std::shared_ptr
- &item) { }
virtual void onCreatureAppear(const std::shared_ptr &creature, bool isLogin);
virtual void onRemoveCreature(const std::shared_ptr &creature, bool isLogout);
@@ -562,8 +560,6 @@ class Creature : virtual public Thing, public SharedObject {
return m_tile.lock();
}
- int32_t getWalkCache(const Position &pos);
-
const Position &getLastPosition() const {
return lastPosition;
}
@@ -701,19 +697,10 @@ class Creature : virtual public Thing, public SharedObject {
Pathfinder = 1 << 3
};
- virtual bool useCacheMap() const {
- return false;
- }
-
virtual bool isDead() const {
return false;
}
- static constexpr int32_t mapWalkWidth = MAP_MAX_VIEW_PORT_X * 2 + 1;
- static constexpr int32_t mapWalkHeight = MAP_MAX_VIEW_PORT_Y * 2 + 1;
- static constexpr int32_t maxWalkCacheWidth = (mapWalkWidth - 1) / 2;
- static constexpr int32_t maxWalkCacheHeight = (mapWalkHeight - 1) / 2;
-
Position position;
CountMap damageMap;
@@ -777,9 +764,7 @@ class Creature : virtual public Thing, public SharedObject {
std::atomic_bool creatureCheck = false;
std::atomic_bool inCheckCreaturesVector = false;
- bool localMapCache[mapWalkHeight][mapWalkWidth] = { { false } };
bool isInternalRemoved = false;
- bool isMapLoaded = false;
bool isUpdatingPath = false;
bool skillLoss = true;
bool lootDrop = true;
@@ -803,9 +788,6 @@ class Creature : virtual public Thing, public SharedObject {
bool hasEventRegistered(CreatureEventType_t event) const;
CreatureEventList getCreatureEvents(CreatureEventType_t type) const;
- void updateMapCache();
- void updateTileCache(const std::shared_ptr &tile, int32_t dx, int32_t dy);
- void updateTileCache(const std::shared_ptr &tile, const Position &pos);
void onCreatureDisappear(const std::shared_ptr &creature, bool isLogout);
virtual void doAttacking(uint32_t) { }
virtual bool hasExtraSwing() {
diff --git a/src/creatures/creatures_definitions.hpp b/src/creatures/creatures_definitions.hpp
index f7ba1e203b1..dd554c086b3 100644
--- a/src/creatures/creatures_definitions.hpp
+++ b/src/creatures/creatures_definitions.hpp
@@ -706,6 +706,8 @@ enum SpellGroup_t : uint8_t {
SPELLGROUP_CRIPPLING = 6,
SPELLGROUP_FOCUS = 7,
SPELLGROUP_ULTIMATESTRIKES = 8,
+ SPELLGROUP_BURSTS_OF_NATURE = 9,
+ SPELLGROUP_GREAT_BEAMS = 10,
};
enum ChannelEvent_t : uint8_t {
diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp
index 2e9140dcc18..7276bea19d1 100644
--- a/src/creatures/monsters/monster.cpp
+++ b/src/creatures/monsters/monster.cpp
@@ -967,7 +967,6 @@ void Monster::setIdle(bool idle) {
if (!isIdle) {
g_game().addCreatureCheck(getMonster());
-
} else {
onIdleStatus();
clearTargetList();
@@ -1015,10 +1014,7 @@ void Monster::onAddCondition(ConditionType_t type) {
onConditionStatusChange(type);
}
-void Monster::onConditionStatusChange(ConditionType_t type) {
- if (type == CONDITION_FIRE || type == CONDITION_ENERGY || type == CONDITION_POISON) {
- updateMapCache();
- }
+void Monster::onConditionStatusChange(ConditionType_t /*type*/) {
updateIdleStatus();
}
@@ -1518,7 +1514,6 @@ void Monster::doWalkBack(uint32_t &flags, Direction &nextDirection, bool &result
} else {
if (ignoreFieldDamage) {
ignoreFieldDamage = false;
- updateMapCache();
}
int32_t distance = std::max(Position::getDistanceX(position, masterPos), Position::getDistanceY(position, masterPos));
@@ -1544,7 +1539,6 @@ void Monster::doFollowCreature(uint32_t &flags, Direction &nextDirection, bool &
} else {
if (ignoreFieldDamage) {
ignoreFieldDamage = false;
- updateMapCache();
}
// target dancing
const auto &attackedCreature = getAttackedCreature();
@@ -2226,10 +2220,6 @@ void Monster::setHazardSystemDefenseBoost(bool value) {
bool Monster::canWalkTo(Position pos, Direction moveDirection) {
pos = getNextPosition(moveDirection, pos);
if (isInSpawnRange(pos)) {
- if (getWalkCache(pos) == 0) {
- return false;
- }
-
const auto &tile = g_game().map.getTile(pos);
if (tile && tile->getTopVisibleCreature(getMonster()) == nullptr && tile->queryAdd(0, getMonster(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR) {
return true;
@@ -2406,7 +2396,6 @@ void Monster::drainHealth(const std::shared_ptr &attacker, int32_t dam
if (damage > 0 && randomStepping) {
ignoreFieldDamage = true;
- updateMapCache();
}
if (isInvisible()) {
diff --git a/src/creatures/monsters/monster.hpp b/src/creatures/monsters/monster.hpp
index ed9a628159f..b8a6087acc1 100644
--- a/src/creatures/monsters/monster.hpp
+++ b/src/creatures/monsters/monster.hpp
@@ -332,13 +332,6 @@ class Monster final : public Creature {
uint16_t getLookCorpse() const override;
void dropLoot(const std::shared_ptr &corpse, const std::shared_ptr &lastHitCreature) override;
void getPathSearchParams(const std::shared_ptr &creature, FindPathParams &fpp) override;
- bool useCacheMap() const override {
- // return !randomStepping;
- // As the map cache is done synchronously for each movement that a monster makes, it is better to disable it,
- // as the pathfinder, which is one of the resources that uses this cache the most,
- // is multithreding and thus the processing cost is divided between the threads.
- return false;
- }
friend class MonsterFunctions;
friend class Map;
diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp
index 87fd967ab46..cd33e12e248 100644
--- a/src/creatures/monsters/monsters.cpp
+++ b/src/creatures/monsters/monsters.cpp
@@ -16,6 +16,7 @@
#include "game/game.hpp"
#include "items/weapons/weapons.hpp"
#include "lua/scripts/luascript.hpp"
+#include "lib/di/container.hpp"
void MonsterType::loadLoot(const std::shared_ptr &monsterType, LootBlock lootBlock) const {
if (lootBlock.childLoot.empty()) {
diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp
index 7d7bbc84e34..3a915d737b2 100644
--- a/src/creatures/monsters/spawns/spawn_monster.cpp
+++ b/src/creatures/monsters/spawns/spawn_monster.cpp
@@ -232,9 +232,7 @@ bool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const
spawnedMonsterMap[spawnMonsterId] = monster;
sb.lastSpawn = OTSYS_TIME();
- g_events().eventMonsterOnSpawn(monster, sb.pos);
monster->onSpawn();
- g_callbacks().executeCallback(EventCallback_t::monsterOnSpawn, &EventCallback::monsterOnSpawn, monster, sb.pos);
return true;
}
diff --git a/src/creatures/npcs/npcs.cpp b/src/creatures/npcs/npcs.cpp
index cff44588d71..53ed757336f 100644
--- a/src/creatures/npcs/npcs.cpp
+++ b/src/creatures/npcs/npcs.cpp
@@ -14,6 +14,7 @@
#include "lua/scripts/lua_environment.hpp"
#include "lua/scripts/luascript.hpp"
#include "lua/scripts/scripts.hpp"
+#include "lib/di/container.hpp"
bool NpcType::canSpawn(const Position &pos) const {
bool canSpawn = true;
diff --git a/src/creatures/npcs/spawns/spawn_npc.cpp b/src/creatures/npcs/spawns/spawn_npc.cpp
index bf3b6a1bc65..404f6ce588e 100644
--- a/src/creatures/npcs/spawns/spawn_npc.cpp
+++ b/src/creatures/npcs/spawns/spawn_npc.cpp
@@ -202,9 +202,6 @@ bool SpawnNpc::spawnNpc(uint32_t spawnId, const std::shared_ptr &npcTyp
spawnedNpcMap.insert(spawned_pair(spawnId, npc));
spawnNpcMap[spawnId].lastSpawnNpc = OTSYS_TIME();
-
- g_events().eventNpcOnSpawn(npc, pos);
- g_callbacks().executeCallback(EventCallback_t::npcOnSpawn, &EventCallback::npcOnSpawn, npc, pos);
return true;
}
diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp
index e5b40487706..497bf14ad45 100644
--- a/src/creatures/players/player.cpp
+++ b/src/creatures/players/player.cpp
@@ -9,6 +9,7 @@
#include "creatures/players/player.hpp"
+#include "account/account.hpp"
#include "config/configmanager.hpp"
#include "core.hpp"
#include "creatures/appearance/mounts/mounts.hpp"
@@ -61,6 +62,7 @@
#include "lua/creature/events.hpp"
#include "lua/creature/movement.hpp"
#include "map/spectators.hpp"
+#include "creatures/players/vocations/vocation.hpp"
MuteCountMap Player::muteCountMap;
@@ -976,8 +978,6 @@ void Player::closeContainer(uint8_t cid) {
removeEmptyRewards();
}
openContainers.erase(it);
- if (container && container->getID() == ITEM_BROWSEFIELD) {
- }
}
void Player::removeEmptyRewards() {
@@ -1773,8 +1773,8 @@ std::shared_ptr Player::getDepotLocker(uint32_t depotId) {
depotLocker->internalAddThing(marketItem);
depotLocker->internalAddThing(inbox);
if (createSupplyStash) {
- const auto &supplyStash = Item::CreateItem(ITEM_SUPPLY_STASH);
- depotLocker->internalAddThing(supplyStash);
+ const auto &supplyStashPtr = Item::CreateItem(ITEM_SUPPLY_STASH);
+ depotLocker->internalAddThing(supplyStashPtr);
}
const auto &depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES)));
for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES); i > 0; i--) {
@@ -5021,8 +5021,8 @@ ItemsTierCountList Player::getDepotChestItemsId() const {
ItemsTierCountList Player::getDepotInboxItemsId() const {
ItemsTierCountList itemMap;
- const auto &inbox = getInbox();
- const auto &container = inbox->getContainer();
+ const auto &inboxPtr = getInbox();
+ const auto &container = inboxPtr->getContainer();
if (container) {
for (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {
const auto &item = *it;
@@ -6355,7 +6355,7 @@ uint32_t Player::getMagicLevel() const {
uint32_t magic = std::max(0, getLoyaltyMagicLevel() + varStats[STAT_MAGICPOINTS]);
// Wheel of destiny magic bonus
magic += m_wheelPlayer->getStat(WheelStat_t::MAGIC); // Regular bonus
- magic += m_wheelPlayer->getMajorStatConditional("Positional Tatics", WheelMajor_t::MAGIC); // Revelation bonus
+ magic += m_wheelPlayer->getMajorStatConditional("Positional Tactics", WheelMajor_t::MAGIC); // Revelation bonus
return magic;
}
@@ -6413,12 +6413,12 @@ uint16_t Player::getSkillLevel(skills_t skill) const {
skillLevel += m_wheelPlayer->getStat(WheelStat_t::MELEE);
skillLevel += m_wheelPlayer->getMajorStatConditional("Battle Instinct", WheelMajor_t::MELEE);
} else if (skill == SKILL_DISTANCE) {
- skillLevel += m_wheelPlayer->getMajorStatConditional("Positional Tatics", WheelMajor_t::DISTANCE);
+ skillLevel += m_wheelPlayer->getMajorStatConditional("Positional Tactics", WheelMajor_t::DISTANCE);
skillLevel += m_wheelPlayer->getStat(WheelStat_t::DISTANCE);
} else if (skill == SKILL_SHIELD) {
skillLevel += m_wheelPlayer->getMajorStatConditional("Battle Instinct", WheelMajor_t::SHIELD);
} else if (skill == SKILL_MAGLEVEL) {
- skillLevel += m_wheelPlayer->getMajorStatConditional("Positional Tatics", WheelMajor_t::MAGIC);
+ skillLevel += m_wheelPlayer->getMajorStatConditional("Positional Tactics", WheelMajor_t::MAGIC);
skillLevel += m_wheelPlayer->getStat(WheelStat_t::MAGIC);
} else if (skill == SKILL_LIFE_LEECH_AMOUNT) {
skillLevel += m_wheelPlayer->getStat(WheelStat_t::LIFE_LEECH);
@@ -6520,7 +6520,7 @@ void Player::setPerfectShotDamage(uint8_t range, int32_t damage) {
}
int32_t Player::getSpecializedMagicLevel(CombatType_t combat, bool useCharges) const {
- int32_t result = specializedMagicLevel[combatTypeToIndex(combat)];
+ int32_t result = specializedMagicLevel[combatTypeToIndex(combat)] + m_wheelPlayer->getSpecializedMagic(combat);
for (const auto &item : getEquippedItems()) {
const ItemType &itemType = Item::items[item->getID()];
if (!itemType.abilities) {
@@ -8729,10 +8729,6 @@ bool Player::saySpell(SpeakClasses type, const std::string &text, bool isGhostMo
}
tmpPlayer->onCreatureSay(static_self_cast(), type, text);
- if (static_self_cast() != tmpPlayer) {
- g_events().eventCreatureOnHear(tmpPlayer, getPlayer(), text, type);
- g_callbacks().executeCallback(EventCallback_t::creatureOnHear, &EventCallback::creatureOnHear, tmpPlayer, getPlayer(), text, type);
- }
}
return true;
}
@@ -8840,8 +8836,6 @@ void Player::triggerTranscendance() {
}
// Forge system
-// Forge system
-
void Player::forgeFuseItems(ForgeAction_t actionType, uint16_t firstItemId, uint8_t tier, uint16_t secondItemId, bool success, bool reduceTierLoss, bool convergence, uint8_t bonus, uint8_t coreCount) {
if (getFreeBackpackSlots() == 0) {
sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
diff --git a/src/creatures/players/vip/player_vip.cpp b/src/creatures/players/vip/player_vip.cpp
index 195480ca5fd..8a64aebcf85 100644
--- a/src/creatures/players/vip/player_vip.cpp
+++ b/src/creatures/players/vip/player_vip.cpp
@@ -9,6 +9,7 @@
#include "creatures/players/vip/player_vip.hpp"
+#include "account/account.hpp"
#include "creatures/players/grouping/groups.hpp"
#include "creatures/players/player.hpp"
#include "io/iologindata.hpp"
diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp
index 6d3ee2713a7..7d39720dc4d 100644
--- a/src/creatures/players/wheel/player_wheel.cpp
+++ b/src/creatures/players/wheel/player_wheel.cpp
@@ -9,6 +9,8 @@
#include "creatures/players/wheel/player_wheel.hpp"
+#include "map/spectators.hpp"
+#include "creatures/monsters/monster.hpp"
#include "config/configmanager.hpp"
#include "creatures/combat/condition.hpp"
#include "creatures/combat/spells.hpp"
@@ -957,6 +959,45 @@ int PlayerWheel::getSpellAdditionalDuration(const std::string &spellName) const
return 0;
}
+bool PlayerWheel::handleTwinBurstsCooldown(const std::shared_ptr &player, const std::string &spellName, int spellCooldown, int rateCooldown) const {
+ // Map of spell pairs for Twin Bursts
+ static const std::unordered_map spellPairs = {
+ { "Terra Burst", "Ice Burst" },
+ { "Ice Burst", "Terra Burst" }
+ };
+
+ auto it = spellPairs.find(spellName);
+ if (it != spellPairs.end()) {
+ const auto &spell = g_spells().getSpellByName(it->second);
+ if (spell) {
+ const auto spellId = spell->getSpellId();
+ const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, spellId);
+ return player->addCondition(condition);
+ }
+ }
+
+ return false;
+}
+
+bool PlayerWheel::handleBeamMasteryCooldown(const std::shared_ptr &player, const std::string &spellName, int spellCooldown, int rateCooldown) const {
+ static const std::unordered_map spellPairs = {
+ { "Great Death Beam", "Great Energy Beam" },
+ { "Great Energy Beam", "Great Death Beam" }
+ };
+
+ auto it = spellPairs.find(spellName);
+ if (it != spellPairs.end()) {
+ const auto &spell = g_spells().getSpellByName(it->second);
+ if (spell) {
+ const auto spellId = spell->getSpellId();
+ const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, spellId);
+ return player->addCondition(condition);
+ }
+ }
+
+ return false;
+}
+
void PlayerWheel::addPromotionScrolls(NetworkMessage &msg) const {
std::vector unlockedScrolls;
@@ -988,7 +1029,7 @@ std::shared_ptr PlayerWheel::gemsGradeKV(WheelFragmentType_t type, uint8_t p
uint8_t PlayerWheel::getGemGrade(WheelFragmentType_t type, uint8_t pos) const {
uint8_t grade = 0;
- auto gradeKV = gemsGradeKV(type, pos)->get("grade");
+ const auto gradeKV = gemsGradeKV(type, pos)->get("grade");
if (gradeKV.has_value()) {
grade = static_cast(gradeKV->get());
@@ -1190,7 +1231,7 @@ void PlayerWheel::destroyGem(uint16_t index) const {
if (greaterFragments > 0) {
const auto &fragmentsItem = Item::CreateItem(ITEM_GREATER_FRAGMENT, greaterFragments);
- auto returnValue = g_game().internalPlayerAddItem(m_player.getPlayer(), fragmentsItem, false, CONST_SLOT_BACKPACK);
+ auto returnValue = g_game().internalPlayerAddItem(m_player.getPlayer(), fragmentsItem, false, CONST_SLOT_WHEREEVER);
if (returnValue != RETURNVALUE_NOERROR) {
g_logger().error("Failed to add {} greater fragments to player with name {}", greaterFragments, m_player.getName());
m_player.sendCancelMessage(getReturnMessage(RETURNVALUE_CONTACTADMINISTRATOR));
@@ -1201,8 +1242,11 @@ void PlayerWheel::destroyGem(uint16_t index) const {
gem.remove(gemsKV());
- m_player.client->sendResourceBalance(RESOURCE_LESSER_FRAGMENT, m_player.getItemTypeCount(ITEM_LESSER_FRAGMENT));
- m_player.client->sendResourceBalance(RESOURCE_GREATER_FRAGMENT, m_player.getItemTypeCount(ITEM_GREATER_FRAGMENT));
+ const auto totalLesserFragment = m_player.getItemTypeCount(ITEM_LESSER_FRAGMENT) + m_player.getStashItemCount(ITEM_LESSER_FRAGMENT);
+ const auto totalGreaterFragment = m_player.getItemTypeCount(ITEM_GREATER_FRAGMENT) + m_player.getStashItemCount(ITEM_GREATER_FRAGMENT);
+
+ m_player.client->sendResourceBalance(RESOURCE_LESSER_FRAGMENT, totalLesserFragment);
+ m_player.client->sendResourceBalance(RESOURCE_GREATER_FRAGMENT, totalGreaterFragment);
sendOpenWheelWindow(m_player.getID());
}
@@ -1233,7 +1277,7 @@ void PlayerWheel::toggleGemLock(uint16_t index) const {
}
void PlayerWheel::setActiveGem(WheelGemAffinity_t affinity, uint16_t index) const {
- const auto gem = getGem(index);
+ auto gem = getGem(index);
if (gem.uuid.empty()) {
g_logger().error("[{}] Failed to load gem with index {}", __FUNCTION__, index);
return;
@@ -1251,6 +1295,67 @@ void PlayerWheel::removeActiveGem(WheelGemAffinity_t affinity) const {
gemsKV()->scoped("active")->remove(key);
}
+void PlayerWheel::addRevelationBonus(WheelGemAffinity_t affinity, uint16_t points) {
+ m_bonusRevelationPoints[static_cast(affinity)] += points;
+}
+
+void PlayerWheel::resetRevelationBonus() {
+ m_bonusRevelationPoints = { 0, 0, 0, 0 };
+}
+
+void PlayerWheel::addSpellBonus(const std::string &spellName, const WheelSpells::Bonus &bonus) {
+ if (m_spellsBonuses.contains(spellName)) {
+ m_spellsBonuses[spellName].decrease.cooldown += bonus.decrease.cooldown;
+ m_spellsBonuses[spellName].decrease.manaCost += bonus.decrease.manaCost;
+ m_spellsBonuses[spellName].decrease.secondaryGroupCooldown += bonus.decrease.secondaryGroupCooldown;
+ m_spellsBonuses[spellName].increase.aditionalTarget += bonus.increase.aditionalTarget;
+ m_spellsBonuses[spellName].increase.area = bonus.increase.area;
+ m_spellsBonuses[spellName].increase.criticalChance += bonus.increase.criticalChance;
+ m_spellsBonuses[spellName].increase.criticalDamage += bonus.increase.criticalDamage;
+ m_spellsBonuses[spellName].increase.damage += bonus.increase.damage;
+ m_spellsBonuses[spellName].increase.damageReduction += bonus.increase.damageReduction;
+ m_spellsBonuses[spellName].increase.duration += bonus.increase.duration;
+ m_spellsBonuses[spellName].increase.heal += bonus.increase.heal;
+ m_spellsBonuses[spellName].leech.life += bonus.leech.life;
+ m_spellsBonuses[spellName].leech.mana += bonus.leech.mana;
+ return;
+ }
+ m_spellsBonuses[spellName] = bonus;
+}
+
+int32_t PlayerWheel::getSpellBonus(const std::string &spellName, WheelSpellBoost_t boost) const {
+ using enum WheelSpellBoost_t;
+
+ if (!m_spellsBonuses.contains(spellName)) {
+ return 0;
+ }
+ const auto &[leech, increase, decrease] = m_spellsBonuses.at(spellName);
+ switch (boost) {
+ case COOLDOWN:
+ return decrease.cooldown;
+ case MANA:
+ return decrease.manaCost;
+ case SECONDARY_GROUP_COOLDOWN:
+ return decrease.secondaryGroupCooldown;
+ case CRITICAL_CHANCE:
+ return increase.criticalChance;
+ case CRITICAL_DAMAGE:
+ return increase.criticalDamage;
+ case DAMAGE:
+ return increase.damage;
+ case DAMAGE_REDUCTION:
+ return increase.damageReduction;
+ case HEAL:
+ return increase.heal;
+ case LIFE_LEECH:
+ return leech.life;
+ case MANA_LEECH:
+ return leech.mana;
+ default:
+ return 0;
+ }
+}
+
void PlayerWheel::addGems(NetworkMessage &msg) const {
const auto activeGems = getActiveGems();
msg.addByte(activeGems.size());
@@ -1343,7 +1448,7 @@ void PlayerWheel::improveGemGrade(WheelFragmentType_t fragmentType, uint8_t pos)
return;
}
- if (!m_player.hasItemCountById(fragmentId, quantity, false)) {
+ if (!m_player.hasItemCountById(fragmentId, quantity, true)) {
g_logger().error("[{}] Player {} does not have the required {} fragments with id {}", __FUNCTION__, m_player.getName(), quantity, fragmentId);
return;
}
@@ -1353,7 +1458,7 @@ void PlayerWheel::improveGemGrade(WheelFragmentType_t fragmentType, uint8_t pos)
return;
}
- if (!m_player.removeItemCountById(fragmentId, quantity, false)) {
+ if (!m_player.removeItemCountById(fragmentId, quantity, true)) {
g_logger().error("[{}] Failed to remove {} fragments with id {} from player {}", std::source_location::current().function_name(), quantity, fragmentId, m_player.getName());
return;
}
@@ -1414,20 +1519,23 @@ void PlayerWheel::sendOpenWheelWindow(NetworkMessage &msg, uint32_t ownerId) {
addPromotionScrolls(msg);
addGems(msg);
addGradeModifiers(msg);
- // TODO: read items from inventory
+
const auto &voc = m_player.getVocation();
if (!voc) {
g_logger().error("[{}] Failed to get vocation for player {}", __FUNCTION__, m_player.getName());
return;
}
+ const auto totalLesserFragment = m_player.getItemTypeCount(ITEM_LESSER_FRAGMENT) + m_player.getStashItemCount(ITEM_LESSER_FRAGMENT);
+ const auto totalGreaterFragment = m_player.getItemTypeCount(ITEM_GREATER_FRAGMENT) + m_player.getStashItemCount(ITEM_GREATER_FRAGMENT);
+
m_player.client->sendResourceBalance(RESOURCE_BANK, m_player.getBankBalance());
m_player.client->sendResourceBalance(RESOURCE_INVENTORY_MONEY, m_player.getMoney());
m_player.client->sendResourceBalance(RESOURCE_LESSER_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Lesser)));
m_player.client->sendResourceBalance(RESOURCE_REGULAR_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Regular)));
m_player.client->sendResourceBalance(RESOURCE_GREATER_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Greater)));
- m_player.client->sendResourceBalance(RESOURCE_LESSER_FRAGMENT, m_player.getItemTypeCount(ITEM_LESSER_FRAGMENT));
- m_player.client->sendResourceBalance(RESOURCE_GREATER_FRAGMENT, m_player.getItemTypeCount(ITEM_GREATER_FRAGMENT));
+ m_player.client->sendResourceBalance(RESOURCE_LESSER_FRAGMENT, totalLesserFragment);
+ m_player.client->sendResourceBalance(RESOURCE_GREATER_FRAGMENT, totalGreaterFragment);
}
void PlayerWheel::sendGiftOfLifeCooldown() const {
@@ -1569,7 +1677,7 @@ void PlayerWheel::saveSlotPointsOnPressSaveButton(NetworkMessage &msg) {
*/
void PlayerWheel::loadDBPlayerSlotPointsOnLogin() {
auto resultString = fmt::format("SELECT `slot` FROM `player_wheeldata` WHERE `player_id` = {}", m_player.getGUID());
- const DBResult_ptr &result = Database::getInstance().storeQuery(resultString);
+ const DBResult_ptr &result = g_database().storeQuery(resultString);
// Ignore if player not have nothing inserted in the table
if (!result) {
return;
@@ -1590,17 +1698,12 @@ void PlayerWheel::loadDBPlayerSlotPointsOnLogin() {
}
bool PlayerWheel::saveDBPlayerSlotPointsOnLogout() const {
- const Database &db = Database::getInstance();
- std::ostringstream query;
DBInsert insertWheelData("INSERT INTO `player_wheeldata` (`player_id`, `slot`) VALUES ");
insertWheelData.upsert({ "slot" });
PropWriteStream stream;
const auto wheelSlots = getSlots();
for (uint8_t i = 1; i < wheelSlots.size(); ++i) {
auto value = wheelSlots[i];
- if (value == 0) {
- continue;
- }
stream.write(i);
stream.write(value);
@@ -1610,7 +1713,7 @@ bool PlayerWheel::saveDBPlayerSlotPointsOnLogout() const {
size_t attributesSize;
const char* attributes = stream.getStream(attributesSize);
if (attributesSize > 0) {
- query << m_player.getGUID() << ',' << db.escapeBlob(attributes, static_cast(attributesSize));
+ const auto query = fmt::format("{}, {}", m_player.getGUID(), g_database().escapeBlob(attributes, static_cast(attributesSize)));
if (!insertWheelData.addRow(query)) {
g_logger().debug("[{}] failed to insert row data", __FUNCTION__);
return false;
@@ -1819,7 +1922,7 @@ void PlayerWheel::reloadPlayerData() const {
void PlayerWheel::registerPlayerBonusData() {
addStat(WheelStat_t::HEALTH, m_playerBonusData.stats.health);
addStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);
- addStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);
+ addStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity);
addStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);
addStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);
addStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);
@@ -1836,7 +1939,7 @@ void PlayerWheel::registerPlayerBonusData() {
// Instant
setSpellInstant("Battle Instinct", m_playerBonusData.instant.battleInstinct);
setSpellInstant("Battle Healing", m_playerBonusData.instant.battleHealing);
- setSpellInstant("Positional Tatics", m_playerBonusData.instant.positionalTatics);
+ setSpellInstant("Positional Tactics", m_playerBonusData.instant.positionalTactics);
setSpellInstant("Ballistic Mastery", m_playerBonusData.instant.ballisticMastery);
setSpellInstant("Healing Link", m_playerBonusData.instant.healingLink);
setSpellInstant("Runic Mastery", m_playerBonusData.instant.runicMastery);
@@ -1871,14 +1974,13 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.stages.divineEmpowerment; ++i) {
setSpellInstant("Divine Empowerment", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 4 * 1000;
+
if (m_playerBonusData.stages.divineEmpowerment >= 2) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 4000;
addSpellBonus("Divine Empowerment", bonus);
}
if (m_playerBonusData.stages.divineEmpowerment >= 3) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 4000;
addSpellBonus("Divine Empowerment", bonus);
}
} else {
@@ -1891,12 +1993,12 @@ void PlayerWheel::registerPlayerBonusData() {
}
if (m_playerBonusData.stages.divineGrenade >= 2) {
WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 4000;
+ bonus.decrease.cooldown = 4 * 1000;
addSpellBonus("Divine Grenade", bonus);
}
if (m_playerBonusData.stages.divineGrenade >= 3) {
WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 6000;
+ bonus.decrease.cooldown = 6 * 1000;
addSpellBonus("Divine Grenade", bonus);
}
} else {
@@ -1911,9 +2013,21 @@ void PlayerWheel::registerPlayerBonusData() {
setSpellInstant("Drain Body", false);
}
if (m_playerBonusData.stages.beamMastery > 0) {
+ m_beamMasterySpells.emplace("Energy Beam");
+ m_beamMasterySpells.emplace("Great Death Beam");
+ m_beamMasterySpells.emplace("Great Energy Beam");
for (int i = 0; i < m_playerBonusData.stages.beamMastery; ++i) {
setSpellInstant("Beam Mastery", true);
}
+ WheelSpells::Bonus deathBeamBonus;
+ deathBeamBonus.decrease.cooldown = 2 * 1000;
+ deathBeamBonus.increase.damage = 6;
+ if (m_playerBonusData.stages.beamMastery >= 2) {
+ addSpellBonus("Great Death Beam", deathBeamBonus);
+ }
+ if (m_playerBonusData.stages.beamMastery >= 3) {
+ addSpellBonus("Great Death Beam", deathBeamBonus);
+ }
} else {
setSpellInstant("Beam Mastery", false);
}
@@ -1922,6 +2036,17 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.stages.twinBurst; ++i) {
setSpellInstant("Twin Burst", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 4 * 1000;
+ bonus.decrease.secondaryGroupCooldown = 4 * 1000;
+ if (m_playerBonusData.stages.twinBurst >= 2) {
+ addSpellBonus("Ice Burst", bonus);
+ addSpellBonus("Terra Burst", bonus);
+ }
+ if (m_playerBonusData.stages.twinBurst >= 3) {
+ addSpellBonus("Ice Burst", bonus);
+ addSpellBonus("Terra Burst", bonus);
+ }
} else {
setSpellInstant("Twin Burst", false);
}
@@ -1930,6 +2055,14 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.stages.executionersThrow; ++i) {
setSpellInstant("Executioner's Throw", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 4 * 1000;
+ if (m_playerBonusData.stages.executionersThrow >= 2) {
+ addSpellBonus("Executioner's Throw", bonus);
+ }
+ if (m_playerBonusData.stages.executionersThrow >= 3) {
+ addSpellBonus("Executioner's Throw", bonus);
+ }
} else {
setSpellInstant("Executioner's Throw", false);
}
@@ -1939,14 +2072,13 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.avatar.light; ++i) {
setSpellInstant("Avatar of Light", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
+
if (m_playerBonusData.avatar.light >= 2) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Light", bonus);
}
if (m_playerBonusData.avatar.light >= 3) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Light", bonus);
}
} else {
@@ -1957,14 +2089,13 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.avatar.nature; ++i) {
setSpellInstant("Avatar of Nature", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
+
if (m_playerBonusData.avatar.nature >= 2) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Nature", bonus);
}
if (m_playerBonusData.avatar.nature >= 3) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Nature", bonus);
}
} else {
@@ -1975,14 +2106,12 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.avatar.steel; ++i) {
setSpellInstant("Avatar of Steel", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
if (m_playerBonusData.avatar.steel >= 2) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Steel", bonus);
}
if (m_playerBonusData.avatar.steel >= 3) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Steel", bonus);
}
} else {
@@ -1993,14 +2122,12 @@ void PlayerWheel::registerPlayerBonusData() {
for (int i = 0; i < m_playerBonusData.avatar.storm; ++i) {
setSpellInstant("Avatar of Storm", true);
}
+ WheelSpells::Bonus bonus;
+ bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
if (m_playerBonusData.avatar.storm >= 2) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Storm", bonus);
}
if (m_playerBonusData.avatar.storm >= 3) {
- WheelSpells::Bonus bonus;
- bonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes
addSpellBonus("Avatar of Storm", bonus);
}
} else {
@@ -2100,8 +2227,8 @@ void PlayerWheel::printPlayerWheelMethodsBonusData(const PlayerWheelMethodsBonus
if (bonusData.instant.battleHealing) {
g_logger().debug(" battleHealing: {}", bonusData.instant.battleHealing);
}
- if (bonusData.instant.positionalTatics) {
- g_logger().debug(" positionalTatics: {}", bonusData.instant.positionalTatics);
+ if (bonusData.instant.positionalTactics) {
+ g_logger().debug(" positionalTactics: {}", bonusData.instant.positionalTactics);
}
if (bonusData.instant.ballisticMastery) {
g_logger().debug(" ballisticMastery: {}", bonusData.instant.ballisticMastery);
@@ -2167,10 +2294,10 @@ void PlayerWheel::printPlayerWheelMethodsBonusData(const PlayerWheelMethodsBonus
g_logger().debug("mitigation: {}", bonusData.mitigation);
}
- auto &spellsVector = bonusData.spells;
+ const auto &spellsVector = bonusData.spells;
if (!spellsVector.empty()) {
g_logger().debug("Spells:");
- for (const auto &spell : bonusData.spells) {
+ for (const auto &spell : spellsVector) {
g_logger().debug(" {}", spell);
}
}
@@ -2180,7 +2307,7 @@ void PlayerWheel::printPlayerWheelMethodsBonusData(const PlayerWheelMethodsBonus
void PlayerWheel::loadDedicationAndConvictionPerks() {
using VocationBonusFunction = std::function &, uint16_t, uint8_t, PlayerWheelMethodsBonusData &)>;
- auto wheelFunctions = g_game().getIOWheel()->getWheelMapFunctions();
+ const auto &wheelFunctions = g_game().getIOWheel()->getWheelMapFunctions();
const auto vocationCipId = m_player.getPlayerVocationEnum();
if (vocationCipId < VOCATION_KNIGHT_CIP || vocationCipId > VOCATION_DRUID_CIP) {
return;
@@ -2245,7 +2372,7 @@ void PlayerWheel::processActiveGems() {
if (count >= 3 && quality >= WheelGemQuality_t::Greater) {
uint8_t grade = getGemGrade(WheelFragmentType_t::Greater, static_cast(supremeModifier));
std::string modifierName(magic_enum::enum_name(supremeModifier));
- g_logger().info("[{}] Adding supreme modifier {} to player {} from {} gem affinity {}", __FUNCTION__, modifierName, playerName, magic_enum::enum_name(quality), magic_enum::enum_name(affinity));
+ g_logger().debug("[{}] Adding supreme modifier {} to player {} from {} gem affinity {}", __FUNCTION__, modifierName, playerName, magic_enum::enum_name(quality), magic_enum::enum_name(affinity));
m_modifierContext->addStrategies(supremeModifier, grade);
}
}
@@ -2267,7 +2394,7 @@ void PlayerWheel::applyStageBonusForColor(const std::string &color) {
return;
}
- auto [statsDamage, statsHealing] = g_game().getIOWheel()->getRevelationStatByStage(stageEnum);
+ const auto &[statsDamage, statsHealing] = g_game().getIOWheel()->getRevelationStatByStage(stageEnum);
m_playerBonusData.stats.damage += statsDamage;
m_playerBonusData.stats.healing += statsHealing;
@@ -2345,7 +2472,6 @@ void PlayerWheel::applyBlueStageBonus(uint8_t stageValue, Vocation_t vocationEnu
} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {
m_playerBonusData.stages.twinBurst = stageValue;
for (uint8_t i = 1; i <= stageValue; ++i) {
- addSpellToVector("Twin Burst");
addSpellToVector("Terra Burst");
addSpellToVector("Ice Burst");
}
@@ -2429,7 +2555,7 @@ WheelStageEnum_t PlayerWheel::getPlayerSliceStage(const std::string &color) cons
const auto modsSupremeIt = modsSupremePositionByVocation.find(vocationBaseId);
if (modsSupremeIt != modsSupremePositionByVocation.end()) {
- for (auto modPosition : modsSupremeIt->second.get()) {
+ for (const auto &modPosition : modsSupremeIt->second.get()) {
const auto pos = static_cast(modPosition);
uint8_t grade = 0;
auto gradeKV = gemsGradeKV(WheelFragmentType_t::Greater, pos)->get("grade");
@@ -2465,7 +2591,7 @@ void PlayerWheel::checkAbilities() {
if (getInstant("Battle Instinct") && getOnThinkTimer(WheelOnThink_t::BATTLE_INSTINCT) < OTSYS_TIME() && checkBattleInstinct()) {
reloadClient = true;
}
- if (getInstant("Positional Tatics") && getOnThinkTimer(WheelOnThink_t::POSITIONAL_TATICS) < OTSYS_TIME() && checkPositionalTatics()) {
+ if (getInstant("Positional Tactics") && getOnThinkTimer(WheelOnThink_t::POSITIONAL_TACTICS) < OTSYS_TIME() && checkPositionalTactics()) {
reloadClient = true;
}
if (getInstant("Ballistic Mastery") && getOnThinkTimer(WheelOnThink_t::BALLISTIC_MASTERY) < OTSYS_TIME() && checkBallisticMastery()) {
@@ -2482,35 +2608,7 @@ bool PlayerWheel::checkBattleInstinct() {
setOnThinkTimer(WheelOnThink_t::BATTLE_INSTINCT, OTSYS_TIME() + 2000);
bool updateClient = false;
m_creaturesNearby = 0;
- uint16_t creaturesNearby = 0;
- for (int offsetX = -1; offsetX <= 1; offsetX++) {
- if (creaturesNearby >= 8) {
- break;
- }
- for (int offsetY = -1; offsetY <= 1; offsetY++) {
- if (creaturesNearby >= 8) {
- break;
- }
-
- const auto playerPositionOffSet = Position(
- m_player.getPosition().x + offsetX,
- m_player.getPosition().y + offsetY,
- m_player.getPosition().z
- );
- const auto &tile = g_game().map.getTile(playerPositionOffSet);
- if (!tile) {
- continue;
- }
-
- const auto &creature = tile->getTopVisibleCreature(m_player.getPlayer());
- if (!creature || creature == m_player.getPlayer() || (creature->getMaster() && creature->getMaster()->getPlayer() == m_player.getPlayer())) {
- continue;
- }
-
- creaturesNearby++;
- }
- }
-
+ uint16_t creaturesNearby = Spectators().find(m_player.getPosition(), false, 1, 1, 1, 1).excludePlayerMaster().size();
if (creaturesNearby >= 5) {
m_creaturesNearby = creaturesNearby;
creaturesNearby -= 4;
@@ -2530,36 +2628,13 @@ bool PlayerWheel::checkBattleInstinct() {
return updateClient;
}
-bool PlayerWheel::checkPositionalTatics() {
- setOnThinkTimer(WheelOnThink_t::POSITIONAL_TATICS, OTSYS_TIME() + 2000);
+bool PlayerWheel::checkPositionalTactics() {
+ setOnThinkTimer(WheelOnThink_t::POSITIONAL_TACTICS, OTSYS_TIME() + 2000);
m_creaturesNearby = 0;
bool updateClient = false;
- uint16_t creaturesNearby = 0;
- for (int offsetX = -1; offsetX <= 1; offsetX++) {
- if (creaturesNearby > 0) {
- break;
- }
- for (int offsetY = -1; offsetY <= 1; offsetY++) {
- const auto playerPositionOffSet = Position(
- m_player.getPosition().x + offsetX,
- m_player.getPosition().y + offsetY,
- m_player.getPosition().z
- );
- const auto &tile = g_game().map.getTile(playerPositionOffSet);
- if (!tile) {
- continue;
- }
-
- const auto &creature = tile->getTopVisibleCreature(m_player.getPlayer());
- if (!creature || creature == m_player.getPlayer() || !creature->getMonster() || (creature->getMaster() && creature->getMaster()->getPlayer())) {
- continue;
- }
-
- creaturesNearby++;
- break;
- }
- }
- constexpr uint16_t magicSkill = 3;
+ uint16_t creaturesNearby = Spectators().find(m_player.getPosition(), false, 1, 1, 1, 1).excludePlayerMaster().size();
+ constexpr uint16_t holyMagicSkill = 3;
+ constexpr uint16_t healingMagicSkill = 3;
constexpr uint16_t distanceSkill = 3;
if (creaturesNearby == 0) {
m_creaturesNearby = creaturesNearby;
@@ -2567,8 +2642,12 @@ bool PlayerWheel::checkPositionalTatics() {
setMajorStat(WheelMajor_t::DISTANCE, distanceSkill);
updateClient = true;
}
- if (getMajorStat(WheelMajor_t::MAGIC) != 0) {
- setMajorStat(WheelMajor_t::MAGIC, 0);
+ if (getSpecializedMagic(COMBAT_HOLYDAMAGE) != 0) {
+ setSpecializedMagic(COMBAT_HOLYDAMAGE, 0);
+ updateClient = true;
+ }
+ if (getSpecializedMagic(COMBAT_HEALING) != 0) {
+ setSpecializedMagic(COMBAT_HEALING, 0);
updateClient = true;
}
} else {
@@ -2576,8 +2655,12 @@ bool PlayerWheel::checkPositionalTatics() {
setMajorStat(WheelMajor_t::DISTANCE, 0);
updateClient = true;
}
- if (getMajorStat(WheelMajor_t::MAGIC) != magicSkill) {
- setMajorStat(WheelMajor_t::MAGIC, magicSkill);
+ if (getSpecializedMagic(COMBAT_HOLYDAMAGE) != holyMagicSkill) {
+ setSpecializedMagic(COMBAT_HOLYDAMAGE, holyMagicSkill);
+ updateClient = true;
+ }
+ if (getSpecializedMagic(COMBAT_HEALING) != healingMagicSkill) {
+ setSpecializedMagic(COMBAT_HEALING, healingMagicSkill);
updateClient = true;
}
}
@@ -2954,7 +3037,7 @@ void PlayerWheel::onThink(bool force /* = false*/) {
if (getGiftOfCooldown() > 0 /*getInstant("Gift of Life")*/ && getOnThinkTimer(WheelOnThink_t::GIFT_OF_LIFE) <= OTSYS_TIME()) {
decreaseGiftOfCooldown(1);
}
- if (!m_player.hasCondition(CONDITION_INFIGHT) || m_player.getZoneType() == ZONE_PROTECTION || (!getInstant("Battle Instinct") && !getInstant("Positional Tatics") && !getInstant("Ballistic Mastery") && !getInstant("Gift of Life") && !getInstant("Combat Mastery") && !getInstant("Divine Empowerment") && getGiftOfCooldown() == 0)) {
+ if (!m_player.hasCondition(CONDITION_INFIGHT) || m_player.getZoneType() == ZONE_PROTECTION || (!getInstant("Battle Instinct") && !getInstant("Positional Tactics") && !getInstant("Ballistic Mastery") && !getInstant("Gift of Life") && !getInstant("Combat Mastery") && !getInstant("Divine Empowerment") && getGiftOfCooldown() == 0)) {
bool mustReset = false;
for (int i = 0; i < static_cast(WheelMajor_t::TOTAL_COUNT); i++) {
if (getMajorStat(static_cast(i)) != 0) {
@@ -2979,8 +3062,8 @@ void PlayerWheel::onThink(bool force /* = false*/) {
if (getInstant("Battle Instinct") && (force || getOnThinkTimer(WheelOnThink_t::BATTLE_INSTINCT) < OTSYS_TIME()) && checkBattleInstinct()) {
updateClient = true;
}
- // Positional Tatics
- if (getInstant("Positional Tatics") && (force || getOnThinkTimer(WheelOnThink_t::POSITIONAL_TATICS) < OTSYS_TIME()) && checkPositionalTatics()) {
+ // Positional Tactics
+ if (getInstant("Positional Tactics") && (force || getOnThinkTimer(WheelOnThink_t::POSITIONAL_TACTICS) < OTSYS_TIME()) && checkPositionalTactics()) {
updateClient = true;
}
// Ballistic Mastery
@@ -3003,12 +3086,33 @@ void PlayerWheel::onThink(bool force /* = false*/) {
void PlayerWheel::reduceAllSpellsCooldownTimer(int32_t value) const {
for (const auto &condition : m_player.getConditionsByType(CONDITION_SPELLCOOLDOWN)) {
- if (condition->getTicks() <= value) {
- m_player.sendSpellCooldown(condition->getSubId(), 0);
- condition->endCondition(m_player.getPlayer());
- } else {
- condition->setTicks(condition->getTicks() - value);
- m_player.sendSpellCooldown(condition->getSubId(), condition->getTicks());
+ const auto spellId = condition->getSubId();
+ const auto &spell = g_spells().getInstantSpellById(spellId);
+ if (!spell) {
+ continue;
+ }
+
+ const auto spellSecondaryGroup = spell->getSecondaryGroup();
+ const auto &secondCondition = m_player.getCondition(CONDITION_SPELLGROUPCOOLDOWN, CONDITIONID_DEFAULT, spellSecondaryGroup);
+
+ if (secondCondition) {
+ if (secondCondition->getTicks() <= value) {
+ m_player.sendSpellGroupCooldown(spellSecondaryGroup, 0);
+ secondCondition->endCondition(m_player.getPlayer());
+ } else {
+ secondCondition->setTicks(secondCondition->getTicks() - value);
+ m_player.sendSpellGroupCooldown(spellSecondaryGroup, secondCondition->getTicks());
+ }
+ }
+
+ if (condition) {
+ if (condition->getTicks() <= value) {
+ m_player.sendSpellCooldown(spellId, 0);
+ condition->endCondition(m_player.getPlayer());
+ } else {
+ condition->setTicks(condition->getTicks() - value);
+ m_player.sendSpellCooldown(spellId, condition->getTicks());
+ }
}
}
}
@@ -3022,6 +3126,7 @@ void PlayerWheel::resetUpgradedSpells() {
m_creaturesNearby = 0;
m_spellsSelected.clear();
m_learnedSpellsSelected.clear();
+ m_beamMasterySpells.clear();
for (int i = 0; i < static_cast(WheelMajor_t::TOTAL_COUNT); i++) {
setMajorStat(static_cast(i), 0);
}
@@ -3087,17 +3192,15 @@ std::shared_ptr PlayerWheel::getCombatDataSpell(CombatDamage &damage) {
damage.lifeLeechChance += spell->getWheelOfDestinyBoost(WheelSpellBoost_t::LIFE_LEECH_CHANCE, spellGrade);
}
- if (m_spellsBonuses.contains(spellName)) {
- damage.criticalDamage += (getSpellBonus(spellName, WheelSpellBoost_t::CRITICAL_DAMAGE) * 100);
- damage.criticalChance += getSpellBonus(spellName, WheelSpellBoost_t::CRITICAL_CHANCE);
- damage.damageMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::DAMAGE);
- damage.damageReductionMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::DAMAGE_REDUCTION);
- damage.healingMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::HEAL);
- damage.manaLeech += getSpellBonus(spellName, WheelSpellBoost_t::MANA_LEECH);
- damage.manaLeechChance += getSpellBonus(spellName, WheelSpellBoost_t::MANA_LEECH_CHANCE);
- damage.lifeLeech += getSpellBonus(spellName, WheelSpellBoost_t::LIFE_LEECH);
- damage.lifeLeechChance += getSpellBonus(spellName, WheelSpellBoost_t::LIFE_LEECH_CHANCE);
- }
+ damage.criticalDamage += (getSpellBonus(spellName, WheelSpellBoost_t::CRITICAL_DAMAGE) * 100);
+ damage.criticalChance += getSpellBonus(spellName, WheelSpellBoost_t::CRITICAL_CHANCE);
+ damage.damageMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::DAMAGE);
+ damage.damageReductionMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::DAMAGE_REDUCTION);
+ damage.healingMultiplier += getSpellBonus(spellName, WheelSpellBoost_t::HEAL);
+ damage.manaLeech += getSpellBonus(spellName, WheelSpellBoost_t::MANA_LEECH);
+ damage.manaLeechChance += getSpellBonus(spellName, WheelSpellBoost_t::MANA_LEECH_CHANCE);
+ damage.lifeLeech += getSpellBonus(spellName, WheelSpellBoost_t::LIFE_LEECH);
+ damage.lifeLeechChance += getSpellBonus(spellName, WheelSpellBoost_t::LIFE_LEECH_CHANCE);
}
return spell;
@@ -3131,6 +3234,15 @@ void PlayerWheel::setMajorStat(WheelMajor_t type, int32_t value) {
}
}
+void PlayerWheel::setSpecializedMagic(CombatType_t type, int32_t value) {
+ auto enumValue = static_cast(type);
+ try {
+ m_specializedMagic.at(enumValue) = value;
+ } catch (const std::out_of_range &e) {
+ g_logger().error("[{}]. Type {} is out of range, value {}. Error message: {}", __FUNCTION__, enumValue, value, e.what());
+ }
+}
+
void PlayerWheel::setInstant(WheelInstant_t type, bool toggle) {
auto enumValue = static_cast(type);
try {
@@ -3167,9 +3279,9 @@ void PlayerWheel::setSpellInstant(const std::string &name, bool value) {
}
} else if (name == "Battle Healing") {
setInstant(WheelInstant_t::BATTLE_HEALING, value);
- } else if (name == "Positional Tatics") {
- setInstant(WheelInstant_t::POSITIONAL_TATICS, value);
- if (!getInstant(WheelInstant_t::POSITIONAL_TATICS)) {
+ } else if (name == "Positional Tactics") {
+ setInstant(WheelInstant_t::POSITIONAL_TACTICS, value);
+ if (!getInstant(WheelInstant_t::POSITIONAL_TACTICS)) {
setMajorStat(WheelMajor_t::MAGIC, 0);
setMajorStat(WheelMajor_t::HOLY_RESISTANCE, 0);
}
@@ -3296,65 +3408,38 @@ bool PlayerWheel::getInstant(WheelInstant_t type) const {
uint8_t PlayerWheel::getStage(std::string_view name) const {
using enum WheelInstant_t;
using enum WheelStage_t;
- if (name == "Battle Instinct") {
- return PlayerWheel::getInstant(BATTLE_INSTINCT);
- }
- if (name == "Battle Healing") {
- return PlayerWheel::getInstant(BATTLE_HEALING);
- }
- if (name == "Positional Tatics") {
- return PlayerWheel::getInstant(POSITIONAL_TATICS);
- }
- if (name == "Ballistic Mastery") {
- return PlayerWheel::getInstant(BALLISTIC_MASTERY);
- }
- if (name == "Healing Link") {
- return PlayerWheel::getInstant(HEALING_LINK);
- }
- if (name == "Runic Mastery") {
- return PlayerWheel::getInstant(RUNIC_MASTERY);
- }
- if (name == "Focus Mastery") {
- return PlayerWheel::getInstant(FOCUS_MASTERY);
- }
- if (name == "Beam Mastery") {
- return PlayerWheel::getStage(BEAM_MASTERY);
- }
- if (name == "Combat Mastery") {
- return PlayerWheel::getStage(COMBAT_MASTERY);
- }
- if (name == "Gift of Life") {
- return PlayerWheel::getStage(GIFT_OF_LIFE);
- }
- if (name == "Blessing of the Grove") {
- return PlayerWheel::getStage(BLESSING_OF_THE_GROVE);
- }
- if (name == "Drain Body") {
- return PlayerWheel::getStage(DRAIN_BODY);
- }
- if (name == "Divine Empowerment") {
- return PlayerWheel::getStage(DIVINE_EMPOWERMENT);
- }
- if (name == "Divine Grenade") {
- return PlayerWheel::getStage(DIVINE_GRENADE);
- }
- if (name == "Twin Burst") {
- return PlayerWheel::getStage(TWIN_BURST);
- }
- if (name == "Executioner's Throw") {
- return PlayerWheel::getStage(EXECUTIONERS_THROW);
- }
- if (name == "Avatar of Light") {
- return PlayerWheel::getStage(AVATAR_OF_LIGHT);
- }
- if (name == "Avatar of Nature") {
- return PlayerWheel::getStage(AVATAR_OF_NATURE);
- }
- if (name == "Avatar of Steel") {
- return PlayerWheel::getStage(AVATAR_OF_STEEL);
+
+ static const std::unordered_map instantMapping = {
+ { "Battle Instinct", BATTLE_INSTINCT },
+ { "Battle Healing", BATTLE_HEALING },
+ { "Positional Tatics", POSITIONAL_TACTICS },
+ { "Ballistic Mastery", BALLISTIC_MASTERY },
+ { "Healing Link", HEALING_LINK },
+ { "Runic Mastery", RUNIC_MASTERY },
+ { "Focus Mastery", FOCUS_MASTERY }
+ };
+
+ static const std::unordered_map stageMapping = {
+ { "Beam Mastery", BEAM_MASTERY },
+ { "Combat Mastery", COMBAT_MASTERY },
+ { "Gift of Life", GIFT_OF_LIFE },
+ { "Blessing of the Grove", BLESSING_OF_THE_GROVE },
+ { "Drain Body", DRAIN_BODY },
+ { "Divine Empowerment", DIVINE_EMPOWERMENT },
+ { "Divine Grenade", DIVINE_GRENADE },
+ { "Twin Burst", TWIN_BURST },
+ { "Executioner's Throw", EXECUTIONERS_THROW },
+ { "Avatar of Light", AVATAR_OF_LIGHT },
+ { "Avatar of Nature", AVATAR_OF_NATURE },
+ { "Avatar of Steel", AVATAR_OF_STEEL },
+ { "Avatar of Storm", AVATAR_OF_STORM }
+ };
+
+ if (auto it = instantMapping.find(name); it != instantMapping.end()) {
+ return PlayerWheel::getInstant(it->second);
}
- if (name == "Avatar of Storm") {
- return PlayerWheel::getStage(AVATAR_OF_STORM);
+ if (auto it = stageMapping.find(name); it != stageMapping.end()) {
+ return PlayerWheel::getStage(it->second);
}
return false;
@@ -3380,6 +3465,16 @@ int32_t PlayerWheel::getMajorStat(WheelMajor_t type) const {
return 0;
}
+int32_t PlayerWheel::getSpecializedMagic(CombatType_t type) const {
+ auto enumValue = static_cast(type);
+ try {
+ return m_specializedMagic.at(enumValue);
+ } catch (const std::out_of_range &e) {
+ g_logger().error("[{}]. Instant type {}. Error message: {}", __FUNCTION__, enumValue, e.what());
+ }
+ return 0;
+}
+
int32_t PlayerWheel::getStat(WheelStat_t type) const {
auto enumValue = static_cast(type);
try {
@@ -3440,65 +3535,39 @@ int64_t PlayerWheel::getOnThinkTimer(WheelOnThink_t type) const {
bool PlayerWheel::getInstant(std::string_view name) const {
using enum WheelInstant_t;
- if (name == "Battle Instinct") {
- return PlayerWheel::getInstant(BATTLE_INSTINCT);
- }
- if (name == "Battle Healing") {
- return PlayerWheel::getInstant(BATTLE_HEALING);
- }
- if (name == "Positional Tatics") {
- return PlayerWheel::getInstant(POSITIONAL_TATICS);
- }
- if (name == "Ballistic Mastery") {
- return PlayerWheel::getInstant(BALLISTIC_MASTERY);
- }
- if (name == "Healing Link") {
- return PlayerWheel::getInstant(HEALING_LINK);
- }
- if (name == "Runic Mastery") {
- return PlayerWheel::getInstant(RUNIC_MASTERY);
- }
- if (name == "Focus Mastery") {
- return PlayerWheel::getInstant(FOCUS_MASTERY);
- }
- if (name == "Beam Mastery") {
- return PlayerWheel::getStage(WheelStage_t::BEAM_MASTERY);
- }
- if (name == "Combat Mastery") {
- return PlayerWheel::getStage(WheelStage_t::COMBAT_MASTERY);
- }
- if (name == "Gift of Life") {
- return PlayerWheel::getStage(WheelStage_t::GIFT_OF_LIFE);
- }
- if (name == "Blessing of the Grove") {
- return PlayerWheel::getStage(WheelStage_t::BLESSING_OF_THE_GROVE);
- }
- if (name == "Drain Body") {
- return PlayerWheel::getStage(WheelStage_t::DRAIN_BODY);
- }
- if (name == "Divine Empowerment") {
- return PlayerWheel::getStage(WheelStage_t::DIVINE_EMPOWERMENT);
- }
- if (name == "Divine Grenade") {
- return PlayerWheel::getStage(WheelStage_t::DIVINE_GRENADE);
- }
- if (name == "Twin Burst") {
- return PlayerWheel::getStage(WheelStage_t::TWIN_BURST);
- }
- if (name == "Executioner's Throw") {
- return PlayerWheel::getStage(WheelStage_t::EXECUTIONERS_THROW);
- }
- if (name == "Avatar of Light") {
- return PlayerWheel::getStage(WheelStage_t::AVATAR_OF_LIGHT);
- }
- if (name == "Avatar of Nature") {
- return PlayerWheel::getStage(WheelStage_t::AVATAR_OF_NATURE);
- }
- if (name == "Avatar of Steel") {
- return PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STEEL);
+ using enum WheelStage_t;
+
+ static const std::unordered_map instantMapping = {
+ { "Battle Instinct", BATTLE_INSTINCT },
+ { "Battle Healing", BATTLE_HEALING },
+ { "Positional Tactics", POSITIONAL_TACTICS },
+ { "Ballistic Mastery", BALLISTIC_MASTERY },
+ { "Healing Link", HEALING_LINK },
+ { "Runic Mastery", RUNIC_MASTERY },
+ { "Focus Mastery", FOCUS_MASTERY }
+ };
+
+ static const std::unordered_map stageMapping = {
+ { "Beam Mastery", BEAM_MASTERY },
+ { "Combat Mastery", COMBAT_MASTERY },
+ { "Gift of Life", GIFT_OF_LIFE },
+ { "Blessing of the Grove", BLESSING_OF_THE_GROVE },
+ { "Drain Body", DRAIN_BODY },
+ { "Divine Empowerment", DIVINE_EMPOWERMENT },
+ { "Divine Grenade", DIVINE_GRENADE },
+ { "Twin Burst", TWIN_BURST },
+ { "Executioner's Throw", EXECUTIONERS_THROW },
+ { "Avatar of Light", AVATAR_OF_LIGHT },
+ { "Avatar of Nature", AVATAR_OF_NATURE },
+ { "Avatar of Steel", AVATAR_OF_STEEL },
+ { "Avatar of Storm", AVATAR_OF_STORM }
+ };
+
+ if (auto it = instantMapping.find(name); it != instantMapping.end()) {
+ return PlayerWheel::getInstant(it->second);
}
- if (name == "Avatar of Storm") {
- return PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STORM);
+ if (auto it = stageMapping.find(name); it != stageMapping.end()) {
+ return PlayerWheel::getStage(it->second);
}
return false;
@@ -3599,7 +3668,7 @@ void PlayerWheel::setWheelBonusData(const PlayerWheelMethodsBonusData &newBonusD
// Functions used to Manage Combat
uint8_t PlayerWheel::getBeamAffectedTotal(const CombatDamage &tmpDamage) const {
uint8_t beamAffectedTotal = 0; // Removed const
- if (tmpDamage.runeSpellName == "Beam Mastery" && getInstant("Beam Mastery")) {
+ if (m_beamMasterySpells.contains(tmpDamage.instantSpellName) && getInstant("Beam Mastery")) {
beamAffectedTotal = 3;
}
return beamAffectedTotal;
@@ -3608,6 +3677,7 @@ uint8_t PlayerWheel::getBeamAffectedTotal(const CombatDamage &tmpDamage) const {
void PlayerWheel::updateBeamMasteryDamage(CombatDamage &tmpDamage, uint8_t &beamAffectedTotal, uint8_t &beamAffectedCurrent) const {
if (beamAffectedTotal > 0) {
tmpDamage.damageMultiplier += checkBeamMasteryDamage();
+ reduceAllSpellsCooldownTimer(1000); // Reduces all spell cooldown by 1 second per target hit (max 3 seconds)
--beamAffectedTotal;
beamAffectedCurrent++;
}
diff --git a/src/creatures/players/wheel/player_wheel.hpp b/src/creatures/players/wheel/player_wheel.hpp
index 840cc72d8dc..7c3bd2348a6 100644
--- a/src/creatures/players/wheel/player_wheel.hpp
+++ b/src/creatures/players/wheel/player_wheel.hpp
@@ -107,6 +107,9 @@ class PlayerWheel {
int getSpellAdditionalDuration(const std::string &spellName) const;
bool getSpellAdditionalArea(const std::string &spellName) const;
+ bool handleTwinBurstsCooldown(const std::shared_ptr &player, const std::string &spellName, int spellCooldown, int rateCooldown) const;
+ bool handleBeamMasteryCooldown(const std::shared_ptr &player, const std::string &spellName, int spellCooldown, int rateCooldown) const;
+
/*
* Functions for manage slots
*/
@@ -209,7 +212,7 @@ class PlayerWheel {
void checkAbilities();
void checkGiftOfLife();
bool checkBattleInstinct();
- bool checkPositionalTatics();
+ bool checkPositionalTactics();
bool checkBallisticMastery();
bool checkCombatMastery();
bool checkDivineEmpowerment();
@@ -260,6 +263,16 @@ class PlayerWheel {
*/
void setMajorStat(WheelMajor_t type, int32_t value);
+ /**
+ * @brief Sets the value of a specific specialized magic in the Wheel of Destiny.
+ *
+ * This function sets the value of the specified specialized magic in the Wheel of Destiny to the provided value.
+ *
+ * @param type The type of the combat to set the specialized magic.
+ * @param value The value to set for the specialized magic.
+ */
+ void setSpecializedMagic(CombatType_t type, int32_t value);
+
/**
* @brief Sets the value of a specific instant in the Wheel of Destiny.
*
@@ -310,6 +323,7 @@ class PlayerWheel {
uint8_t getStage(WheelStage_t type) const;
WheelSpellGrade_t getSpellUpgrade(const std::string &name) const;
int32_t getMajorStat(WheelMajor_t type) const;
+ int32_t getSpecializedMagic(CombatType_t type) const;
int32_t getStat(WheelStat_t type) const;
int32_t getResistance(CombatType_t type) const;
int32_t getMajorStatConditional(const std::string &instant, WheelMajor_t major) const;
@@ -379,63 +393,11 @@ class PlayerWheel {
void toggleGemLock(uint16_t index) const;
void setActiveGem(WheelGemAffinity_t affinity, uint16_t index) const;
void removeActiveGem(WheelGemAffinity_t affinity) const;
- void addRevelationBonus(WheelGemAffinity_t affinity, uint16_t points) {
- m_bonusRevelationPoints[static_cast(affinity)] += points;
- }
- void resetRevelationBonus() {
- m_bonusRevelationPoints = { 0, 0, 0, 0 };
- }
-
- void addSpellBonus(const std::string &spellName, const WheelSpells::Bonus &bonus) {
- if (m_spellsBonuses.contains(spellName)) {
- m_spellsBonuses[spellName].decrease.cooldown += bonus.decrease.cooldown;
- m_spellsBonuses[spellName].decrease.manaCost += bonus.decrease.manaCost;
- m_spellsBonuses[spellName].decrease.secondaryGroupCooldown += bonus.decrease.secondaryGroupCooldown;
- m_spellsBonuses[spellName].increase.aditionalTarget += bonus.increase.aditionalTarget;
- m_spellsBonuses[spellName].increase.area = bonus.increase.area;
- m_spellsBonuses[spellName].increase.criticalChance += bonus.increase.criticalChance;
- m_spellsBonuses[spellName].increase.criticalDamage += bonus.increase.criticalDamage;
- m_spellsBonuses[spellName].increase.damage += bonus.increase.damage;
- m_spellsBonuses[spellName].increase.damageReduction += bonus.increase.damageReduction;
- m_spellsBonuses[spellName].increase.duration += bonus.increase.duration;
- m_spellsBonuses[spellName].increase.heal += bonus.increase.heal;
- m_spellsBonuses[spellName].leech.life += bonus.leech.life;
- m_spellsBonuses[spellName].leech.mana += bonus.leech.mana;
- return;
- }
- m_spellsBonuses[spellName] = bonus;
- }
-
- int32_t getSpellBonus(const std::string &spellName, WheelSpellBoost_t boost) const {
- if (!m_spellsBonuses.contains(spellName)) {
- return 0;
- }
- auto [leech, increase, decrease] = m_spellsBonuses.at(spellName);
- switch (boost) {
- case WheelSpellBoost_t::COOLDOWN:
- return decrease.cooldown;
- case WheelSpellBoost_t::MANA:
- return decrease.manaCost;
- case WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN:
- return decrease.secondaryGroupCooldown;
- case WheelSpellBoost_t::CRITICAL_CHANCE:
- return increase.criticalChance;
- case WheelSpellBoost_t::CRITICAL_DAMAGE:
- return increase.criticalDamage;
- case WheelSpellBoost_t::DAMAGE:
- return increase.damage;
- case WheelSpellBoost_t::DAMAGE_REDUCTION:
- return increase.damageReduction;
- case WheelSpellBoost_t::HEAL:
- return increase.heal;
- case WheelSpellBoost_t::LIFE_LEECH:
- return leech.life;
- case WheelSpellBoost_t::MANA_LEECH:
- return leech.mana;
- default:
- return 0;
- }
- }
+ void addRevelationBonus(WheelGemAffinity_t affinity, uint16_t points);
+ void resetRevelationBonus();
+ void addSpellBonus(const std::string &spellName, const WheelSpells::Bonus &bonus);
+
+ int32_t getSpellBonus(const std::string &spellName, WheelSpellBoost_t boost) const;
WheelGemBasicModifier_t selectBasicModifier2(WheelGemBasicModifier_t modifier1) const;
@@ -465,9 +427,11 @@ class PlayerWheel {
std::array(WheelMajor_t::TOTAL_COUNT)> m_majorStats = { 0 };
std::array(WheelInstant_t::INSTANT_COUNT)> m_instant = { false };
std::array m_resistance = { 0 };
+ std::array m_specializedMagic = { 0 };
int32_t m_creaturesNearby = 0;
std::map m_spellsSelected;
std::vector m_learnedSpellsSelected;
std::unordered_map m_spellsBonuses;
+ std::unordered_set m_beamMasterySpells;
};
diff --git a/src/creatures/players/wheel/wheel_definitions.hpp b/src/creatures/players/wheel/wheel_definitions.hpp
index 0aa22c5a7b9..a136bd620d3 100644
--- a/src/creatures/players/wheel/wheel_definitions.hpp
+++ b/src/creatures/players/wheel/wheel_definitions.hpp
@@ -97,7 +97,7 @@ enum class WheelStage_t : uint8_t {
enum class WheelOnThink_t : uint8_t {
BATTLE_INSTINCT = 0,
- POSITIONAL_TATICS = 1,
+ POSITIONAL_TACTICS = 1,
BALLISTIC_MASTERY = 2,
COMBAT_MASTERY = 3,
FOCUS_MASTERY = 4,
@@ -148,7 +148,7 @@ enum class WheelMajor_t : uint8_t {
enum class WheelInstant_t : uint8_t {
BATTLE_INSTINCT = 0,
BATTLE_HEALING = 1,
- POSITIONAL_TATICS = 2,
+ POSITIONAL_TACTICS = 2,
BALLISTIC_MASTERY = 3,
HEALING_LINK = 4,
RUNIC_MASTERY = 5,
@@ -217,7 +217,7 @@ struct PlayerWheelMethodsBonusData {
struct Instant {
bool battleInstinct = false; // Knight
bool battleHealing = false; // Knight
- bool positionalTatics = false; // Paladin
+ bool positionalTactics = false; // Paladin
bool ballisticMastery = false; // Paladin
bool healingLink = false; // Druid
bool runicMastery = false; // Druid/sorcerer
@@ -282,7 +282,7 @@ namespace WheelSpells {
struct Decrease {
int cooldown = 0;
int manaCost = 0;
- uint8_t secondaryGroupCooldown = 0;
+ int secondaryGroupCooldown = 0;
};
struct Leech {
diff --git a/src/creatures/players/wheel/wheel_gems.cpp b/src/creatures/players/wheel/wheel_gems.cpp
index a2c7a898766..766fa9ee049 100644
--- a/src/creatures/players/wheel/wheel_gems.cpp
+++ b/src/creatures/players/wheel/wheel_gems.cpp
@@ -238,16 +238,16 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
switch (modifier) {
case WheelGemSupremeModifier_t::General_Dodge:
- m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::DODGE, 25 * gradeMultiplier));
+ m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::DODGE, 28 * gradeMultiplier));
break;
case WheelGemSupremeModifier_t::General_LifeLeech:
- m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::LIFE_LEECH, 120 * gradeMultiplier));
+ m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::LIFE_LEECH, 200 * gradeMultiplier));
break;
case WheelGemSupremeModifier_t::General_ManaLeech:
- m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::MANA_LEECH, 40 * gradeMultiplier));
+ m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::MANA_LEECH, 80 * gradeMultiplier));
break;
case WheelGemSupremeModifier_t::General_CriticalDamage:
- m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::CRITICAL_DAMAGE, 150 * gradeMultiplier));
+ m_strategies.emplace_back(std::make_unique(m_wheel, WheelStat_t::CRITICAL_DAMAGE, 200 * gradeMultiplier));
break;
case WheelGemSupremeModifier_t::General_RevelationMastery_GiftOfLife:
m_strategies.emplace_back(std::make_unique(m_wheel, WheelGemAffinity_t::Green, 150 * gradeMultiplier));
@@ -255,7 +255,7 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
break;
case WheelGemSupremeModifier_t::SorcererDruid_UltimateHealing:
- bonus.increase.heal = 10 * gradeMultiplier;
+ bonus.increase.heal = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Ultimate Healing", bonus));
break;
@@ -312,25 +312,25 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
break;
case WheelGemSupremeModifier_t::Knight_AvatarOfSteel_Cooldown:
- bonus.decrease.cooldown = 300 * 1000;
+ bonus.decrease.cooldown = 900 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Avatar of Steel", bonus));
break;
case WheelGemSupremeModifier_t::Knight_ExecutionersThrow_Cooldown:
- bonus.decrease.cooldown = 1 * 1000;
+ bonus.decrease.cooldown = 2 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Executioner's Throw", bonus));
break;
case WheelGemSupremeModifier_t::Knight_ExecutionersThrow_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 6 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Executioner's Throw", bonus));
break;
case WheelGemSupremeModifier_t::Knight_ExecutionersThrow_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Executioner's Throw", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Fierce_Berserk_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Fierce Berserk", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Fierce_Berserk_CriticalExtraDamage:
@@ -338,35 +338,35 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
m_strategies.emplace_back(std::make_unique(m_wheel, "Fierce Berserk", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Berserk_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Berserk", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Berserk_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Berserk", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Front_Sweep_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Front Sweep", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Front_Sweep_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Front Sweep", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Groundshaker_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = static_cast(std::round(6.5 * gradeMultiplier));
m_strategies.emplace_back(std::make_unique(m_wheel, "Groundshaker", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Groundshaker_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Groundshaker", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Annihilation_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 15 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Annihilation", bonus));
break;
case WheelGemSupremeModifier_t::Knight_Annihilation_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Annihilation", bonus));
break;
case WheelGemSupremeModifier_t::Knight_FairWoundCleansing_HealingIncrease:
@@ -375,72 +375,72 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
break;
case WheelGemSupremeModifier_t::Paladin_AvatarOfLight_Cooldown:
- bonus.decrease.cooldown = 300 * 1000;
+ bonus.decrease.cooldown = 900 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Avatar of Light", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineDazzle_Cooldown:
- bonus.decrease.cooldown = 2 * 1000;
+ bonus.decrease.cooldown = 4 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Dazzle", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineGrenade_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 6 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Grenade", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineGrenade_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Grenade", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineCaldera_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Caldera", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineCaldera_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Caldera", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineMissile_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Missile", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineMissile_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Missile", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_EtherealSpear_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 10 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Ethereal Spear", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_EtherealSpear_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 15 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Ethereal Spear", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Strong Ethereal Spear", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Strong Ethereal Spear", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineEmpowerment_Cooldown:
- bonus.decrease.cooldown = 3 * 1000;
+ bonus.decrease.cooldown = 6 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Empowerment", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_DivineGrenade_Cooldown:
- bonus.decrease.cooldown = 1 * 1000;
+ bonus.decrease.cooldown = 2 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Divine Grenade", bonus));
break;
case WheelGemSupremeModifier_t::Paladin_Salvation_HealingIncrease:
- bonus.increase.heal = 10 * gradeMultiplier;
+ bonus.increase.heal = 6 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Salvation", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_AvatarOfStorm_Cooldown:
- bonus.decrease.cooldown = 300 * 1000;
+ bonus.decrease.cooldown = 900 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Avatar of Storm", bonus));
break;
@@ -450,31 +450,31 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
m_strategies.emplace_back(std::make_unique(m_wheel, "Energy Wave", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 10 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Death Beam", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 15 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Death Beam", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_HellsCore_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Hell's Core", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_HellsCore_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Hell's Core", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_EnergyWave_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Energy Wave", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_EnergyWave_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Energy Wave", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Fire Wave", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_CriticalExtraDamage:
@@ -482,24 +482,24 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Fire Wave", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Rage of the Skies", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Rage of the Skies", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 10 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Energy Beam", bonus));
break;
case WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 15 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Great Energy Beam", bonus));
break;
case WheelGemSupremeModifier_t::Druid_AvatarOfNature_Cooldown:
- bonus.decrease.cooldown = 300 * 1000;
+ bonus.decrease.cooldown = 900 * 1000;
wheelBonus.momentum += grade < 3 ? 0.33 * grade : 1;
m_strategies.emplace_back(std::make_unique(m_wheel, "Avatar of Nature", bonus));
break;
@@ -509,51 +509,51 @@ void WheelModifierContext::addStrategies(WheelGemSupremeModifier_t modifier, uin
m_strategies.emplace_back(std::make_unique(m_wheel, "Nature's Embrace", bonus));
break;
case WheelGemSupremeModifier_t::Druid_TerraBurst_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 7 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Terra Burst", bonus));
break;
case WheelGemSupremeModifier_t::Druid_TerraBurst_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Terra Burst", bonus));
break;
case WheelGemSupremeModifier_t::Druid_IceBurst_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 7 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Ice Burst", bonus));
break;
case WheelGemSupremeModifier_t::Druid_IceBurst_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Ice Burst", bonus));
break;
case WheelGemSupremeModifier_t::Druid_EternalWinter_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Eternal Winter", bonus));
break;
case WheelGemSupremeModifier_t::Druid_EternalWinter_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Eternal Winter", bonus));
break;
case WheelGemSupremeModifier_t::Druid_TerraWave_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Terra Wave", bonus));
break;
case WheelGemSupremeModifier_t::Druid_TerraWave_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 12 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Terra Wave", bonus));
break;
case WheelGemSupremeModifier_t::Druid_StrongIceWave_DamageIncrease:
- bonus.increase.damage = 25 * gradeMultiplier;
+ bonus.increase.damage = 8 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Strong Ice Wave", bonus));
break;
case WheelGemSupremeModifier_t::Druid_StrongIceWave_CriticalExtraDamage:
- bonus.increase.criticalDamage = 8 * gradeMultiplier;
+ bonus.increase.criticalDamage = 15 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Strong Ice Wave", bonus));
break;
case WheelGemSupremeModifier_t::Druid_HealFriend_HealingIncrease:
- bonus.increase.heal = 10 * gradeMultiplier;
+ bonus.increase.heal = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Heal Friend", bonus));
break;
case WheelGemSupremeModifier_t::Druid_MassHealing_HealingIncrease:
- bonus.increase.heal = 10 * gradeMultiplier;
+ bonus.increase.heal = 5 * gradeMultiplier;
m_strategies.emplace_back(std::make_unique(m_wheel, "Mass Healing", bonus));
break;
default:
diff --git a/src/game/functions/game_reload.cpp b/src/game/functions/game_reload.cpp
index 10f20595042..5de3e98b0b0 100644
--- a/src/game/functions/game_reload.cpp
+++ b/src/game/functions/game_reload.cpp
@@ -22,6 +22,7 @@
#include "lua/modules/modules.hpp"
#include "lua/scripts/lua_environment.hpp"
#include "lua/scripts/scripts.hpp"
+#include "creatures/players/vocations/vocation.hpp"
GameReload::GameReload() = default;
GameReload::~GameReload() = default;
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 87040418279..556b506ca7f 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -62,6 +62,7 @@
#include "server/server.hpp"
#include "utils/tools.hpp"
#include "utils/wildcardtree.hpp"
+#include "creatures/players/vocations/vocation.hpp"
#include "enums/account_coins.hpp"
#include "enums/account_errors.hpp"
@@ -2907,9 +2908,7 @@ ReturnValue Game::internalTeleport(const std::shared_ptr &thing, const Po
return ret;
}
- g_dispatcher().addWalkEvent([=] {
- g_game().map.moveCreature(creature, toTile, !pushMove);
- });
+ map.moveCreature(creature, toTile, !pushMove);
return RETURNVALUE_NOERROR;
} else if (const auto &item = thing->getItem()) {
@@ -6397,10 +6396,6 @@ bool Game::internalCreatureSay(const std::shared_ptr &creature, SpeakC
// event method
for (const auto &spectator : spectators) {
spectator->onCreatureSay(creature, type, text);
- if (creature != spectator) {
- g_events().eventCreatureOnHear(spectator, creature, text, type);
- g_callbacks().executeCallback(EventCallback_t::creatureOnHear, &EventCallback::creatureOnHear, spectator, creature, text, type);
- }
}
return true;
}
@@ -7007,7 +7002,7 @@ void Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, const std::s
if (damage.secondary.value != 0) {
damage.secondary.value -= attackerPlayer->wheel()->getStat(WheelStat_t::DAMAGE);
}
- if (damage.instantSpellName == "Twin Burst") {
+ if (damage.instantSpellName == "Ice Burst" || damage.instantSpellName == "Terra Burst") {
int32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);
if (damageBonus != 0) {
damage.primary.value += (damage.primary.value * damageBonus) / 100.;
@@ -7435,7 +7430,6 @@ bool Game::combatChangeHealth(const std::shared_ptr &attacker, const s
if (targetMonster->israndomStepping()) {
targetMonster->setIgnoreFieldDamage(true);
- targetMonster->updateMapCache();
}
}
@@ -8249,8 +8243,8 @@ void Game::checkPlayersRecord() {
uint32_t previousRecord = playersRecord;
playersRecord = playersOnline;
- for (auto &[key, it] : g_globalEvents().getEventMap(GLOBALEVENT_RECORD)) {
- it->executeRecord(playersRecord, previousRecord);
+ for (const auto &[key, globalEvent] : g_globalEvents().getEventMap(GLOBALEVENT_RECORD)) {
+ globalEvent->executeRecord(playersRecord, previousRecord);
}
updatePlayersRecord();
}
@@ -9845,7 +9839,7 @@ void Game::playerSaveWheel(uint32_t playerId, NetworkMessage &msg) {
return;
}
- if (player->isUIExhausted()) {
+ if (player->isUIExhausted(1000)) {
player->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);
return;
}
diff --git a/src/game/game_definitions.hpp b/src/game/game_definitions.hpp
index e122cdf979f..50fa1307764 100644
--- a/src/game/game_definitions.hpp
+++ b/src/game/game_definitions.hpp
@@ -54,7 +54,7 @@ enum Faction_t {
FACTION_LAST = FACTION_FAFNAR,
};
-enum LightState_t {
+enum LightState_t : uint8_t {
LIGHT_STATE_DAY,
LIGHT_STATE_NIGHT,
LIGHT_STATE_SUNSET,
diff --git a/src/game/movement/teleport.cpp b/src/game/movement/teleport.cpp
index 935ec443617..368bcf6e476 100644
--- a/src/game/movement/teleport.cpp
+++ b/src/game/movement/teleport.cpp
@@ -93,11 +93,11 @@ void Teleport::addThing(int32_t, const std::shared_ptr &thing) {
g_game().internalCreatureTurn(creature, origPos.x > destPos.x ? DIRECTION_WEST : DIRECTION_EAST);
g_dispatcher().addWalkEvent([=] {
g_game().map.moveCreature(creature, destTile);
+ if (effect != CONST_ME_NONE) {
+ g_game().addMagicEffect(origPos, effect);
+ g_game().addMagicEffect(destTile->getPosition(), effect);
+ }
});
- if (effect != CONST_ME_NONE) {
- g_game().addMagicEffect(origPos, effect);
- g_game().addMagicEffect(destTile->getPosition(), effect);
- }
} else if (const auto &item = thing->getItem()) {
if (effect != CONST_ME_NONE) {
g_game().addMagicEffect(destTile->getPosition(), effect);
diff --git a/src/game/scheduling/save_manager.cpp b/src/game/scheduling/save_manager.cpp
index 9cccc4052a7..45cd9392194 100644
--- a/src/game/scheduling/save_manager.cpp
+++ b/src/game/scheduling/save_manager.cpp
@@ -16,6 +16,7 @@
#include "io/iologindata.hpp"
#include "kv/kv.hpp"
#include "lib/di/container.hpp"
+#include "creatures/players/player.hpp"
SaveManager::SaveManager(ThreadPool &threadPool, KVStore &kvStore, Logger &logger, Game &game) :
threadPool(threadPool), kv(kvStore), logger(logger), game(game) { }
diff --git a/src/game/scheduling/task.cpp b/src/game/scheduling/task.cpp
index b3a79f7ab18..1edd246a702 100644
--- a/src/game/scheduling/task.cpp
+++ b/src/game/scheduling/task.cpp
@@ -15,22 +15,22 @@
std::atomic_uint_fast64_t Task::LAST_EVENT_ID = 0;
-Task::Task(uint32_t expiresAfterMs, std::function &&f, std::string_view context, const std::source_location &location) :
- func(std::move(f)), context(context), functionName(location.function_name()), utime(OTSYS_TIME()),
+Task::Task(uint32_t expiresAfterMs, std::function &&f, std::string_view context) :
+ func(std::move(f)), context(context), utime(OTSYS_TIME()),
expiration(expiresAfterMs > 0 ? OTSYS_TIME() + expiresAfterMs : 0) {
if (this->context.empty()) {
- g_logger().error("[{}]: task context cannot be empty! Function: {}", __FUNCTION__, functionName);
+ g_logger().error("[{}]: task context cannot be empty!", __FUNCTION__);
return;
}
assert(!this->context.empty() && "Context cannot be empty!");
}
-Task::Task(std::function &&f, std::string_view context, uint32_t delay, bool cycle /* = false*/, bool log /*= true*/, const std::source_location &location) :
- func(std::move(f)), context(context), functionName(location.function_name()), utime(OTSYS_TIME() + delay), delay(delay),
+Task::Task(std::function &&f, std::string_view context, uint32_t delay, bool cycle /* = false*/, bool log /*= true*/) :
+ func(std::move(f)), context(context), utime(OTSYS_TIME() + delay), delay(delay),
cycle(cycle), log(log) {
if (this->context.empty()) {
- g_logger().error("[{}]: task context cannot be empty! Function: {}", __FUNCTION__, functionName);
+ g_logger().error("[{}]: task context cannot be empty!", __FUNCTION__);
return;
}
@@ -48,15 +48,15 @@ bool Task::execute() const {
}
if (hasExpired()) {
- g_logger().info("The task '{}' has expired, it has not been executed in {}. Function: {}", getContext(), expiration - utime, functionName);
+ g_logger().info("The task '{}' has expired, it has not been executed in {}.", getContext(), expiration - utime);
return false;
}
if (log) {
if (hasTraceableContext()) {
- g_logger().trace("Executing task {}. Function: {}", getContext(), functionName);
+ g_logger().trace("Executing task {}.", getContext());
} else {
- g_logger().debug("Executing task {}. Function: {}", getContext(), functionName);
+ g_logger().debug("Executing task {}.", getContext());
}
}
diff --git a/src/game/scheduling/task.hpp b/src/game/scheduling/task.hpp
index 948bdea0215..c01dbe2f676 100644
--- a/src/game/scheduling/task.hpp
+++ b/src/game/scheduling/task.hpp
@@ -13,9 +13,9 @@ class Dispatcher;
class Task {
public:
- Task(uint32_t expiresAfterMs, std::function &&f, std::string_view context, const std::source_location &location = std::source_location::current());
+ Task(uint32_t expiresAfterMs, std::function &&f, std::string_view context);
- Task(std::function &&f, std::string_view context, uint32_t delay, bool cycle = false, bool log = true, const std::source_location &location = std::source_location::current());
+ Task(std::function &&f, std::string_view context, uint32_t delay, bool cycle = false, bool log = true);
~Task() = default;
@@ -37,10 +37,6 @@ class Task {
return context;
}
- [[nodiscard]] std::string_view getFunctionName() const {
- return functionName;
- }
-
[[nodiscard]] auto getTime() const {
return utime;
}
@@ -106,7 +102,6 @@ class Task {
std::function func;
std::string context;
- std::string functionName;
int64_t utime = 0;
int64_t expiration = 0;
diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp
index 477572dfbc8..7cb08a7b9a6 100644
--- a/src/io/functions/iologindata_load_player.cpp
+++ b/src/io/functions/iologindata_load_player.cpp
@@ -9,8 +9,10 @@
#include "io/functions/iologindata_load_player.hpp"
+#include "account/account.hpp"
#include "config/configmanager.hpp"
#include "creatures/combat/condition.hpp"
+#include "database/database.hpp"
#include "creatures/monsters/monsters.hpp"
#include "creatures/players/achievement/player_achievement.hpp"
#include "creatures/players/cyclopedia/player_badge.hpp"
@@ -29,6 +31,7 @@
#include "items/containers/inbox/inbox.hpp"
#include "items/containers/rewards/reward.hpp"
#include "items/containers/rewards/rewardchest.hpp"
+#include "creatures/players/player.hpp"
#include "utils/tools.hpp"
void IOLoginDataLoad::loadItems(ItemsMap &itemsMap, const DBResult_ptr &result, const std::shared_ptr &player) {
diff --git a/src/io/functions/iologindata_load_player.hpp b/src/io/functions/iologindata_load_player.hpp
index 2d1a4305cf3..ca05bdcb1b8 100644
--- a/src/io/functions/iologindata_load_player.hpp
+++ b/src/io/functions/iologindata_load_player.hpp
@@ -11,6 +11,10 @@
#include "io/iologindata.hpp"
+class Player;
+class DBResult;
+using DBResult_ptr = std::shared_ptr;
+
class IOLoginDataLoad : public IOLoginData {
public:
static bool loadPlayerBasicInfo(const std::shared_ptr &player, const DBResult_ptr &result);
diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp
index b38e6e2b84c..613fdac1cb0 100644
--- a/src/io/functions/iologindata_save_player.cpp
+++ b/src/io/functions/iologindata_save_player.cpp
@@ -17,6 +17,7 @@
#include "items/containers/depot/depotchest.hpp"
#include "items/containers/inbox/inbox.hpp"
#include "items/containers/rewards/reward.hpp"
+#include "creatures/players/player.hpp"
bool IOLoginDataSave::saveItems(const std::shared_ptr &player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {
if (!player) {
diff --git a/src/io/functions/iologindata_save_player.hpp b/src/io/functions/iologindata_save_player.hpp
index abafc2c186a..1f871a3b5db 100644
--- a/src/io/functions/iologindata_save_player.hpp
+++ b/src/io/functions/iologindata_save_player.hpp
@@ -12,6 +12,7 @@
#include "io/iologindata.hpp"
class PropWriteStream;
+class DBInsert;
class IOLoginDataSave : public IOLoginData {
public:
diff --git a/src/io/io_wheel.cpp b/src/io/io_wheel.cpp
index 72d5e207d4c..2e1b57c79bc 100644
--- a/src/io/io_wheel.cpp
+++ b/src/io/io_wheel.cpp
@@ -181,7 +181,7 @@ const VocationBonusMap &IOWheel::getWheelMapFunctions() const {
std::pair IOWheel::getRevelationStatByStage(WheelStageEnum_t stageType) const {
// Let's remove one, because the std::array starts with 0 and the stages with 1
- auto array = m_wheelBonusData.revelation.stats[static_cast(stageType) - 1];
+ const auto &array = m_wheelBonusData.revelation.stats[static_cast(stageType) - 1];
return std::make_pair(array.damage, array.healing);
}
@@ -222,32 +222,32 @@ void IOWheel::initializeMapData() {
void IOWheel::initializeDruidSpells() {
m_wheelBonusData.spells.druid[0].name = "Strong Ice Wave";
m_wheelBonusData.spells.druid[0].grade[1].leech.mana = 3;
- m_wheelBonusData.spells.druid[0].grade[2].increase.damage = 30;
+ m_wheelBonusData.spells.druid[0].grade[2].increase.damage = 10;
m_wheelBonusData.spells.druid[1].name = "Mass Healing";
- m_wheelBonusData.spells.druid[1].grade[1].increase.heal = 10;
+ m_wheelBonusData.spells.druid[1].grade[1].increase.heal = 4;
m_wheelBonusData.spells.druid[1].grade[2].increase.area = true;
m_wheelBonusData.spells.druid[2].name = "Nature's Embrace";
- m_wheelBonusData.spells.druid[2].grade[1].increase.heal = 10;
+ m_wheelBonusData.spells.druid[2].grade[1].increase.heal = 11;
m_wheelBonusData.spells.druid[2].grade[2].decrease.cooldown = 10;
m_wheelBonusData.spells.druid[3].name = "Terra Wave";
- m_wheelBonusData.spells.druid[3].grade[1].increase.damage = 25;
+ m_wheelBonusData.spells.druid[3].grade[1].increase.damage = static_cast(std::round(6.5));
m_wheelBonusData.spells.druid[3].grade[2].leech.life = 5;
m_wheelBonusData.spells.druid[4].name = "Heal Friend";
m_wheelBonusData.spells.druid[4].grade[1].decrease.manaCost = 10;
- m_wheelBonusData.spells.druid[4].grade[2].increase.heal = 10;
+ m_wheelBonusData.spells.druid[4].grade[2].increase.heal = static_cast(std::round(5.5));
}
void IOWheel::initializeKnightSpells() {
m_wheelBonusData.spells.knight[0].name = "Front Sweep";
m_wheelBonusData.spells.knight[0].grade[1].leech.life = 5;
- m_wheelBonusData.spells.knight[0].grade[2].increase.damage = 30;
+ m_wheelBonusData.spells.knight[0].grade[2].increase.damage = 14;
m_wheelBonusData.spells.knight[1].name = "Groundshaker";
- m_wheelBonusData.spells.knight[1].grade[1].increase.damage = 25;
+ m_wheelBonusData.spells.knight[1].grade[1].increase.damage = static_cast(std::round(12.5));
m_wheelBonusData.spells.knight[1].grade[2].decrease.cooldown = 2;
m_wheelBonusData.spells.knight[2].name = "Chivalrous Challenge";
@@ -255,12 +255,12 @@ void IOWheel::initializeKnightSpells() {
m_wheelBonusData.spells.knight[2].grade[2].increase.aditionalTarget = 1;
m_wheelBonusData.spells.knight[3].name = "Intense Wound Cleansing";
- m_wheelBonusData.spells.knight[3].grade[1].increase.heal = 10;
+ m_wheelBonusData.spells.knight[3].grade[1].increase.heal = 125;
m_wheelBonusData.spells.knight[3].grade[2].decrease.cooldown = 300;
m_wheelBonusData.spells.knight[4].name = "Fierce Berserk";
m_wheelBonusData.spells.knight[4].grade[1].decrease.manaCost = 30;
- m_wheelBonusData.spells.knight[4].grade[2].increase.damage = 25;
+ m_wheelBonusData.spells.knight[4].grade[2].increase.damage = 10;
}
void IOWheel::initializePaladinSpells() {
@@ -270,7 +270,7 @@ void IOWheel::initializePaladinSpells() {
m_wheelBonusData.spells.paladin[1].name = "Strong Ethereal Spear";
m_wheelBonusData.spells.paladin[1].grade[1].decrease.cooldown = 2;
- m_wheelBonusData.spells.paladin[1].grade[2].increase.damage = 25;
+ m_wheelBonusData.spells.paladin[1].grade[2].increase.damage = 380;
m_wheelBonusData.spells.paladin[2].name = "Divine Dazzle";
m_wheelBonusData.spells.paladin[2].grade[1].increase.aditionalTarget = 1;
@@ -283,7 +283,7 @@ void IOWheel::initializePaladinSpells() {
m_wheelBonusData.spells.paladin[4].name = "Divine Caldera";
m_wheelBonusData.spells.paladin[4].grade[1].decrease.manaCost = 20;
- m_wheelBonusData.spells.paladin[4].grade[2].increase.damage = 25;
+ m_wheelBonusData.spells.paladin[4].grade[2].increase.damage = static_cast(std::round(8.5));
}
void IOWheel::initializeSorcererSpells() {
@@ -292,19 +292,19 @@ void IOWheel::initializeSorcererSpells() {
m_wheelBonusData.spells.sorcerer[1].name = "Sap Strength";
m_wheelBonusData.spells.sorcerer[1].grade[1].increase.area = true;
- m_wheelBonusData.spells.sorcerer[1].grade[2].increase.damageReduction = 10;
+ m_wheelBonusData.spells.sorcerer[1].grade[2].increase.damageReduction = 1;
m_wheelBonusData.spells.sorcerer[2].name = "Energy Wave";
- m_wheelBonusData.spells.sorcerer[2].grade[1].increase.damage = 25;
+ m_wheelBonusData.spells.sorcerer[2].grade[1].increase.damage = 5;
m_wheelBonusData.spells.sorcerer[2].grade[2].increase.area = true;
m_wheelBonusData.spells.sorcerer[3].name = "Great Fire Wave";
m_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalDamage = 15;
m_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalChance = 10;
- m_wheelBonusData.spells.sorcerer[3].grade[2].increase.damage = 25;
+ m_wheelBonusData.spells.sorcerer[3].grade[2].increase.damage = 5;
m_wheelBonusData.spells.sorcerer[4].name = "Any_Focus_Mage_Spell";
- m_wheelBonusData.spells.sorcerer[4].grade[1].increase.damage = 25;
+ m_wheelBonusData.spells.sorcerer[4].grade[1].increase.damage = 5;
m_wheelBonusData.spells.sorcerer[4].grade[2].decrease.cooldown = 4;
m_wheelBonusData.spells.sorcerer[4].grade[2].decrease.secondaryGroupCooldown = 4;
}
@@ -399,7 +399,7 @@ void IOWheel::slotGreen200(const std::shared_ptr &player, uint16_t point
bonusData.stats.health += 2 * points;
bonusData.stats.mana += 3 * points;
if (pointsInSlot) {
- bonusData.instant.positionalTatics = true;
+ bonusData.instant.positionalTactics = true;
}
} else {
bonusData.stats.health += 1 * points;
diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp
index 0249d70a517..c0a6a13f363 100644
--- a/src/io/iologindata.cpp
+++ b/src/io/iologindata.cpp
@@ -9,12 +9,15 @@
#include "io/iologindata.hpp"
+#include "account/account.hpp"
#include "config/configmanager.hpp"
+#include "database/database.hpp"
#include "io/functions/iologindata_load_player.hpp"
#include "io/functions/iologindata_save_player.hpp"
#include "game/game.hpp"
#include "creatures/monsters/monster.hpp"
#include "creatures/players/wheel/player_wheel.hpp"
+#include "creatures/players/player.hpp"
#include "lib/metrics/metrics.hpp"
#include "enums/account_type.hpp"
#include "enums/account_errors.hpp"
diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp
index 29eac0c812f..d379031cd55 100644
--- a/src/io/iologindata.hpp
+++ b/src/io/iologindata.hpp
@@ -9,9 +9,12 @@
#pragma once
-#include "account/account.hpp"
-#include "creatures/players/player.hpp"
-#include "database/database.hpp"
+class Player;
+class Item;
+class DBResult;
+
+struct VIPEntry;
+struct VIPGroupEntry;
using ItemBlockList = std::list>>;
@@ -21,7 +24,7 @@ class IOLoginData {
static uint8_t getAccountType(uint32_t accountId);
static bool loadPlayerById(const std::shared_ptr &player, uint32_t id, bool disableIrrelevantInfo = true);
static bool loadPlayerByName(const std::shared_ptr &player, const std::string &name, bool disableIrrelevantInfo = true);
- static bool loadPlayer(const std::shared_ptr &player, const DBResult_ptr &result, bool disableIrrelevantInfo = false);
+ static bool loadPlayer(const std::shared_ptr &player, const std::shared_ptr &result, bool disableIrrelevantInfo = false);
static bool savePlayer(const std::shared_ptr &player);
static uint32_t getGuidByName(const std::string &name);
static bool getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name);
diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp
index 3332ffab1c3..ff2f9595d46 100644
--- a/src/io/iomarket.cpp
+++ b/src/io/iomarket.cpp
@@ -16,6 +16,7 @@
#include "game/scheduling/save_manager.hpp"
#include "io/iologindata.hpp"
#include "items/containers/inbox/inbox.hpp"
+#include "creatures/players/player.hpp"
uint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {
auto tier = static_cast(std::atoi(string.c_str()));
diff --git a/src/items/bed.cpp b/src/items/bed.cpp
index 25e95318e74..527f052e2d0 100644
--- a/src/items/bed.cpp
+++ b/src/items/bed.cpp
@@ -16,6 +16,7 @@
#include "game/scheduling/save_manager.hpp"
#include "io/iologindata.hpp"
#include "server/network/protocol/protocolgame.hpp"
+#include "creatures/players/player.hpp"
BedItem::BedItem(uint16_t id) :
Item(id) {
diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp
index 761740bfc2d..49f23609807 100644
--- a/src/items/functions/item/item_parse.cpp
+++ b/src/items/functions/item/item_parse.cpp
@@ -15,6 +15,7 @@
#include "utils/pugicast.hpp"
#include "utils/tools.hpp"
#include "creatures/combat/combat.hpp"
+#include "lua/scripts/scripts.hpp"
void ItemParse::initParse(const std::string &stringValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {
// Parse all item attributes
@@ -974,7 +975,7 @@ void ItemParse::parseHouseRelated(std::string_view stringValue, pugi::xml_attrib
void ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attributeNode, MoveEvent_t eventType /*= MOVE_EVENT_NONE*/, WeaponType_t weaponType /*= WEAPON_NONE*/) {
std::shared_ptr moveevent;
if (eventType != MOVE_EVENT_NONE) {
- moveevent = std::make_shared(&g_moveEvents().getScriptInterface());
+ moveevent = std::make_shared();
moveevent->setItemId(itemType.id);
moveevent->setEventType(eventType);
@@ -996,11 +997,11 @@ void ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attri
std::shared_ptr weapon = nullptr;
if (weaponType != WEAPON_NONE) {
if (weaponType == WEAPON_DISTANCE || weaponType == WEAPON_AMMO || weaponType == WEAPON_MISSILE) {
- weapon = std::make_shared(&g_weapons().getScriptInterface());
+ weapon = std::make_shared();
} else if (weaponType == WEAPON_WAND) {
- weapon = std::make_shared(&g_weapons().getScriptInterface());
+ weapon = std::make_shared();
} else {
- weapon = std::make_shared(&g_weapons().getScriptInterface());
+ weapon = std::make_shared();
}
weapon->weaponType = weaponType;
diff --git a/src/items/items_definitions.hpp b/src/items/items_definitions.hpp
index 19d7f30b942..9b6990c0cb7 100644
--- a/src/items/items_definitions.hpp
+++ b/src/items/items_definitions.hpp
@@ -140,34 +140,35 @@ enum ItemGroup_t {
enum ItemTypes_t {
ITEM_TYPE_NONE,
- // Odered to make the cast from protobuf::itemCategory to ItemTypes_t easier.
+ // Ordered to make the cast from protobuf::itemCategory to ItemTypes_t easier.
// Do not edit it from Start-End
// Start
- ITEM_TYPE_ARMOR,
- ITEM_TYPE_AMULET,
- ITEM_TYPE_BOOTS,
- ITEM_TYPE_CONTAINER,
- ITEM_TYPE_DECORATION,
- ITEM_TYPE_FOOD,
- ITEM_TYPE_HELMET,
- ITEM_TYPE_LEGS,
- ITEM_TYPE_OTHER,
- ITEM_TYPE_POTION,
- ITEM_TYPE_RING,
- ITEM_TYPE_RUNE,
- ITEM_TYPE_SHIELD,
- ITEM_TYPE_TOOLS,
- ITEM_TYPE_VALUABLE,
- ITEM_TYPE_AMMO,
- ITEM_TYPE_AXE,
- ITEM_TYPE_CLUB,
- ITEM_TYPE_DISTANCE,
- ITEM_TYPE_SWORD,
- ITEM_TYPE_WAND,
- ITEM_TYPE_PREMIUMSCROLL,
- ITEM_TYPE_TIBIACOIN,
- ITEM_TYPE_CREATUREPRODUCT,
- ITEM_TYPE_QUIVER,
+ ITEM_TYPE_ARMOR = 1,
+ ITEM_TYPE_AMULET = 2,
+ ITEM_TYPE_BOOTS = 3,
+ ITEM_TYPE_CONTAINER = 4,
+ ITEM_TYPE_DECORATION = 5,
+ ITEM_TYPE_FOOD = 6,
+ ITEM_TYPE_HELMET = 7,
+ ITEM_TYPE_LEGS = 8,
+ ITEM_TYPE_OTHER = 9,
+ ITEM_TYPE_POTION = 10,
+ ITEM_TYPE_RING = 11,
+ ITEM_TYPE_RUNE = 12,
+ ITEM_TYPE_SHIELD = 13,
+ ITEM_TYPE_TOOLS = 14,
+ ITEM_TYPE_VALUABLE = 15,
+ ITEM_TYPE_AMMO = 16,
+ ITEM_TYPE_AXE = 17,
+ ITEM_TYPE_CLUB = 18,
+ ITEM_TYPE_DISTANCE = 19,
+ ITEM_TYPE_SWORD = 20,
+ ITEM_TYPE_WAND = 21,
+ ITEM_TYPE_PREMIUMSCROLL = 22,
+ ITEM_TYPE_TIBIACOIN = 23,
+ ITEM_TYPE_CREATUREPRODUCT = 24,
+ ITEM_TYPE_QUIVER = 25,
+ ITEM_TYPE_SOULCORES = 26,
// End
ITEM_TYPE_DEPOT,
diff --git a/src/items/tile.cpp b/src/items/tile.cpp
index 4b7cb0fbac3..edd827db0e5 100644
--- a/src/items/tile.cpp
+++ b/src/items/tile.cpp
@@ -987,11 +987,13 @@ std::shared_ptr Tile::queryDestination(int32_t &, const std::shared_pt
const auto &destThing = destTile->getTopDownItem();
if (destThing) {
destItem = destThing->getItem();
- if (thing && thing->getItem()) {
- const auto &destCylinder = destThing->getCylinder();
- if (destCylinder && !destCylinder->getContainer()) {
- return destThing->getCylinder();
- }
+ const auto &thingItem = thing ? thing->getItem() : nullptr;
+ if (!thingItem || thingItem->getMailbox() != destItem->getMailbox()) {
+ return destTile;
+ }
+ const auto &destCylinder = destThing->getCylinder();
+ if (destCylinder && !destCylinder->getContainer()) {
+ return destThing->getCylinder();
}
}
}
diff --git a/src/items/weapons/weapons.cpp b/src/items/weapons/weapons.cpp
index 81e59f6a739..4eb84d246c6 100644
--- a/src/items/weapons/weapons.cpp
+++ b/src/items/weapons/weapons.cpp
@@ -13,12 +13,19 @@
#include "creatures/combat/combat.hpp"
#include "game/game.hpp"
#include "lua/creature/events.hpp"
-
+#include "creatures/players/vocations/vocation.hpp"
+#include "lib/di/container.hpp"
+#include "lua/scripts/scripts.hpp"
#include "lua/global/lua_variant.hpp"
+#include "creatures/players/player.hpp"
Weapons::Weapons() = default;
Weapons::~Weapons() = default;
+Weapons &Weapons::getInstance() {
+ return inject();
+}
+
WeaponShared_ptr Weapons::getWeapon(const std::shared_ptr
- &item) const {
if (!item) {
return nullptr;
@@ -77,6 +84,35 @@ int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t
}
}
+Weapon::Weapon() = default;
+
+LuaScriptInterface* Weapon::getScriptInterface() const {
+ return &g_scripts().getScriptInterface();
+}
+
+bool Weapon::loadScriptId() {
+ LuaScriptInterface &luaInterface = g_scripts().getScriptInterface();
+ m_scriptId = luaInterface.getEvent();
+ if (m_scriptId == -1) {
+ g_logger().error("[MoveEvent::loadScriptId] Failed to load event. Script name: '{}', Module: '{}'", luaInterface.getLoadingScriptName(), luaInterface.getInterfaceName());
+ return false;
+ }
+
+ return true;
+}
+
+int32_t Weapon::getScriptId() const {
+ return m_scriptId;
+}
+
+void Weapon::setScriptId(int32_t newScriptId) {
+ m_scriptId = newScriptId;
+}
+
+bool Weapon::isLoadedScriptId() const {
+ return m_scriptId != 0;
+}
+
void Weapon::configureWeapon(const ItemType &it) {
id = it.id;
}
@@ -203,7 +239,7 @@ void Weapon::internalUseWeapon(const std::shared_ptr &player, const std:
}
}
- if (isLoadedCallback()) {
+ if (isLoadedScriptId()) {
if (cleavePercent != 0) {
return;
}
@@ -259,7 +295,7 @@ void Weapon::internalUseWeapon(const std::shared_ptr &player, const std:
}
void Weapon::internalUseWeapon(const std::shared_ptr