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

@ -9,7 +9,7 @@ namespace Server.Mobiles
{
SpeechHue = Utility.RandomDyedHue();
Title = "the brigand";
Hue = Utility.RandomSkinHue();
Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{

View file

@ -9,7 +9,7 @@ namespace Server.Mobiles
{
SpeechHue = Utility.RandomDyedHue();
Title = "the executioner";
Hue = Utility.RandomSkinHue();
Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{

View file

@ -12,7 +12,7 @@ namespace Server.Mobiles
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
@ -58,11 +58,11 @@ namespace Server.Mobiles
PackItem(new Arrow(250));
PackGold(250, 500);
Skills[SkillName.Anatomy].Base = 120.0;
Skills[SkillName.Tactics].Base = 120.0;
Skills[SkillName.Archery].Base = 120.0;
Skills[SkillName.MagicResist].Base = 120.0;
Skills[SkillName.DetectHidden].Base = 100.0;
Skills.Anatomy.Base = 120.0;
Skills.Tactics.Base = 120.0;
Skills.Archery.Base = 120.0;
Skills.MagicResist.Base = 120.0;
Skills.DetectHidden.Base = 100.0;
}
public Guardian(Serial serial) : base(serial)

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public HeadlessOne() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 31;
Hue = Utility.RandomSkinHue() & 0x7FFF;
Hue = Race.Human.RandomSkinHue() & 0x7FFF;
BaseSoundID = 0x39D;
SetStr(26, 50);

View file

@ -124,20 +124,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;
}

View file

@ -1,12 +1,13 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class KhaldunRevenant : BaseCreature
{
private static Hashtable m_Table = new Hashtable();
private static HashSet<Mobile> m_Set = new HashSet<Mobile>();
private DateTime m_ExpireTime;
private Mobile m_Target;
@ -47,9 +48,7 @@ namespace Server.Mobiles
VirtualArmor = 60;
Halberd weapon = new Halberd();
weapon.Hue = 0x41CE;
weapon.Movable = false;
Halberd weapon = new Halberd { Hue = 0x41CE, Movable = false };
AddItem(weapon);
}
@ -81,7 +80,7 @@ namespace Server.Mobiles
if (lastKiller is BaseCreature)
lastKiller = ((BaseCreature)lastKiller).GetMaster();
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Table.Contains(lastKiller))
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Set.Contains(lastKiller))
foreach (AggressorInfo ai in m.Aggressors)
if (ai.Attacker == lastKiller && ai.CanReportMurder)
{
@ -99,12 +98,12 @@ namespace Server.Mobiles
revenant.FixedParticles(0, 0, 0, 0x13A7, EffectLayer.Waist);
Effects.PlaySound(revenant.Location, revenant.Map, 0x29);
m_Table.Add(killer, null);
m_Set.Add(killer);
}
public static bool IsInsideKhaldun(Mobile from)
{
return from?.Region != null && from.Region.IsPartOf("Khaldun");
return from?.Region?.IsPartOf("Khaldun") == true;
}
public override void DisplayPaperdollTo(Mobile to)
@ -152,7 +151,7 @@ namespace Server.Mobiles
public override void OnDelete()
{
if (m_Target != null)
m_Table.Remove(m_Target);
m_Set.Remove(m_Target);
base.OnDelete();
}
@ -173,4 +172,4 @@ namespace Server.Mobiles
Delete();
}
}
}
}

View file

@ -1,3 +1,4 @@
using System.Linq;
using Server.Items;
namespace Server.Mobiles
@ -108,35 +109,15 @@ namespace Server.Mobiles
if (map == null)
return;
int orcs = 0;
foreach (Mobile m in GetMobilesInRange(10))
if (m is OrcishLord)
++orcs;
IPooledEnumerable<OrcishLord> eable = GetMobilesInRange<OrcishLord>(10);
int orcs = eable.Count();
eable.Free();
if (orcs < 10)
{
BaseCreature orc = new SpawnedOrcishLord();
orc.Team = Team;
Point3D loc = target.Location;
bool validLocation = false;
for (int j = 0; !validLocation && j < 10; ++j)
{
int x = target.X + Utility.Random(3) - 1;
int y = target.Y + Utility.Random(3) - 1;
int z = map.GetAverageZ(x, y);
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
loc = new Point3D(x, y, Z);
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
loc = new Point3D(x, y, z);
}
orc.MoveToWorld(loc, map);
BaseCreature orc = new SpawnedOrcishLord{ Team = Team };
orc.MoveToWorld(map.GetRandomNearbyLocation(target.Location), map);
orc.Combatant = target;
}
}
@ -153,4 +134,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}