#W# Confict: Fixed BaseCreature git merge conflict.
This commit is contained in:
commit
ad38314ca7
112 changed files with 5397 additions and 616 deletions
|
|
@ -226,8 +226,8 @@ namespace Server.Engines.ConPVP
|
|||
new[,] { { 0, -1 }, { -1, 0 } }, // south
|
||||
new[,] { { +1, 0 }, { 0, +1 } }, // nw
|
||||
new[,] { { -1, 0 }, { 0, -1 } }, // se
|
||||
new[,] { { 0, +1 }, { +1, 0 } }, // sw
|
||||
new[,] { { 0, -1 }, { -1, 0 } } // ne
|
||||
new[,] { { +1, 0 }, { 0, -1 } }, // sw
|
||||
new[,] { { -1, 0 }, { 0, +1 } } // ne
|
||||
};
|
||||
|
||||
private bool m_Active;
|
||||
|
|
@ -535,11 +535,13 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
public override string ToString() => "...";
|
||||
|
||||
public Point3D GetBaseStartPoint(int index) => Points.Points[Math.Max(index, 0) % Points.Points.Length];
|
||||
private int StartPointIndex(int index) => Math.Max(index, 0) % Points.Points.Length;
|
||||
|
||||
public Point3D GetBaseStartPoint(int index) => Points.Points[StartPointIndex(index)];
|
||||
|
||||
public void MoveInside(DuelPlayer[] players, int index)
|
||||
{
|
||||
index = Math.Min(index, 0) % Points.Points.Length;
|
||||
index = StartPointIndex(index);
|
||||
|
||||
var start = Points.Points[index];
|
||||
|
||||
|
|
@ -570,10 +572,10 @@ namespace Server.Engines.ConPVP
|
|||
p = offsets[^1];
|
||||
}
|
||||
|
||||
p.X = p.X * matrix[0, 0] + p.Y * matrix[0, 1];
|
||||
p.Y = p.X * matrix[1, 0] + p.Y * matrix[1, 1];
|
||||
var x = p.X * matrix[0, 0] + p.Y * matrix[0, 1];
|
||||
var y = p.X * matrix[1, 0] + p.Y * matrix[1, 1];
|
||||
|
||||
mob.MoveToWorld(new Point3D(start.X + p.X, start.Y + p.Y, start.Z), m_Facet);
|
||||
mob.MoveToWorld(new Point3D(start.X + x, start.Y + y, start.Z), m_Facet);
|
||||
mob.Direction = mob.GetDirectionTo(Wall);
|
||||
|
||||
Players.Add(mob);
|
||||
|
|
@ -637,7 +639,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
foreach (var mob in facet.GetMobilesInBounds(m_Bounds))
|
||||
{
|
||||
if (mob is BaseCreature pet && pet.Controlled && pet.ControlMaster != null &&
|
||||
if (mob is BaseCreature pet && pet.ControlMaster != null &&
|
||||
Players.Contains(pet.ControlMaster))
|
||||
{
|
||||
pets.Add(pet);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
|
||||
var pm = m as PlayerMobile ??
|
||||
(m is BaseCreature bc && bc.Summoned ? bc.SummonMaster as PlayerMobile : null);
|
||||
(m as BaseCreature)?.SummonMaster as PlayerMobile;
|
||||
|
||||
if (pm?.DuelContext?.StartedBeginCountdown == true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -278,6 +278,8 @@ public class TailoringMenu : ItemListMenu
|
|||
}
|
||||
else
|
||||
{
|
||||
// Make Last picks the hue-aware overload from LastHue, so a leather craft must clear the cloth hue
|
||||
context.LastHue = -1;
|
||||
DefTailoring.CraftSystem.CreateItem(from, itemDef.ItemType, resourceType, _tool, itemDef);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Server.Engines.Doom
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (m is BaseCreature bc && (bc.Controlled && bc.ControlMaster == m_Controller.Successful ||
|
||||
else if (m is BaseCreature bc && (bc.ControlMaster == m_Controller.Successful ||
|
||||
bc.Summoned))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -12,22 +12,23 @@ namespace Server.Engines.Harvest
|
|||
|
||||
private static readonly MutateEntry[] _mutateTable =
|
||||
{
|
||||
new(80.0, 80.0, 4080.0, true, typeof(SpecialFishingNet)),
|
||||
new(80.0, 80.0, 4080.0, true, typeof(BigFish)),
|
||||
new(90.0, 80.0, 4080.0, true, typeof(TreasureMap)),
|
||||
new(100.0, 80.0, 4080.0, true, typeof(MessageInABottle)),
|
||||
new(80.0, 80.0, 4080.0, true, Expansion.UOR, typeof(SpecialFishingNet)),
|
||||
new(80.0, 80.0, 4080.0, true, Expansion.UOR, typeof(BigFish)),
|
||||
new(90.0, 80.0, 4080.0, true, Expansion.T2A, typeof(TreasureMap)),
|
||||
new(100.0, 80.0, 4080.0, true, Expansion.T2A, typeof(MessageInABottle)),
|
||||
new(
|
||||
0.0,
|
||||
125.0,
|
||||
-2375.0,
|
||||
false,
|
||||
Expansion.T2A,
|
||||
typeof(PrizedFish),
|
||||
typeof(WondrousFish),
|
||||
typeof(TrulyRareFish),
|
||||
typeof(PeculiarFish)
|
||||
),
|
||||
new(0.0, 105.0, -420.0, false, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)),
|
||||
new(0.0, 200.0, -200.0, false, new Type[] { null })
|
||||
new(0.0, 105.0, -420.0, false, Expansion.T2A, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)),
|
||||
new(0.0, 200.0, -200.0, false, Expansion.None, new Type[] { null })
|
||||
};
|
||||
|
||||
private static readonly int[] _waterLandTiles =
|
||||
|
|
@ -173,6 +174,11 @@ namespace Server.Engines.Harvest
|
|||
{
|
||||
var entry = _mutateTable[i];
|
||||
|
||||
if (Core.Expansion < entry.m_Expansion)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!deepWater && entry.m_DeepWater)
|
||||
{
|
||||
continue;
|
||||
|
|
@ -200,7 +206,7 @@ namespace Server.Engines.Harvest
|
|||
{
|
||||
foreach (var sos in pack.FindItemsByType<SOS>())
|
||||
{
|
||||
if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60))
|
||||
if (from.Map == sos.TargetMap && from.InRange(sos.TargetLocation, 60))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -240,7 +246,7 @@ namespace Server.Engines.Harvest
|
|||
// We don't have to queue since we are returning on the first SOS.
|
||||
foreach (var sos in pack.FindItemsByType<SOS>())
|
||||
{
|
||||
if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60))
|
||||
if (from.Map == sos.TargetMap && from.InRange(sos.TargetLocation, 60))
|
||||
{
|
||||
Item preLoot = null;
|
||||
|
||||
|
|
@ -296,14 +302,17 @@ namespace Server.Engines.Harvest
|
|||
|
||||
LockableContainer chest = Utility.RandomBool() ? new MetalGoldenChest() : new WoodenChest();
|
||||
|
||||
if (sos.IsAncient)
|
||||
if (sos.IsAncient && Core.SE)
|
||||
{
|
||||
chest.Hue = 0x481;
|
||||
}
|
||||
|
||||
TreasureMapChest.Fill(chest, Math.Max(1, Math.Min(4, sos.Level)));
|
||||
|
||||
chest.DropItem(sos.IsAncient ? new FabledFishingNet() : new SpecialFishingNet());
|
||||
if (Core.UOR)
|
||||
{
|
||||
chest.DropItem(sos.IsAncient ? new FabledFishingNet() : new SpecialFishingNet());
|
||||
}
|
||||
|
||||
chest.Movable = true;
|
||||
chest.Locked = false;
|
||||
|
|
@ -531,17 +540,21 @@ namespace Server.Engines.Harvest
|
|||
private class MutateEntry
|
||||
{
|
||||
public readonly bool m_DeepWater;
|
||||
public readonly Expansion m_Expansion;
|
||||
public readonly double m_MaxSkill;
|
||||
public readonly double m_MinSkill;
|
||||
public readonly double m_ReqSkill;
|
||||
public readonly Type[] m_Types;
|
||||
|
||||
public MutateEntry(double reqSkill, double minSkill, double maxSkill, bool deepWater, params Type[] types)
|
||||
public MutateEntry(
|
||||
double reqSkill, double minSkill, double maxSkill, bool deepWater, Expansion expansion, params Type[] types
|
||||
)
|
||||
{
|
||||
m_ReqSkill = reqSkill;
|
||||
m_MinSkill = minSkill;
|
||||
m_MaxSkill = maxSkill;
|
||||
m_DeepWater = deepWater;
|
||||
m_Expansion = expansion;
|
||||
m_Types = types;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public partial class CrystalCaveBarrier : Item
|
|||
|
||||
if (m is BaseCreature creature)
|
||||
{
|
||||
mob = creature.ControlMaster;
|
||||
mob = creature.Controlled ? creature.ControlMaster : null;
|
||||
}
|
||||
|
||||
if (mob is not PlayerMobile pm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue