fix: Removes duplicate UnderTransformation static method (#1383)
This commit is contained in:
parent
a1a50603da
commit
5c6525de46
2 changed files with 8 additions and 9 deletions
|
|
@ -1089,8 +1089,6 @@ namespace Server.Items
|
||||||
public virtual double GetDefendSkillValue(Mobile attacker, Mobile defender) =>
|
public virtual double GetDefendSkillValue(Mobile attacker, Mobile defender) =>
|
||||||
defender.Skills[GetUsedSkill(defender, true)].Value;
|
defender.Skills[GetUsedSkill(defender, true)].Value;
|
||||||
|
|
||||||
private static bool CheckAnimal(Mobile m, Type type) => AnimalForm.UnderTransformation(m, type);
|
|
||||||
|
|
||||||
public virtual bool CheckHit(Mobile attacker, Mobile defender)
|
public virtual bool CheckHit(Mobile attacker, Mobile defender)
|
||||||
{
|
{
|
||||||
var atkWeapon = attacker.Weapon as BaseWeapon;
|
var atkWeapon = attacker.Weapon as BaseWeapon;
|
||||||
|
|
@ -1124,7 +1122,8 @@ namespace Server.Items
|
||||||
bonus += 10; // attacker gets 10% bonus when they're under divine fury
|
bonus += 10; // attacker gets 10% bonus when they're under divine fury
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAnimal(attacker, typeof(GreyWolf)) || CheckAnimal(attacker, typeof(BakeKitsune)))
|
if (AnimalForm.UnderTransformation(attacker, typeof(GreyWolf)) ||
|
||||||
|
AnimalForm.UnderTransformation(attacker, typeof(BakeKitsune)))
|
||||||
{
|
{
|
||||||
bonus += 20; // attacker gets 20% bonus when under Wolf or Bake Kitsune form
|
bonus += 20; // attacker gets 20% bonus when under Wolf or Bake Kitsune form
|
||||||
}
|
}
|
||||||
|
|
@ -2029,7 +2028,8 @@ namespace Server.Items
|
||||||
|
|
||||||
var maChance =
|
var maChance =
|
||||||
(int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitMagicArrow) * propertyBonus);
|
(int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitMagicArrow) * propertyBonus);
|
||||||
var harmChance = (int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitHarm) * propertyBonus);
|
var harmChance =
|
||||||
|
(int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitHarm) * propertyBonus);
|
||||||
var fireballChance =
|
var fireballChance =
|
||||||
(int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitFireball) * propertyBonus);
|
(int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitFireball) * propertyBonus);
|
||||||
var lightningChance =
|
var lightningChance =
|
||||||
|
|
@ -2128,7 +2128,7 @@ namespace Server.Items
|
||||||
// SDI bonus
|
// SDI bonus
|
||||||
damageBonus += AosAttributes.GetValue(attacker, AosAttribute.SpellDamage);
|
damageBonus += AosAttributes.GetValue(attacker, AosAttribute.SpellDamage);
|
||||||
|
|
||||||
if (PsychicAttack.Registry.TryGetValue(attacker,out var timer))
|
if (PsychicAttack.Registry.TryGetValue(attacker, out var timer))
|
||||||
{
|
{
|
||||||
damageBonus -= timer.SpellDamageMalus;
|
damageBonus -= timer.SpellDamageMalus;
|
||||||
}
|
}
|
||||||
|
|
@ -3452,6 +3452,7 @@ namespace Server.Items
|
||||||
queue.Enqueue(m);
|
queue.Enqueue(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eable.Free();
|
eable.Free();
|
||||||
|
|
||||||
if (queue.Count == 0)
|
if (queue.Count == 0)
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ namespace Server.Misc
|
||||||
|
|
||||||
private static bool CheckTransform(Mobile m, Type type) => TransformationSpellHelper.UnderTransformation(m, type);
|
private static bool CheckTransform(Mobile m, Type type) => TransformationSpellHelper.UnderTransformation(m, type);
|
||||||
|
|
||||||
private static bool CheckAnimal(Mobile m, Type type) => AnimalForm.UnderTransformation(m, type);
|
|
||||||
|
|
||||||
private static TimeSpan Mobile_HitsRegenRate(Mobile from)
|
private static TimeSpan Mobile_HitsRegenRate(Mobile from)
|
||||||
{
|
{
|
||||||
var points = AosAttributes.GetValue(from, AosAttribute.RegenHits);
|
var points = AosAttributes.GetValue(from, AosAttribute.RegenHits);
|
||||||
|
|
@ -81,7 +79,7 @@ namespace Server.Misc
|
||||||
points += 20;
|
points += 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAnimal(from, typeof(Dog)) || CheckAnimal(from, typeof(Cat)))
|
if (AnimalForm.UnderTransformation(from, typeof(Dog)) || AnimalForm.UnderTransformation(from, typeof(Cat)))
|
||||||
{
|
{
|
||||||
points += from.Skills.Ninjitsu.Fixed / 30;
|
points += from.Skills.Ninjitsu.Fixed / 30;
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +110,7 @@ namespace Server.Misc
|
||||||
cappedPoints += 15;
|
cappedPoints += 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAnimal(from, typeof(Kirin)))
|
if (AnimalForm.UnderTransformation(from, typeof(Kirin)))
|
||||||
{
|
{
|
||||||
cappedPoints += 20;
|
cappedPoints += 20;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue