Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -20,27 +20,21 @@ namespace Server
|
|||
Timer.DelayCall(TimeSpan.Zero, pm.ResendBuffs);
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public BuffIcon ID { get; }
|
||||
|
||||
public BuffIcon ID{ get; }
|
||||
public int TitleCliloc { get; }
|
||||
|
||||
public int TitleCliloc{ get; }
|
||||
public int SecondaryCliloc { get; }
|
||||
|
||||
public int SecondaryCliloc{ get; }
|
||||
public TimeSpan TimeLength { get; }
|
||||
|
||||
public TimeSpan TimeLength{ get; }
|
||||
public DateTime TimeStart { get; }
|
||||
|
||||
public DateTime TimeStart{ get; }
|
||||
public Timer Timer { get; }
|
||||
|
||||
public Timer Timer{ get; }
|
||||
public bool RetainThroughDeath { get; }
|
||||
|
||||
public bool RetainThroughDeath{ get; }
|
||||
|
||||
public TextDefinition Args{ get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public TextDefinition Args { get; }
|
||||
|
||||
public BuffInfo(BuffIcon iconID, int titleCliloc)
|
||||
: this(iconID, titleCliloc, titleCliloc + 1)
|
||||
|
|
@ -59,14 +53,14 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
//Only the timed one needs to Mobile to know when to automagically remove it.
|
||||
// Only the timed one needs to Mobile to know when to automagically remove it.
|
||||
public BuffInfo(BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m)
|
||||
: this(iconID, titleCliloc, secondaryCliloc)
|
||||
{
|
||||
TimeLength = length;
|
||||
TimeStart = DateTime.UtcNow;
|
||||
|
||||
Timer = Timer.DelayCall(length, delegate
|
||||
Timer = Timer.DelayCall(length, () =>
|
||||
{
|
||||
if (!(m is PlayerMobile pm))
|
||||
return;
|
||||
|
|
@ -75,7 +69,6 @@ namespace Server
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
public BuffInfo(BuffIcon iconID, int titleCliloc, TextDefinition args)
|
||||
: this(iconID, titleCliloc, titleCliloc + 1, args)
|
||||
{
|
||||
|
|
@ -127,10 +120,6 @@ namespace Server
|
|||
RetainThroughDeath = retainThroughDeath;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Convenience Methods
|
||||
|
||||
public static void AddBuff(Mobile m, BuffInfo b)
|
||||
{
|
||||
if (m is PlayerMobile pm)
|
||||
|
|
@ -148,8 +137,6 @@ namespace Server
|
|||
if (m is PlayerMobile pm)
|
||||
pm.RemoveBuff(b);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public enum BuffIcon : short
|
||||
|
|
@ -157,51 +144,51 @@ namespace Server
|
|||
DismountPrevention = 0x3E9,
|
||||
NoRearm = 0x3EA,
|
||||
|
||||
//Currently, no 0x3EB or 0x3EC
|
||||
NightSight = 0x3ED, //*
|
||||
// Currently, no 0x3EB or 0x3EC
|
||||
NightSight = 0x3ED, // *
|
||||
DeathStrike,
|
||||
EvilOmen,
|
||||
UnknownStandingSwirl, //Which is healing throttle & Stamina throttle?
|
||||
UnknownStandingSwirl, // Which is healing throttle & Stamina throttle?
|
||||
UnknownKneelingSword,
|
||||
DivineFury, //*
|
||||
EnemyOfOne, //*
|
||||
HidingAndOrStealth, //*
|
||||
ActiveMeditation, //*
|
||||
BloodOathCaster, //*
|
||||
BloodOathCurse, //*
|
||||
CorpseSkin, //*
|
||||
Mindrot, //*
|
||||
PainSpike, //*
|
||||
DivineFury, // *
|
||||
EnemyOfOne, // *
|
||||
HidingAndOrStealth, // *
|
||||
ActiveMeditation, // *
|
||||
BloodOathCaster, // *
|
||||
BloodOathCurse, // *
|
||||
CorpseSkin, // *
|
||||
Mindrot, // *
|
||||
PainSpike, // *
|
||||
Strangle,
|
||||
GiftOfRenewal, //*
|
||||
AttuneWeapon, //*
|
||||
Thunderstorm, //*
|
||||
EssenceOfWind, //*
|
||||
EtherealVoyage, //*
|
||||
GiftOfLife, //*
|
||||
ArcaneEmpowerment, //*
|
||||
GiftOfRenewal, // *
|
||||
AttuneWeapon, // *
|
||||
Thunderstorm, // *
|
||||
EssenceOfWind, // *
|
||||
EtherealVoyage, // *
|
||||
GiftOfLife, // *
|
||||
ArcaneEmpowerment, // *
|
||||
MortalStrike,
|
||||
ReactiveArmor, //*
|
||||
Protection, //*
|
||||
ReactiveArmor, // *
|
||||
Protection, // *
|
||||
ArchProtection,
|
||||
MagicReflection, //*
|
||||
Incognito, //*
|
||||
MagicReflection, // *
|
||||
Incognito, // *
|
||||
Disguised,
|
||||
AnimalForm,
|
||||
Polymorph,
|
||||
Invisibility, //*
|
||||
Paralyze, //*
|
||||
Invisibility, // *
|
||||
Paralyze, // *
|
||||
Poison,
|
||||
Bleed,
|
||||
Clumsy, //*
|
||||
FeebleMind, //*
|
||||
Weaken, //*
|
||||
Curse, //*
|
||||
Clumsy, // *
|
||||
FeebleMind, // *
|
||||
Weaken, // *
|
||||
Curse, // *
|
||||
MassCurse,
|
||||
Agility, //*
|
||||
Cunning, //*
|
||||
Strength, //*
|
||||
Bless, //*
|
||||
Agility, // *
|
||||
Cunning, // *
|
||||
Strength, // *
|
||||
Bless, // *
|
||||
Sleep,
|
||||
StoneForm,
|
||||
SpellPlague,
|
||||
|
|
@ -225,44 +212,43 @@ namespace Server
|
|||
bool hasArgs = args != null;
|
||||
|
||||
EnsureCapacity(hasArgs ? 48 + args.ToString().Length * 2 : 44);
|
||||
m_Stream.Write(mob.Serial);
|
||||
Stream.Write(mob.Serial);
|
||||
|
||||
Stream.Write((short)iconID); // ID
|
||||
Stream.Write((short)0x1); // Type 0 for removal. 1 for add 2 for Data
|
||||
|
||||
m_Stream.Write((short)iconID); //ID
|
||||
m_Stream.Write((short)0x1); //Type 0 for removal. 1 for add 2 for Data
|
||||
Stream.Fill(4);
|
||||
|
||||
m_Stream.Fill(4);
|
||||
Stream.Write((short)iconID); // ID
|
||||
Stream.Write((short)0x01); // Type 0 for removal. 1 for add 2 for Data
|
||||
|
||||
m_Stream.Write((short)iconID); //ID
|
||||
m_Stream.Write((short)0x01); //Type 0 for removal. 1 for add 2 for Data
|
||||
|
||||
m_Stream.Fill(4);
|
||||
Stream.Fill(4);
|
||||
|
||||
if (length < TimeSpan.Zero)
|
||||
length = TimeSpan.Zero;
|
||||
|
||||
m_Stream.Write((short)length.TotalSeconds); //Time in seconds
|
||||
Stream.Write((short)length.TotalSeconds); // Time in seconds
|
||||
|
||||
m_Stream.Fill(3);
|
||||
m_Stream.Write(titleCliloc);
|
||||
m_Stream.Write(secondaryCliloc);
|
||||
Stream.Fill(3);
|
||||
Stream.Write(titleCliloc);
|
||||
Stream.Write(secondaryCliloc);
|
||||
|
||||
if (!hasArgs)
|
||||
{
|
||||
//m_Stream.Fill( 2 );
|
||||
m_Stream.Fill(10);
|
||||
// m_Stream.Fill( 2 );
|
||||
Stream.Fill(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stream.Fill(4);
|
||||
m_Stream.Write((short)0x1); //Unknown -> Possibly something saying 'hey, I have more data!'?
|
||||
m_Stream.Fill(2);
|
||||
Stream.Fill(4);
|
||||
Stream.Write((short)0x1); // Unknown -> Possibly something saying 'hey, I have more data!'?
|
||||
Stream.Fill(2);
|
||||
|
||||
//m_Stream.WriteLittleUniNull( "\t#1018280" );
|
||||
m_Stream.WriteLittleUniNull($"\t{args}");
|
||||
// m_Stream.WriteLittleUniNull( "\t#1018280" );
|
||||
Stream.WriteLittleUniNull($"\t{args}");
|
||||
|
||||
m_Stream.Write((short)0x1); //Even more Unknown -> Possibly something saying 'hey, I have more data!'?
|
||||
m_Stream.Fill(2);
|
||||
Stream.Write((short)0x1); // Even more Unknown -> Possibly something saying 'hey, I have more data!'?
|
||||
Stream.Fill(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -278,12 +264,12 @@ namespace Server
|
|||
: base(0xDF)
|
||||
{
|
||||
EnsureCapacity(13);
|
||||
m_Stream.Write(mob.Serial);
|
||||
Stream.Write(mob.Serial);
|
||||
|
||||
m_Stream.Write((short)iconID); //ID
|
||||
m_Stream.Write((short)0x0); //Type 0 for removal. 1 for add 2 for Data
|
||||
Stream.Write((short)iconID); // ID
|
||||
Stream.Write((short)0x0); // Type 0 for removal. 1 for add 2 for Data
|
||||
|
||||
m_Stream.Fill(4);
|
||||
Stream.Fill(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue