Fixes chaos damage bug with the spell system. Fixes various small other bugs. Fixes more merge cast type checks and uses default values.

This commit is contained in:
Kamron Batman 2018-09-16 21:04:36 -07:00
parent 9542c79ea4
commit c155c82325
115 changed files with 644 additions and 1041 deletions

View file

@ -54,13 +54,10 @@ namespace Server.Spells.Chivalry
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = targets[i];
BaseCreature bc = m as BaseCreature;
if (bc != null)
if (m is BaseCreature bc)
{
bool dispellable = bc.Summoned && !bc.IsAnimatedDead;
if (dispellable)
if (bc.Summoned && !bc.IsAnimatedDead)
{
double dispelChance = (50.0 + 100 * (chiv - bc.DispelDifficulty) / (bc.DispelFocus * 2)) / 100;
dispelChance *= dispelSkill / 100.0;