Inital Commit

This commit is contained in:
Ubuntu
2026-07-07 13:40:15 -04:00
parent 73701ff86e
commit b491e327dc
83 changed files with 8591 additions and 6895 deletions
+38 -39
View File
@@ -159,12 +159,12 @@ namespace Server.Spells
{
return CheckMulti(p, map, true, 0);
}
public static bool CheckMulti(Point3D p, Map map, bool houses)
{
return CheckMulti(p, map, houses, 0);
}
public static bool CheckMulti(Point3D p, Map map, bool houses, int housingrange)
{
if (map == null || map == Map.Internal)
@@ -188,7 +188,7 @@ namespace Server.Spells
return true;
}
}
return false;
}
@@ -265,7 +265,7 @@ namespace Server.Spells
{
Type t = item.GetType();
if(t.IsDefined(typeof(DispellableFieldAttribute), false) || t.IsDefined(typeof(DispellableFieldAttribute), true))
if (t.IsDefined(typeof(DispellableFieldAttribute), false) || t.IsDefined(typeof(DispellableFieldAttribute), true))
{
eable.Free();
return false;
@@ -297,17 +297,17 @@ namespace Server.Spells
return true;
}
public static bool CanRevealCaster(Mobile m)
{
if (m is BaseCreature)
{
BaseCreature c = (BaseCreature)m;
if (!c.Controlled)
return true;
}
return false;
}
@@ -329,13 +329,13 @@ namespace Server.Spells
}
}
protected static void RemoveStatOffsetCallback(object state)
{
if (!(state is Mobile))
return;
// This call has the side-effect of updating all stats
((Mobile)state).CheckStatTimers();
}
protected static void RemoveStatOffsetCallback(object state)
{
if (!(state is Mobile))
return;
// This call has the side-effect of updating all stats
((Mobile)state).CheckStatTimers();
}
public static bool AddStatOffset(Mobile m, StatType type, int offset, TimeSpan duration)
{
@@ -365,7 +365,7 @@ namespace Server.Spells
}
target.AddStatMod(new StatMod(type, name, offset, duration));
Timer.DelayCall(duration, RemoveStatOffsetCallback, target);
Timer.DelayCall(duration, RemoveStatOffsetCallback, target);
return true;
}
@@ -401,13 +401,13 @@ namespace Server.Spells
StatMod mod = target.GetStatMod(name);
if (mod != null)
offset = Math.Max(mod.Offset, offset);
if (mod != null)
offset = Math.Max(mod.Offset, offset);
offset *= -1;
offset *= -1;
target.AddStatMod(new StatMod(type, name, offset, TimeSpan.Zero));
return true;
return true;
}
public static TimeSpan GetDuration(Mobile caster, Mobile target)
@@ -469,7 +469,7 @@ namespace Server.Spells
double percent = GetOffsetScalar(caster, target, curse);
switch( type )
switch (type)
{
case StatType.Str:
return (int)Math.Ceiling(target.RawStr * percent);
@@ -636,7 +636,7 @@ namespace Server.Spells
}
public static IEnumerable<IDamageable> AcquireIndirectTargets(Mobile caster, IPoint3D p, Map map, int range, bool losCheck)
{
{
if (map == null)
{
yield break;
@@ -825,13 +825,13 @@ namespace Server.Spells
private static readonly bool[,] m_Rules = new bool[,]
{
/*T2A(Fel), Khaldun, Ilshenar, Wind(Tram), Wind(Fel), Dungeons(Fel), Solen(Tram), Solen(Fel), CrystalCave(Malas), Gauntlet(Malas), Gauntlet(Ferry), SafeZone, Stronghold, ChampionSpawn, Dungeons(Tokuno[Malas]), LampRoom(Doom), GuardianRoom(Doom), Heartwood, MLDungeons, SA Dungeons Tomb of Kings Maze of Death SA Entrance, Eodon*/
/* Recall From */ { false, false, true, true, false, false, true, false, false, false, false, true, true, false, true, false, false, false, false, true, true, false, false, true} ,
/* Recall To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate From */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Mark In */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Tele From */ { true, true, true, true, true, true, true, true, false, true, true, true, false, true, true, true, true, false, true, true, false, false, false, true },
/* Tele To */ { true, true, true, true, true, true, true, true, false, true, false, false, false, true, true, true, true, false, false, true, false, false, false, true },
/* Recall From */ { false, false, true, true, false, false, true, false, false, false, false, true, true, false, true, false, false, false, false, true, true, false, false, true} ,
/* Recall To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate From */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Mark In */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Tele From */ { true, true, true, true, true, true, true, true, false, true, true, true, false, true, true, true, true, false, true, true, false, false, false, true },
/* Tele To */ { true, true, true, true, true, true, true, true, false, true, false, false, false, true, true, true, true, false, false, true, false, false, false, true },
};
public static void SendInvalidMessage(Mobile caster, TravelCheckType type)
@@ -866,7 +866,6 @@ namespace Server.Spells
return false;
}
if (caster != null)
{
if (caster.IsPlayer())
@@ -887,7 +886,7 @@ namespace Server.Spells
// Always allow monsters to teleport
if (caster is BaseCreature && (type == TravelCheckType.TeleportTo || type == TravelCheckType.TeleportFrom))
{
BaseCreature bc = (BaseCreature) caster;
BaseCreature bc = (BaseCreature)caster;
if (!bc.Controlled && !bc.Summoned)
return true;
@@ -926,7 +925,7 @@ namespace Server.Spells
if ((int)type <= 4 && (IsNewDungeon(caster.Map, caster.Location) || IsNewDungeon(map, loc)))
isValid = false;
#endregion
#region High Seas
@@ -1206,7 +1205,7 @@ namespace Server.Spells
if (map == null)
return false;
GuardedRegion reg = (GuardedRegion)Region.Find(loc, map).GetRegion(typeof(GuardedRegion));
return (reg != null && !reg.IsDisabled());
@@ -1475,7 +1474,7 @@ namespace Server.Spells
int damageGiven = AOS.Damage(damageable, from, iDamage, phys, fire, cold, pois, nrgy, chaos, direct, dtype);
if(target != null)
if (target != null)
Spells.Mysticism.SpellPlagueSpell.OnMobileDamaged(target);
if (target != null && target.DFA != DFAlgorithm.Standard)
@@ -1485,7 +1484,7 @@ namespace Server.Spells
NegativeAttributes.OnCombatAction(from);
if(from != target)
if (from != target)
NegativeAttributes.OnCombatAction(target);
}
else
@@ -1747,11 +1746,11 @@ namespace Server.Spells
caster.SendLocalizedMessage(1061091); // You cannot cast that spell in this form.
return false;
}
else if (caster.Flying && !(spell is VampiricEmbraceSpell))
{
caster.SendLocalizedMessage(1112567); // You are flying.
return false;
}
else if (caster.Flying && !(spell is VampiricEmbraceSpell))
{
caster.SendLocalizedMessage(1112567); // You are flying.
return false;
}
return true;
}