Untitled diff

Created Diff never expires
1 removal
13 lines
1 addition
13 lines
int32_t WeaponMelee::getElementDamage(const Player* player, const Creature*, const Item* item) const
int32_t WeaponMelee::getElementDamage(const Player* player, const Creature*, const Item* item) const
{
{
if (elementType == COMBAT_NONE) {
if (elementType == COMBAT_NONE) {
return 0;
return 0;
}
}


int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackValue = elementDamage;
int32_t attackValue = elementDamage;
float attackFactor = player->getAttackFactor();
float attackFactor = player->getAttackFactor();


int32_t maxValue = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor);
int32_t maxValue = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, player->getPassiveDamageBonus());
return -normal_random(0, static_cast<int32_t>(maxValue * player->getVocation()->meleeDamageMultiplier));
return -normal_random(0, static_cast<int32_t>(maxValue * player->getVocation()->meleeDamageMultiplier));
}
}