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

@ -30,7 +30,7 @@ namespace Server.Spells.Spellweaving
return false;
}
if (!Caster.CanBeginAction(typeof(AttuneWeaponSpell)))
if (!Caster.CanBeginAction<AttuneWeaponSpell>())
{
Caster.SendLocalizedMessage(1075124); // You must wait before casting that spell again.
return false;
@ -47,7 +47,7 @@ namespace Server.Spells.Spellweaving
Caster.FixedParticles(0x3728, 1, 13, 0x26B8, 0x455, 7, EffectLayer.Waist);
Caster.FixedParticles(0x3779, 1, 15, 0x251E, 0x3F, 7, EffectLayer.Waist);
double skill = Caster.Skills[SkillName.Spellweaving].Value;
double skill = Caster.Skills.Spellweaving.Value;
int damageAbsorb = (int)(18 + (skill - 10) / 10 * 3 + FocusLevel * 6);
Caster.MeleeDamageAbsorb = damageAbsorb;
@ -59,7 +59,7 @@ namespace Server.Spells.Spellweaving
m_Table[Caster] = t;
Caster.BeginAction(typeof(AttuneWeaponSpell));
Caster.BeginAction<AttuneWeaponSpell>();
BuffInfo.AddBuff(Caster,
new BuffInfo(BuffIcon.AttuneWeapon, 1075798, duration, Caster, damageAbsorb.ToString()));
@ -124,7 +124,7 @@ namespace Server.Spells.Spellweaving
m_Table.Remove(m_Mobile);
DelayCall(TimeSpan.FromSeconds(120), delegate { m_Mobile.EndAction(typeof(AttuneWeaponSpell)); });
DelayCall(TimeSpan.FromSeconds(120), delegate { m_Mobile.EndAction<AttuneWeaponSpell>(); });
BuffInfo.RemoveBuff(m_Mobile, BuffIcon.AttuneWeapon);
}
}

View file

@ -27,7 +27,7 @@ namespace Server.Spells.Spellweaving
int range = 5 + FocusLevel;
int damage = 25 + FocusLevel;
double skill = Caster.Skills[SkillName.Spellweaving].Value;
double skill = Caster.Skills.Spellweaving.Value;
TimeSpan duration = TimeSpan.FromSeconds((int)(skill / 24) + FocusLevel);

View file

@ -35,7 +35,7 @@ namespace Server.Spells.Spellweaving
{
if (TransformationSpellHelper.UnderTransformation(Caster, typeof(EtherealVoyageSpell)))
Caster.SendLocalizedMessage(501775); // This spell is already in effect.
else if (!Caster.CanBeginAction(typeof(EtherealVoyageSpell)))
else if (!Caster.CanBeginAction<EtherealVoyageSpell>())
Caster.SendLocalizedMessage(1075124); // You must wait before casting that spell again.
else if (Caster.Combatant != null)
Caster.SendLocalizedMessage(1072586); // You cannot cast Ethereal Voyage while you are in combat.
@ -68,7 +68,7 @@ namespace Server.Spells.Spellweaving
TransformationSpellHelper.RemoveContext(m, true);
Timer.DelayCall(TimeSpan.FromMinutes(5), delegate { m.EndAction(typeof(EtherealVoyageSpell)); });
Timer.DelayCall(TimeSpan.FromMinutes(5), delegate { m.EndAction<EtherealVoyageSpell>(); });
BuffInfo.RemoveBuff(m, BuffIcon.EtherealVoyage);
}

View file

@ -72,7 +72,7 @@ namespace Server.Spells.Spellweaving
m.FixedParticles(0x3709, 1, 30, 0x26ED, 5, 2, EffectLayer.Waist);
m.FixedParticles(0x376A, 1, 30, 0x251E, 5, 3, EffectLayer.Waist);
double skill = Caster.Skills[SkillName.Spellweaving].Value;
double skill = Caster.Skills.Spellweaving.Value;
TimeSpan duration = TimeSpan.FromMinutes((int)(skill / 24) * 2 + FocusLevel);
@ -105,7 +105,7 @@ namespace Server.Spells.Spellweaving
if (master?.NetState != null && Utility.InUpdateRange(pet, master))
{
master.CloseGump(typeof(PetResurrectGump));
master.CloseGump<PetResurrectGump>();
master.SendGump(new PetResurrectGump(master, pet, hitsScalar));
}
else
@ -118,7 +118,7 @@ namespace Server.Spells.Spellweaving
if (friend.NetState != null && Utility.InUpdateRange(pet, friend))
{
friend.CloseGump(typeof(PetResurrectGump));
friend.CloseGump<PetResurrectGump>();
friend.SendGump(new PetResurrectGump(friend, pet));
break;
}
@ -127,7 +127,7 @@ namespace Server.Spells.Spellweaving
}
else
{
m.CloseGump(typeof(ResurrectGump));
m.CloseGump<ResurrectGump>();
m.SendGump(new ResurrectGump(m, hitsScalar));
}

View file

@ -35,7 +35,7 @@ namespace Server.Spells.Spellweaving
{
Caster.SendLocalizedMessage(501775); // This spell is already in effect.
}
else if (!Caster.CanBeginAction(typeof(GiftOfRenewalSpell)))
else if (!Caster.CanBeginAction<GiftOfRenewalSpell>())
{
Caster.SendLocalizedMessage(501789); // You must wait before trying again.
}
@ -52,7 +52,7 @@ namespace Server.Spells.Spellweaving
}
else
{
double skill = Caster.Skills[SkillName.Spellweaving].Value;
double skill = Caster.Skills.Spellweaving.Value;
int hitsPerRound = 5 + (int)(skill / 24) + FocusLevel;
TimeSpan duration = TimeSpan.FromSeconds(30 + FocusLevel * 10);
@ -72,7 +72,7 @@ namespace Server.Spells.Spellweaving
m_Table[m] = info;
Caster.BeginAction(typeof(GiftOfRenewalSpell));
Caster.BeginAction<GiftOfRenewalSpell>();
BuffInfo.AddBuff(m,
new BuffInfo(BuffIcon.GiftOfRenewal, 1031602, 1075797, duration, m, hitsPerRound.ToString()));
@ -91,7 +91,7 @@ namespace Server.Spells.Spellweaving
info.m_Timer.Stop();
BuffInfo.RemoveBuff(m, BuffIcon.GiftOfRenewal);
Timer.DelayCall(TimeSpan.FromSeconds(60), delegate { info.m_Caster.EndAction(typeof(GiftOfRenewalSpell)); });
Timer.DelayCall(TimeSpan.FromSeconds(60), delegate { info.m_Caster.EndAction<GiftOfRenewalSpell>(); });
return true;
}

View file

@ -50,7 +50,7 @@ namespace Server.Spells.Spellweaving
if (map == null)
return;
HouseRegion r = Region.Find(p, map).GetRegion(typeof(HouseRegion)) as HouseRegion;
HouseRegion r = Region.Find(p, map).GetRegion<HouseRegion>();
if (r?.House != null && !r.House.IsFriend(Caster))
return;

View file

@ -28,7 +28,7 @@ namespace Server.Spells.Spellweaving
{
Caster.PlaySound(0x5CE);
double skill = Caster.Skills[SkillName.Spellweaving].Value;
double skill = Caster.Skills.Spellweaving.Value;
int damage = Math.Max(11, 10 + (int)(skill / 24)) + FocusLevel;