Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -77,7 +77,7 @@ namespace Server.Mobiles
Direction = GetDirectionTo(from);
from.PlaySound(0x1F2);
from.FixedEffect(0x376A, 10, 16);
from.CloseGump(typeof(ResurrectGump));
from.CloseGump<ResurrectGump>();
from.SendGump(new ResurrectGump(from, ResurrectMessage.Healer));
}
}

View file

@ -47,8 +47,8 @@ namespace Server.Mobiles
SetSkill(SkillName.MagicResist, level);
SetSkill(SkillName.Wrestling, level);
SetSkill(SkillName.Anatomy, caster.Skills[SkillName.Anatomy].Value / 2);
SetSkill(SkillName.Tactics, caster.Skills[SkillName.Tactics].Value / 2);
SetSkill(SkillName.Anatomy, caster.Skills.Anatomy.Value / 2);
SetSkill(SkillName.Tactics, caster.Skills.Tactics.Value / 2);
Fame = 0;
Karma = 0;

View file

@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Server.Mobiles
{
@ -42,8 +44,7 @@ namespace Server.Mobiles
ControlSlots = Core.SE ? 2 : 1;
}
public BladeSpirits(Serial serial)
: base(serial)
public BladeSpirits(Serial serial) : base(serial)
{
}
@ -61,7 +62,7 @@ namespace Server.Mobiles
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
{
return (m.Str + m.Skills[SkillName.Tactics].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
return (m.Str + m.Skills.Tactics.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
}
public override int GetAngerSound()
@ -83,18 +84,17 @@ namespace Server.Mobiles
{
if (Core.SE && Summoned)
{
ArrayList spirtsOrVortexes = new ArrayList();
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
List<Mobile> spiritsOrVortexes = eable
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
foreach (Mobile m in GetMobilesInRange(5))
if (m is EnergyVortex || m is BladeSpirits)
if (((BaseCreature)m).Summoned)
spirtsOrVortexes.Add(m);
eable.Free();
while (spirtsOrVortexes.Count > 6)
while (spiritsOrVortexes.Count > 6)
{
int index = Utility.Random(spirtsOrVortexes.Count);
Dispel((Mobile)spirtsOrVortexes[index]);
spirtsOrVortexes.RemoveAt(index);
int index = Utility.Random(spiritsOrVortexes.Count);
Dispel(spiritsOrVortexes[index]);
spiritsOrVortexes.RemoveAt(index);
}
}
@ -115,4 +115,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Server.Mobiles
{
@ -70,7 +72,7 @@ namespace Server.Mobiles
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
{
return (m.Int + m.Skills[SkillName.Magery].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
return (m.Int + m.Skills.Magery.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
}
public override int GetAngerSound()
@ -87,19 +89,17 @@ namespace Server.Mobiles
{
if (Core.SE && Summoned)
{
ArrayList spirtsOrVortexes = new ArrayList();
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
List<Mobile> spiritsOrVortexes = eable
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
foreach (Mobile m in GetMobilesInRange(5))
if (m is EnergyVortex || m is BladeSpirits)
if (((BaseCreature)m).Summoned)
spirtsOrVortexes.Add(m);
eable.Free();
while (spirtsOrVortexes.Count > 6)
while (spiritsOrVortexes.Count > 6)
{
int index = Utility.Random(spirtsOrVortexes.Count);
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
Dispel((Mobile)spirtsOrVortexes[index]);
spirtsOrVortexes.RemoveAt(index);
int index = Utility.Random(spiritsOrVortexes.Count);
Dispel(spiritsOrVortexes[index]);
spiritsOrVortexes.RemoveAt(index);
}
}
@ -123,4 +123,4 @@ namespace Server.Mobiles
BaseSoundID = 0;
}
}
}
}

View file

@ -175,20 +175,16 @@ namespace Server.Mobiles
if (defender.Alive)
{
defender.Frozen = true;
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Recover_Callback), defender);
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Recover_Callback, defender);
}
}
}
private void Recover_Callback(object state)
private void Recover_Callback(Mobile defender)
{
if (state is Mobile defender)
{
defender.Frozen = false;
defender.Combatant = null;
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
}
defender.Frozen = false;
defender.Combatant = null;
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
m_Stunning = false;
}