- Хроники
- Master Class
- Исходники
- Присутствуют
- Сборка
- L2jMobius
Hello guys.
I'm working in one skill for make extra damage to Undeads only.
I follow Gladiator skills that grants extra dmg to bugs, plants, etc.
The problem is. UNDEAD_WEAKNESS are not working on undeads, BUT, BEAST are working in all type of mobs.
I find in server side the code i beliave be the responsable for all weakness in Formulas.java
Any tip helps, ty for all.
I'm working in one skill for make extra damage to Undeads only.
I follow Gladiator skills that grants extra dmg to bugs, plants, etc.
The problem is. UNDEAD_WEAKNESS are not working on undeads, BUT, BEAST are working in all type of mobs.
I find in server side the code i beliave be the responsable for all weakness in Formulas.java
Java:
public static double calcWeaknessBonus(Creature attacker, Creature target, TraitType traitType)
{
double result = 1;
for (TraitType trait : TraitType.getAllWeakness())
{
if ((traitType != trait) && target.getStat().hasDefenceTrait(trait) && attacker.getStat().hasAttackTrait(trait) && !target.getStat().isInvulnerableTrait(traitType))
{
result *= Math.max(attacker.getStat().getAttackTrait(trait) - target.getStat().getDefenceTrait(trait), 0.05);
}
}
return result;
}
Any tip helps, ty for all.