Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,162 +1,158 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseHealer : BaseVendor
|
||||
{
|
||||
protected override List<SBInfo> SBInfos { get; } = new List<SBInfo>();
|
||||
public abstract class BaseHealer : BaseVendor
|
||||
{
|
||||
private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds(2.0);
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
public override bool IsInvulnerable => false;
|
||||
private DateTime m_NextResurrect;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
public BaseHealer() : base(null)
|
||||
{
|
||||
if (!IsInvulnerable)
|
||||
{
|
||||
AI = AIType.AI_Mage;
|
||||
ActiveSpeed = 0.2;
|
||||
PassiveSpeed = 0.8;
|
||||
RangePerception = DefaultRangePerception;
|
||||
FightMode = FightMode.Aggressor;
|
||||
}
|
||||
|
||||
public BaseHealer() : base( null )
|
||||
{
|
||||
if ( !IsInvulnerable )
|
||||
{
|
||||
AI = AIType.AI_Mage;
|
||||
ActiveSpeed = 0.2;
|
||||
PassiveSpeed = 0.8;
|
||||
RangePerception = DefaultRangePerception;
|
||||
FightMode = FightMode.Aggressor;
|
||||
}
|
||||
SpeechHue = 0;
|
||||
|
||||
SpeechHue = 0;
|
||||
SetStr(304, 400);
|
||||
SetDex(102, 150);
|
||||
SetInt(204, 300);
|
||||
|
||||
SetStr( 304, 400 );
|
||||
SetDex( 102, 150 );
|
||||
SetInt( 204, 300 );
|
||||
SetDamage(10, 23);
|
||||
|
||||
SetDamage( 10, 23 );
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
SetResistance(ResistanceType.Physical, 40, 50);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 40, 50 );
|
||||
SetResistance( ResistanceType.Cold, 40, 50 );
|
||||
SetResistance( ResistanceType.Poison, 40, 50 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
SetSkill(SkillName.Anatomy, 75.0, 97.5);
|
||||
SetSkill(SkillName.EvalInt, 82.0, 100.0);
|
||||
SetSkill(SkillName.Healing, 75.0, 97.5);
|
||||
SetSkill(SkillName.Magery, 82.0, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 82.0, 100.0);
|
||||
SetSkill(SkillName.Tactics, 82.0, 100.0);
|
||||
|
||||
SetSkill( SkillName.Anatomy, 75.0, 97.5 );
|
||||
SetSkill( SkillName.EvalInt, 82.0, 100.0 );
|
||||
SetSkill( SkillName.Healing, 75.0, 97.5 );
|
||||
SetSkill( SkillName.Magery, 82.0, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 82.0, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 82.0, 100.0 );
|
||||
Fame = 1000;
|
||||
Karma = 10000;
|
||||
|
||||
Fame = 1000;
|
||||
Karma = 10000;
|
||||
PackItem(new Bandage(Utility.RandomMinMax(5, 10)));
|
||||
PackItem(new HealPotion());
|
||||
PackItem(new CurePotion());
|
||||
}
|
||||
|
||||
PackItem( new Bandage( Utility.RandomMinMax( 5, 10 ) ) );
|
||||
PackItem( new HealPotion() );
|
||||
PackItem( new CurePotion() );
|
||||
}
|
||||
public BaseHealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Sandals;
|
||||
protected override List<SBInfo> SBInfos{ get; } = new List<SBInfo>();
|
||||
|
||||
public virtual int GetRobeColor()
|
||||
{
|
||||
return Utility.RandomYellowHue();
|
||||
}
|
||||
public override bool IsActiveVendor => false;
|
||||
public override bool IsInvulnerable => false;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
public override VendorShoeType ShoeType => VendorShoeType.Sandals;
|
||||
|
||||
AddItem( new Robe( GetRobeColor() ) );
|
||||
}
|
||||
public virtual bool HealsYoungPlayers => true;
|
||||
|
||||
public virtual bool HealsYoungPlayers => true;
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool CheckResurrect( Mobile m )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual int GetRobeColor()
|
||||
{
|
||||
return Utility.RandomYellowHue();
|
||||
}
|
||||
|
||||
private DateTime m_NextResurrect;
|
||||
private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds( 2.0 );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
public virtual void OfferResurrection( Mobile m )
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
AddItem(new Robe(GetRobeColor()));
|
||||
}
|
||||
|
||||
m.PlaySound(0x1F2);
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
public virtual bool CheckResurrect(Mobile m)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
m.CloseGump( typeof( ResurrectGump ) );
|
||||
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
|
||||
}
|
||||
public virtual void OfferResurrection(Mobile m)
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
public virtual void OfferHeal( PlayerMobile m )
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
m.PlaySound(0x1F2);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
if ( m.CheckYoungHealTime() )
|
||||
{
|
||||
Say( 501229 ); // You look like you need some healing my child.
|
||||
m.CloseGump(typeof(ResurrectGump));
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
|
||||
m.PlaySound( 0x1F2 );
|
||||
m.FixedEffect( 0x376A, 9, 32 );
|
||||
public virtual void OfferHeal(PlayerMobile m)
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.Hits = m.HitsMax;
|
||||
}
|
||||
else
|
||||
{
|
||||
Say( 501228 ); // I can do no more for you at this time.
|
||||
}
|
||||
}
|
||||
if (m.CheckYoungHealTime())
|
||||
{
|
||||
Say(501229); // You look like you need some healing my child.
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
if ( !m.Frozen && DateTime.UtcNow >= m_NextResurrect && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
|
||||
{
|
||||
if ( !m.Alive )
|
||||
{
|
||||
m_NextResurrect = DateTime.UtcNow + ResurrectDelay;
|
||||
m.PlaySound(0x1F2);
|
||||
m.FixedEffect(0x376A, 9, 32);
|
||||
|
||||
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
|
||||
}
|
||||
else if ( CheckResurrect( m ) )
|
||||
{
|
||||
OfferResurrection( m );
|
||||
}
|
||||
}
|
||||
else if ( HealsYoungPlayers && m.Hits < m.HitsMax && m is PlayerMobile mobile && mobile.Young )
|
||||
{
|
||||
OfferHeal( mobile );
|
||||
}
|
||||
}
|
||||
}
|
||||
m.Hits = m.HitsMax;
|
||||
}
|
||||
else
|
||||
{
|
||||
Say(501228); // I can do no more for you at this time.
|
||||
}
|
||||
}
|
||||
|
||||
public BaseHealer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (!m.Frozen && DateTime.UtcNow >= m_NextResurrect && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (!m.Alive)
|
||||
{
|
||||
m_NextResurrect = DateTime.UtcNow + ResurrectDelay;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
}
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
else if (CheckResurrect(m)) OfferResurrection(m);
|
||||
}
|
||||
else if (HealsYoungPlayers && m.Hits < m.HitsMax && m is PlayerMobile mobile && mobile.Young)
|
||||
{
|
||||
OfferHeal(mobile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
}
|
||||
|
||||
if ( !IsInvulnerable )
|
||||
{
|
||||
AI = AIType.AI_Mage;
|
||||
ActiveSpeed = 0.2;
|
||||
PassiveSpeed = 0.8;
|
||||
RangePerception = DefaultRangePerception;
|
||||
FightMode = FightMode.Aggressor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (!IsInvulnerable)
|
||||
{
|
||||
AI = AIType.AI_Mage;
|
||||
ActiveSpeed = 0.2;
|
||||
PassiveSpeed = 0.8;
|
||||
RangePerception = DefaultRangePerception;
|
||||
FightMode = FightMode.Aggressor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,67 +1,67 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class EvilHealer : BaseHealer
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class EvilHealer : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public EvilHealer()
|
||||
{
|
||||
Title = "the healer";
|
||||
|
||||
public override bool CheckTeach( SkillName skill, Mobile from )
|
||||
{
|
||||
if ( !base.CheckTeach( skill, from ) )
|
||||
return false;
|
||||
Karma = -10000;
|
||||
|
||||
return ( skill == SkillName.Forensics )
|
||||
|| ( skill == SkillName.Healing )
|
||||
|| ( skill == SkillName.SpiritSpeak )
|
||||
|| ( skill == SkillName.Swords );
|
||||
}
|
||||
SetSkill(SkillName.Forensics, 80.0, 100.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
|
||||
SetSkill(SkillName.Swords, 80.0, 100.0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EvilHealer()
|
||||
{
|
||||
Title = "the healer";
|
||||
public EvilHealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
Karma = -10000;
|
||||
public override bool CanTeach => true;
|
||||
|
||||
SetSkill( SkillName.Forensics, 80.0, 100.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Swords, 80.0, 100.0 );
|
||||
}
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool IsActiveVendor => true;
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool CheckTeach(SkillName skill, Mobile from)
|
||||
{
|
||||
if (!base.CheckTeach(skill, from))
|
||||
return false;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add( new SBHealer() );
|
||||
}
|
||||
return skill == SkillName.Forensics
|
||||
|| skill == SkillName.Healing
|
||||
|| skill == SkillName.SpiritSpeak
|
||||
|| skill == SkillName.Swords;
|
||||
}
|
||||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( Core.AOS && m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add(new SBHealer());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override bool CheckResurrect(Mobile m)
|
||||
{
|
||||
if (Core.AOS && m.Criminal)
|
||||
{
|
||||
Say(501222); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
public EvilHealer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,76 +2,76 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EvilWanderingHealer : BaseHealer
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class EvilWanderingHealer : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public EvilWanderingHealer()
|
||||
{
|
||||
Title = Core.AOS ? "the Priest Of Mondain" : "the evil wandering healer";
|
||||
Karma = -10000;
|
||||
|
||||
public override bool CheckTeach( SkillName skill, Mobile from )
|
||||
{
|
||||
if ( !base.CheckTeach( skill, from ) )
|
||||
return false;
|
||||
AddItem(new GnarledStaff());
|
||||
|
||||
return ( skill == SkillName.Anatomy )
|
||||
|| ( skill == SkillName.Camping )
|
||||
|| ( skill == SkillName.Forensics )
|
||||
|| ( skill == SkillName.Healing )
|
||||
|| ( skill == SkillName.SpiritSpeak );
|
||||
}
|
||||
SetSkill(SkillName.Camping, 80.0, 100.0);
|
||||
SetSkill(SkillName.Forensics, 80.0, 100.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EvilWanderingHealer()
|
||||
{
|
||||
Title = ( Core.AOS ) ? "the Priest Of Mondain" : "the evil wandering healer";
|
||||
Karma = -10000;
|
||||
public EvilWanderingHealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
AddItem( new GnarledStaff() );
|
||||
public override bool CanTeach => true;
|
||||
|
||||
SetSkill( SkillName.Camping, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Forensics, 80.0, 100.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 80.0, 100.0 );
|
||||
}
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool ClickTitle => false; // Do not display title in OnSingleClick
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool ClickTitle => false; // Do not display title in OnSingleClick
|
||||
public override bool CheckTeach(SkillName skill, Mobile from)
|
||||
{
|
||||
if (!base.CheckTeach(skill, from))
|
||||
return false;
|
||||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( Core.AOS && m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
return skill == SkillName.Anatomy
|
||||
|| skill == SkillName.Camping
|
||||
|| skill == SkillName.Forensics
|
||||
|| skill == SkillName.Healing
|
||||
|| skill == SkillName.SpiritSpeak;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override bool CheckResurrect(Mobile m)
|
||||
{
|
||||
if (Core.AOS && m.Criminal)
|
||||
{
|
||||
Say(501222); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( Utility.RandomDouble() < 0.5 )
|
||||
c.DropItem( new FragmentOfAMap() );
|
||||
}
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
public EvilWanderingHealer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (Utility.RandomDouble() < 0.5)
|
||||
c.DropItem(new FragmentOfAMap());
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version < 1 && Title == "the wandering healer" && Core.AOS )
|
||||
Title = "the priest of Mondain";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (version < 1 && Title == "the wandering healer" && Core.AOS)
|
||||
Title = "the priest of Mondain";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,76 +2,82 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class FortuneTeller : BaseHealer
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class FortuneTeller : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public FortuneTeller()
|
||||
{
|
||||
Title = "the fortune teller";
|
||||
|
||||
public override bool CheckTeach( SkillName skill, Mobile from )
|
||||
{
|
||||
if ( !base.CheckTeach( skill, from ) )
|
||||
return false;
|
||||
SetSkill(SkillName.Anatomy, 85.0, 100.0);
|
||||
SetSkill(SkillName.Healing, 90.0, 100.0);
|
||||
SetSkill(SkillName.Forensics, 75.0, 98.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 65.0, 88.0);
|
||||
}
|
||||
|
||||
return ( skill == SkillName.Anatomy )
|
||||
|| ( skill == SkillName.Healing )
|
||||
|| ( skill == SkillName.Forensics )
|
||||
|| ( skill == SkillName.SpiritSpeak );
|
||||
}
|
||||
public FortuneTeller(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FortuneTeller()
|
||||
{
|
||||
Title = "the fortune teller";
|
||||
public override bool CanTeach => true;
|
||||
|
||||
SetSkill( SkillName.Anatomy, 85.0, 100.0 );
|
||||
SetSkill( SkillName.Healing, 90.0, 100.0 );
|
||||
SetSkill( SkillName.Forensics, 75.0, 98.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 65.0, 88.0 );
|
||||
}
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool IsInvulnerable => true;
|
||||
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool IsInvulnerable => true;
|
||||
public override bool CheckTeach(SkillName skill, Mobile from)
|
||||
{
|
||||
if (!base.CheckTeach(skill, from))
|
||||
return false;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add( new SBMage() );
|
||||
SBInfos.Add( new SBFortuneTeller() );
|
||||
}
|
||||
return skill == SkillName.Anatomy
|
||||
|| skill == SkillName.Healing
|
||||
|| skill == SkillName.Forensics
|
||||
|| skill == SkillName.SpiritSpeak;
|
||||
}
|
||||
|
||||
public override int GetRobeColor()
|
||||
{
|
||||
return Utility.RandomBrightHue();
|
||||
}
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add(new SBMage());
|
||||
SBInfos.Add(new SBFortuneTeller());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
public override int GetRobeColor()
|
||||
{
|
||||
return Utility.RandomBrightHue();
|
||||
}
|
||||
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
|
||||
case 1: AddItem( new WizardsHat( Utility.RandomBrightHue() ) ); break;
|
||||
case 2: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
|
||||
}
|
||||
public override void InitOutfit()
|
||||
{
|
||||
base.InitOutfit();
|
||||
|
||||
AddItem( new Spellbook() );
|
||||
}
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new SkullCap(Utility.RandomBrightHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new WizardsHat(Utility.RandomBrightHue()));
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new Bandana(Utility.RandomBrightHue()));
|
||||
break;
|
||||
}
|
||||
|
||||
public FortuneTeller( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
AddItem(new Spellbook());
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,81 +1,80 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Healer : BaseHealer
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class Healer : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public Healer()
|
||||
{
|
||||
Title = "the healer";
|
||||
|
||||
public override bool CheckTeach( SkillName skill, Mobile from )
|
||||
{
|
||||
if ( !base.CheckTeach( skill, from ) )
|
||||
return false;
|
||||
if (!Core.AOS)
|
||||
NameHue = 0x35;
|
||||
|
||||
return ( skill == SkillName.Forensics )
|
||||
|| ( skill == SkillName.Healing )
|
||||
|| ( skill == SkillName.SpiritSpeak )
|
||||
|| ( skill == SkillName.Swords );
|
||||
}
|
||||
SetSkill(SkillName.Forensics, 80.0, 100.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
|
||||
SetSkill(SkillName.Swords, 80.0, 100.0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Healer()
|
||||
{
|
||||
Title = "the healer";
|
||||
public Healer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
if ( !Core.AOS )
|
||||
NameHue = 0x35;
|
||||
public override bool CanTeach => true;
|
||||
|
||||
SetSkill( SkillName.Forensics, 80.0, 100.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Swords, 80.0, 100.0 );
|
||||
}
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool IsInvulnerable => true;
|
||||
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool IsInvulnerable => true;
|
||||
public override bool CheckTeach(SkillName skill, Mobile from)
|
||||
{
|
||||
if (!base.CheckTeach(skill, from))
|
||||
return false;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add( new SBHealer() );
|
||||
}
|
||||
return skill == SkillName.Forensics
|
||||
|| skill == SkillName.Healing
|
||||
|| skill == SkillName.SpiritSpeak
|
||||
|| skill == SkillName.Swords;
|
||||
}
|
||||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
SBInfos.Add(new SBHealer());
|
||||
}
|
||||
|
||||
if ( m.Kills >= 5 )
|
||||
{
|
||||
Say( 501223 ); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
if ( m.Karma < 0 )
|
||||
{
|
||||
Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
}
|
||||
public override bool CheckResurrect(Mobile m)
|
||||
{
|
||||
if (m.Criminal)
|
||||
{
|
||||
Say(501222); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
if (m.Kills >= 5)
|
||||
{
|
||||
Say(501223); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
public Healer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (m.Karma < 0)
|
||||
Say(501224); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
return true;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if ( Core.AOS && NameHue == 0x35 )
|
||||
NameHue = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Core.AOS && NameHue == 0x35)
|
||||
NameHue = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,76 +2,76 @@ using Server.Gumps;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PricedHealer : BaseHealer
|
||||
{
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Price { get; set; }
|
||||
public class PricedHealer : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public PricedHealer() : this(5000)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PricedHealer() : this( 5000 )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public PricedHealer(int price)
|
||||
{
|
||||
Price = price;
|
||||
|
||||
[Constructible]
|
||||
public PricedHealer( int price )
|
||||
{
|
||||
Price = price;
|
||||
if (!Core.AOS)
|
||||
NameHue = 0x35;
|
||||
}
|
||||
|
||||
if ( !Core.AOS )
|
||||
NameHue = 0x35;
|
||||
}
|
||||
public PricedHealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsInvulnerable => true;
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Price{ get; set; }
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
public override bool IsInvulnerable => true;
|
||||
|
||||
public override bool HealsYoungPlayers => false;
|
||||
public override bool HealsYoungPlayers => false;
|
||||
|
||||
public override void OfferResurrection( Mobile m )
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
public override void OfferResurrection(Mobile m)
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.CloseGump( typeof( ResurrectGump ) );
|
||||
m.SendGump( new ResurrectGump( m, this, Price ) );
|
||||
}
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
m.CloseGump(typeof(ResurrectGump));
|
||||
m.SendGump(new ResurrectGump(m, this, Price));
|
||||
}
|
||||
|
||||
public PricedHealer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool CheckResurrect(Mobile m)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write( (int) Price );
|
||||
}
|
||||
writer.Write(Price);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Price = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Price = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,73 +2,72 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class WanderingHealer : BaseHealer
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class WanderingHealer : BaseHealer
|
||||
{
|
||||
[Constructible]
|
||||
public WanderingHealer()
|
||||
{
|
||||
Title = "the wandering healer";
|
||||
|
||||
public override bool CheckTeach( SkillName skill, Mobile from )
|
||||
{
|
||||
if ( !base.CheckTeach( skill, from ) )
|
||||
return false;
|
||||
AddItem(new GnarledStaff());
|
||||
|
||||
return ( skill == SkillName.Anatomy )
|
||||
|| ( skill == SkillName.Camping )
|
||||
|| ( skill == SkillName.Forensics )
|
||||
|| ( skill == SkillName.Healing )
|
||||
|| ( skill == SkillName.SpiritSpeak );
|
||||
}
|
||||
SetSkill(SkillName.Camping, 80.0, 100.0);
|
||||
SetSkill(SkillName.Forensics, 80.0, 100.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WanderingHealer()
|
||||
{
|
||||
Title = "the wandering healer";
|
||||
public WanderingHealer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
AddItem( new GnarledStaff() );
|
||||
public override bool CanTeach => true;
|
||||
|
||||
SetSkill( SkillName.Camping, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Forensics, 80.0, 100.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 80.0, 100.0 );
|
||||
}
|
||||
public override bool ClickTitle => false; // Do not display title in OnSingleClick
|
||||
|
||||
public override bool ClickTitle => false; // Do not display title in OnSingleClick
|
||||
public override bool CheckTeach(SkillName skill, Mobile from)
|
||||
{
|
||||
if (!base.CheckTeach(skill, from))
|
||||
return false;
|
||||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
return skill == SkillName.Anatomy
|
||||
|| skill == SkillName.Camping
|
||||
|| skill == SkillName.Forensics
|
||||
|| skill == SkillName.Healing
|
||||
|| skill == SkillName.SpiritSpeak;
|
||||
}
|
||||
|
||||
if ( m.Kills >= 5 )
|
||||
{
|
||||
Say( 501223 ); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
if ( m.Karma < 0 )
|
||||
{
|
||||
Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
}
|
||||
public override bool CheckResurrect(Mobile m)
|
||||
{
|
||||
if (m.Criminal)
|
||||
{
|
||||
Say(501222); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
if (m.Kills >= 5)
|
||||
{
|
||||
Say(501223); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
public WanderingHealer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (m.Karma < 0)
|
||||
Say(501224); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
return true;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue