• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

"Arm" (Armor) formula in Sources TFS 0.4.0

Tadelho

New Member
Joined
Aug 12, 2007
Messages
38
Solutions
1
Reaction score
2
Where do I find in TFS 0.4.0 sources the "Arm" formula for equipments? I'm trying to reformulate the Arm formula in my server, but I'm not sure where it is. All I've found is in "player.cpp" the following code:

C++:
int32_t Player::getArmor() const
{
    int32_t i = SLOT_FIRST, armor = 0;
    for(; i < SLOT_LAST; ++i)
    {
        if(Item* item = getInventoryItem((slots_t)i))
            armor += item->getArmor();
    }
    if(vocation->getMultiplier(MULTIPLIER_ARMOR) != 1.0)
        return int32_t(armor * vocation->getMultiplier(MULTIPLIER_ARMOR));
    return armor;
}

But it seems like there's something else... right?
Thanks!
 
you should look for Creature::blockHit method in creature.cpp, also check if your Player class does not override it. If you want your changes to only apply to players, then you will have to override this method in Player class.
 
Back
Top