• 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!

[8.6]Skill formula - zmiana dmg knighta

karuplnysa

New Member
Joined
Aug 9, 2012
Messages
17
Reaction score
0
Witam. Chciałbym zmienić minimalne obrażenia knighta z broni, jeśli byłby ktoś w stanie pomóc, podać część kodu, która jest za to odpowiedzialna. To bardzo bym prosił i pomoc ; )



Dziękuję i pozdrawiam
 
z czego wiem to w vocation.xml sie ustawia
<formula meleeDamage="1.4" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.2" magDefense="1.0" armor="20.0"/>
<skill fist="1.2" club="1.4" sword="1.4" axe="1.4" distance="1.4" shielding="1.3" fishing="1.2" experience="1.0"/>
ale nie jestem pewien
 
To chyba nie o to chodzi bo w tym co podałeś nie zmienię minimalnych obrażeń. Chodzi mi o kod z pliku combat.ccp o ile to w tym trzeba zmienić ; )
 
Przez pół godziny myślę, że sam byś znalazł. A tym bardziej przez 13 godzin.
 
Jeśli oskryptujesz broń (w weapons.xml), to możesz dowolić zmieniać efekty, obrażenia i ogólnie co ci się podoba tam święcie podoba. Jeśli jednak interesuje się "formuła" na atak z broni o tutaj masz funkcje odpowiedzialną za nią:
PHP:
int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature*, const Item* item, bool maxDamage /*= false*/) const
{
        int32_t attackSkill = player->getWeaponSkill(item), attackValue = std::max((int32_t)0,
                (int32_t(item->getAttack() + item->getExtraAttack()) - item->getElementDamage()));
        float attackFactor = player->getAttackFactor();

        double maxValue = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor);
        if(g_config.getNumber(ConfigManager::CRITICAL_HIT_CHANCE) >= random_range(1, 100))
        {
                maxValue = std::pow(maxValue, g_config.getDouble(ConfigManager::CRITICAL_HIT_MUL));
                player->sendCritical();
        }

        Vocation* vocation = player->getVocation();
        if(vocation && vocation->getMultiplier(MULTIPLIER_MELEE) != 1.0)
                maxValue *= vocation->getMultiplier(MULTIPLIER_MELEE);

        int32_t ret = (int32_t)std::floor(maxValue);
        if(maxDamage)
                return -ret;

        return -random_range(0, ret, DISTRO_NORMAL);
}
 
Back
Top