Error 502
Advanced OT User
[1.5] add magicDamage in vocation.xml
default------------>
magicDamage="1.2"
vocation.h
[1/4]
searchclass Vocation
C++:
float meleeDamageMultiplier = 1.0f;
add below
C++:
float magicDamageMultiplier = 1.0f;
vocation.cpp
[2/4]
searchbool Vocations::loadFromXml()
C++:
if ((attr = childNode.attribute("distDamage"))) {
voc.distDamageMultiplier = pugi::cast<float>(attr.value());
}
add below
C++:
if ((attr = childNode.attribute("magicDamage"))) {
voc.magicDamageMultiplier = pugi::cast<float>(attr.value());
}
Combat.cpp
[3/4]
CombatDamage Combat::getCombatDamage(Creature* creature, Creature* target) const
search
C++:
int32_t levelFormula = player->getLevel() * 2 + player->getMagicLevel() * 3;
C++:
int32_t levelFormula = (player->getLevel() * 2 + player->getMagicLevel() * 3) * (player->getVocation()->magicDamageMultiplier);
vocations.xml
[4/4]
search
XML:
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
XML:
<formula meleeDamage="1.0" magicDamage="1.2" distDamage="1.0" defense="1.0" armor="1.0" />
the default value is 1.0 , even if you don't put anything
Disclaimer
I'M NOT AN EXPERT IN C++
I'M NOT AN EXPERT IN C++
Another way:
Vocations balance tfs 1.5 7.72
Hello i have this script from some time ago but now have some issues with with getting this worked local pvpvocs = { [1] = { pvp = {weapon = 40.2, spells = 45.0, defense = 1.0}, pve = {weapon = 40.2, spells = 45.0, defense = 50.0}, healing = 50.0 }, [2] = {...
otland.net
The array lua was very long for me, I preferred damage in C++
Last edited: