Skip to content

Commit

Permalink
12.60 Support
Browse files Browse the repository at this point in the history
update to lasted from otservbr
  • Loading branch information
mattyx14 committed Dec 22, 2020
1 parent ebead86 commit e5f0598
Show file tree
Hide file tree
Showing 320 changed files with 1,763 additions and 1,002 deletions.
7 changes: 5 additions & 2 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ maxItem = 2000
maxContainer = 100

--- Version
clientVersion = 1251
clientVersionStr = "12.51"
clientVersion = 1260
clientVersionStr = "12.60"

-- Depot Limit
freeDepotLimit = 2000
Expand All @@ -54,6 +54,9 @@ depotBoxes = 18
-- GameStore
gamestoreByModules = true

-- NOTE: Access only for Premium Account
onlyPremiumAccount = false

-- Customs
weatherRain = false
thunderEffect = false
Expand Down
32 changes: 32 additions & 0 deletions data/XML/familiars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<familiars>
<!-- Familiars sorcerrers -->
<familiar vocation="1" lookType="994" name="Thundergiant" premium="yes" unlocked="no" enabled="yes" />
<familiar vocation="5" lookType="994" name="Thundergiant" premium="yes" unlocked="no" enabled="yes" />

<familiar vocation="1" lookType="1367" name="Bladespark" premium="yes" unlocked="no" enabled="yes" type="quest" />
<familiar vocation="5" lookType="1367" name="Bladespark" premium="yes" unlocked="no" enabled="yes" type="quest" />

<!-- Familiars druids -->
<familiar vocation="2" lookType="993" name="Grovebeast" premium="no" unlocked="no" enabled="yes" />
<familiar vocation="6" lookType="993" name="Grovebeast" premium="no" unlocked="no" enabled="yes" />

<familiar vocation="2" lookType="1364" name="Mossmasher" premium="no" unlocked="no" enabled="yes" type="quest" />
<familiar vocation="6" lookType="1364" name="Mossmasher" premium="no" unlocked="no" enabled="yes" type="quest" />

<!-- Familiars paladins -->
<familiar vocation="3" lookType="992" name="Emberwing" premium="no" unlocked="no" enabled="yes" />
<familiar vocation="7" lookType="992" name="Emberwing" premium="yes" unlocked="no" enabled="yes" />

<familiar vocation="3" lookType="1366" name="Sandscourge" premium="no" unlocked="no" enabled="yes" type="quest" />
<familiar vocation="7" lookType="1366" name="Sandscourge" premium="yes" unlocked="no" enabled="yes" type="quest" />

<!-- Familiars knights -->
<familiar vocation="4" lookType="991" name="Skullfrost" premium="yes" unlocked="no" enabled="yes" />
<familiar vocation="8" lookType="991" name="Skullfrost" premium="yes" unlocked="no" enabled="yes" />

<familiar vocation="4" lookType="1365" name="Snowbash" premium="yes" unlocked="no" enabled="yes" type="quest" />
<familiar vocation="8" lookType="1365" name="Snowbash" premium="yes" unlocked="no" enabled="yes" type="quest" />


</familiars>
352 changes: 178 additions & 174 deletions data/XML/mounts.xml

Large diffs are not rendered by default.

332 changes: 168 additions & 164 deletions data/XML/outfits.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/events/events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<event class="Player" method="onLookInShop" enabled="0" />
<event class="Player" method="onMoveItem" enabled="1" /><!-- Protections on rewardsystem and global depots -->
<event class="Player" method="onItemMoved" enabled="0" />
<event class="Player" method="onMoveCreature" enabled="0" />
<event class="Player" method="onMoveCreature" enabled="1" />
<event class="Player" method="onReportBug" enabled="1" />
<event class="Player" method="onReportRuleViolation" enabled="1" />
<event class="Player" method="onTurn" enabled="1" /><!-- Move with ( ctrl + arrows ) like to TFS 0.3.x : 0.4 -->
Expand Down
4 changes: 4 additions & 0 deletions data/events/scripts/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ function Player:onItemMoved(item, count, fromPosition, toPosition, fromCylinder,
end

function Player:onMoveCreature(creature, fromPosition, toPosition)
if creature:isPlayer() and creature:getStorageValue(Storage.isTraining) == 1 and self:getGroup():hasFlag(PlayerFlag_CanPushAllCreatures) == false then
self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
return false
end
return true
end

Expand Down
Binary file modified data/items/items.otb
Binary file not shown.
20 changes: 12 additions & 8 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46731,9 +46731,10 @@
<attribute key="weight" value="240" />
</item>
<item id="36097" article="a" name="ladder" />
<item id="36098" article="a" name="Ring of Secret Thoughts">
<attribute key="loottype" value="other" />
<item id="36098" article="a" name="ring of secret thoughts">
<attribute key="weight" value="90" />
<attribute key="slotType" value="ring" />
<attribute key="loottype" value="ring" />
</item>
<item id="36099" article="a" name="Wheel Oil">
<attribute key="weight" value="1900" />
Expand Down Expand Up @@ -46850,6 +46851,8 @@
<item id="36141" article="a" name="ring of secret thoughts">
<attribute key="weight" value="90" />
<attribute key="description" value="It is charged with the memories of the Ambassador of Rathleton." />
<attribute key="slotType" value="ring" />
<attribute key="loottype" value="ring" />
</item>
<item id="36142" article="a" name="dead gaffir">
<attribute key="decayTo" value="36143" />
Expand Down Expand Up @@ -46997,21 +47000,24 @@
<attribute key="weight" value="160" />
<attribute key="description" value="You see a flask with lamp oil. Peso 1.60 oz. This lamp oil is highly flammable and evaporates quickly." />
</item>
<item id="36204" article="a" name="golden mask">
<item id="36204" article="a" name="gryphon mask">
<attribute key="loottype" value="other" />
<attribute key="weight" value="650" />
<attribute key="weight" value="2000" />
</item>
<item id="36205" article="a" name="silver mask">
<attribute key="weight" value="3200" />
<attribute key="description" value="It is slightly tarnished." />
<attribute key="loottype" value="other" />
</item>
<item id="36206" article="a" name="ivory mask">
<attribute key="weight" value="1800" />
<attribute key="description" value="It is smoothly polished and cool to the touch." />
<attribute key="loottype" value="other" />
</item>
<item id="36207" article="a" name="mirror mask">
<attribute key="weight" value="1600" />
<attribute key="description" value="It is composed of many small shards." />
<attribute key="loottype" value="other" />
</item>
<item id="36208" name="unknown"/>
<item id="36209" article="a" name="ancient sarcophagus"/>
Expand Down Expand Up @@ -48315,9 +48321,7 @@
<item id="36556" article="a" name="unknown">
<attribute key="weight" value="240" />
</item>
<item id="36557" article="a" name="unknown">
<attribute key="weight" value="240" />
</item>
<item id="36557" article="a" name="palm"/>
<item id="36558" article="a" name="sulphur blossom lamp">
<attribute key="wrapableTo" value="26054" />
</item>
Expand Down Expand Up @@ -51009,7 +51013,7 @@
<attribute key="weight" value="12300" />
<attribute key="imbuingSlots" value="2" />
</item>
<item id="38930" article="a" name="soulmantel">
<item id="38930" article="a" name="soulmantle">
<attribute key="slotType" value="body" />
<attribute key="loottype" value="armor" />
<attribute key="armor" value="17" />
Expand Down
36 changes: 0 additions & 36 deletions data/lib/core/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,42 +259,6 @@ function Player.isMage(self)
self:getVocation():getId())
end

-- Impact Analyser
function Player.sendHealingImpact(self, healAmmount)
-- TODO: Migrate to protocolgame.cpp
local msg = NetworkMessage()
msg:addByte(0xCC) -- DEC: 204
msg:addByte(0) -- 0 = healing / 1 = damage (boolean)
msg:addU32(healAmmount) -- unsigned int
msg:sendToPlayer(self)
end

function Player.sendDamageImpact(self, damage)
-- TODO: Migrate to protocolgame.cpp
local msg = NetworkMessage()
msg:addByte(0xCC) -- DEC: 204
msg:addByte(1) -- 0 = healing / 1 = damage (boolean)
msg:addU32(damage) -- unsigned int
msg:sendToPlayer(self)
end

-- Loot Analyser
function Player.sendLootStats(self, item)
local msg = NetworkMessage()
msg:addByte(0xCF) -- loot analyser bit
msg:addItem(item, self) -- item userdata
msg:addString(getItemName(item:getId()))
msg:sendToPlayer(self)
end

-- Supply Analyser
function Player.sendWaste(self, item)
local msg = NetworkMessage()
msg:addByte(0xCE) -- waste bit
msg:addItemId(item) -- itemId
msg:sendToPlayer(self)
end

local ACCOUNT_STORAGES = {}
function Player.getAccountStorage(self, accountId, key, forceUpdate)
local accountId = self:getAccountId()
Expand Down
8 changes: 4 additions & 4 deletions data/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1842,27 +1842,27 @@ if not Quests then
},
[86] = {
name = "Turmoil of War",
storageId = 65049,
storageId = Storage.KillingInTheNameOf.BudrikMinos,
missionId = 10166,
startValue = 0,
endValue = 5000,
description = function(player)
return string.format(
"Budrik asked you to kill 5000 minotaurs for him. You already killed %d minotaurs.",
(math.max(player:getStorageValue(65049), 0))
(math.max(player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinosCount), 0))
)
end
},
[87] = {
name = "Paw and Fur: Necromancers and Priestess",
storageId = 65050,
storageId = Storage.KillingInTheNameOf.LugriNecromancers,
missionId = 10167,
startValue = 0,
endValue = 4000,
description = function(player)
return string.format(
"You already hunted %d/4000 necromancers and priestess.",
(math.max(player:getStorageValue(65050), 0))
(math.max(player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancerCount), 0))
)
end
}
Expand Down
46 changes: 25 additions & 21 deletions data/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,47 +166,51 @@ Storage = {
Recovering = 50018
},
Fourth = {
Moe = 50019
Moe = 50019,
MoeTimer = 50020
},
Fifth = {
Memories = 50020
Memories = 50021,
MemoriesShards = 50022
},
Sixth = {
Favor = 50021
Favor = 50023,
FourMasks = 50024,
BlessedStatues = 50025
},
Set = {
Ritual = 50022
Ritual = 50026
},
Eighth = {
Yonan = 50023,
Narsai = 50024,
Shimun = 50025,
Tefrit = 50026
Yonan = 50027,
Narsai = 50028,
Shimun = 50029,
Tefrit = 50030
},
Nine = {
Owl = 50027
Owl = 50031
},
Tem = {
Bleeds = 50028
Bleeds = 50032
},
Eleven = {
Basin = 50029
Basin = 50033
},
Twelve = {
Boss = 50030,
Bragrumol = 50031,
Mozradek = 50032,
Xogixath = 50033
Boss = 50034,
Bragrumol = 50035,
Mozradek = 50036,
Xogixath = 50037
},
Thirteen = {
Fafnar = 50034,
Lyre = 50035,
Presente = 50036
Fafnar = 50038,
Lyre = 50039,
Presente = 50040
},
Fourteen = {
Remains = 50037
Remains = 50041
},
UrmahlulluTimer = 50038
UrmahlulluTimer = 50042
},
TheSecretLibrary = {
-- Reserved storage from 50050 - 50069
Expand Down Expand Up @@ -2185,7 +2189,7 @@ Storage = {
-- update 12.20
GraveDanger = {},
HandOfTheInquisitionOutfits = {},
Kilmaresh = {},
-- Kilmaresh = {}, done earlier in the file
GraveDanger = {},
-- update 12.30
FeasterOfSouls = {},
Expand Down
8 changes: 8 additions & 0 deletions data/lib/others/daily_reward_lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ function Player.getCollectionTokens(self)
return math.max(self:getStorageValue(DailyReward.storages.collectionTokens), 0)
end

function Player.getJokerTokens(self)
return math.max(self:getStorageValue(DailyReward.storages.jokerTokens), 0)
end

function Player.setJokerTokens(self, value)
self:setStorageValue(DailyReward.storages.jokerTokens, value)
end

function Player.setCollectionTokens(self, value)
self:setStorageValue(DailyReward.storages.collectionTokens, value)
end
Expand Down
3 changes: 3 additions & 0 deletions data/migrations/10.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
end
8 changes: 7 additions & 1 deletion data/migrations/9.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
print("> Updating database to version 10 (Mount Colors and familiars)")
db.query("ALTER TABLE `players` ADD `lookmountbody` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookmountfeet` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookmounthead` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookmountlegs` tinyint(3) unsigned NOT NULL DEFAULT '0'")
db.query("ALTER TABLE `players` ADD `lookfamiliarstype` int(11) unsigned NOT NULL DEFAULT '0'")
return true
end
Loading

0 comments on commit e5f0598

Please sign in to comment.