alejandro762
Well-Known Member
- Joined
- Sep 6, 2021
- Messages
- 225
- Reaction score
- 63
Hello everyone,
As i Try to add a new vocation on otservbr editing this files,
"Crusader" Vocation.
Data/lib/core/player.lua ( added):
Data/lib/tables/vocations.lua(added):
Data/vocations.xml
Website:
When i try enter i got a directly crash of server, debug from visual took me to sources from a 'familiar' code show as error. ( I will post it in many hours).
Familiar i just copy paste the knight familiar and added Id 9
Error Showed on Debug Visual Studio 2019: ( error appears with or without familiar added ).
Exception thrown: read access violation.
familiar was 0xFFFFFFFFFFFFFFDD.
Player.cpp: Is returning this:
@EduardoDantas
As i Try to add a new vocation on otservbr editing this files,
"Crusader" Vocation.
Data/lib/core/player.lua ( added):
Lua:
function Player.isCrusader(self)
return table.contains({VOCATION.ID.CRUSADER, VOCATION.ID.CRUSADER}, self:getVocation():getId())
end
Code:
VOCATION = {
ID = {
NONE = 0,
SORCERER = 1,
DRUID = 2,
PALADIN = 3,
KNIGHT = 4,
MASTER_SORCERER = 5,
ELDER_DRUID = 6,
ROYAL_PALADIN = 7,
ELITE_KNIGHT = 8,
CRUSADER = 9
},
CLIENT_ID = {
NONE = 0,
KNIGHT = 1,
PALADIN = 2,
SORCERER = 3,
DRUID = 4,
ELITE_KNIGHT = 11,
ROYAL_PALADIN = 12,
MASTER_SORCERER = 13,
ELDER_DRUID = 14,
CRUSADER = 15
},
BASE_ID = {
NONE = 0,
SORCERER = 1,
DRUID = 2,
PALADIN = 3,
KNIGHT = 4,
CRUSADER = 5
}
}
Data/vocations.xml
Code:
<vocation id="9" clientid="15" baseid="5" name="Crusader" description="a Crusader" magicshield="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="4000" gainhpamount="1" gainmanaticks="6000" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" basespeed="220" soulmax="200" gainsoulticks="15000" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
<skill id="0" multiplier="1.1" />
<skill id="1" multiplier="1.1" />
<skill id="2" multiplier="1.1" />
<skill id="3" multiplier="1.1" />
<skill id="4" multiplier="1.4" />
<skill id="5" multiplier="1.1" />
<skill id="6" multiplier="1.1" />
</vocation>
Website:
Code:
9 => array(
'name' => 'CRUSADER',
'fromVoc' => false
)
// After
9 => array(
'hp' => 15,
'mp' => 5,
'cap' => 25
),
//after
5 => array(
'magic' => 0,
'fist' => 10,
'club' => 10,
'axe' => 10,
'sword' => 10,
'dist' => 10,
'shield' => 10,
'fishing' => 10,
),
When i try enter i got a directly crash of server, debug from visual took me to sources from a 'familiar' code show as error. ( I will post it in many hours).
Familiar i just copy paste the knight familiar and added Id 9
Code:
<familiar vocation="9" lookType="1365" name="Snowbash" premium="yes" unlocked="no" enabled="yes" />
Error Showed on Debug Visual Studio 2019: ( error appears with or without familiar added ).
Exception thrown: read access violation.
familiar was 0xFFFFFFFFFFFFFFDD.
Player.cpp: Is returning this:
Code:
if (familiar.premium && !isPremium()) {
return false;
@EduardoDantas
Last edited: