Hi all,
Straight to the point, in the weapons.cpp //TFS142// there's:
I've tried changing this
player->getWeaponSkill //at first we get what skill is used by the weapon
player->getSkillLevel//then we get the skill level for that weapon
& then return the value for further calculations of hitchance
Tried 10 different ways and failed, each time something goes wrong (for example, when attacking with a bow we get formula from fist fighting, lol)
Could anyone please help?
Thank you in advance!
Straight to the point, in the weapons.cpp //TFS142// there's:
C++:
int32_t chance;
if (it.hitChance == 0) {
//hit chance is based on distance to target and distance skill
uint32_t skill = player->getSkillLevel(SKILL_DISTANCE);
const Position& playerPos = player->getPosition();
const Position& targetPos = target->getPosition();
uint32_t distance = std::max<uint32_t>(Position::getDistanceX(playerPos, targetPos), Position::getDistanceY(playerPos, targetPos));
I've tried changing this
To work differently, i.e.uint32_t skill = player->getSkillLevel(SKILL_DISTANCE);
player->getWeaponSkill //at first we get what skill is used by the weapon
player->getSkillLevel//then we get the skill level for that weapon
& then return the value for further calculations of hitchance
Tried 10 different ways and failed, each time something goes wrong (for example, when attacking with a bow we get formula from fist fighting, lol)
Could anyone please help?
Thank you in advance!
Last edited: