public MobileIncoming(Mobile m) : base(0x78) { int count = m.Contains.Count; int ltHue = Config.GetInt("LTHilight"); bool isLT; if (ltHue != 0) { isLT = Targeting.IsLastTarget(m); } else { isLT = false; } EnsureCapacity(3 + 4 + 2 + 2 + 2 + 1 + 1 + 2 + 1 + 1 + 4 + count * (4 + 2 + 1 + 2)); Write((uint)m.Serial); Write((ushort)m.Body); Write((ushort)m.Position.X); Write((ushort)m.Position.Y); Write((sbyte)m.Position.Z); Write((byte)m.Direction); Write((ushort)(isLT ? ltHue | 0x8000 : m.Hue)); Write((byte)m.GetPacketFlags()); Write((byte)m.Notoriety); for (int i = 0; i < count; ++i) { Item item = (Item)m.Contains[i]; int itemID = item.ItemID & 0x3FFF; bool writeHue = (item.Hue != 0); if (writeHue || isLT) { itemID |= 0x8000; } Write((uint)item.Serial); Write((ushort)itemID); Write((byte)item.Layer); if (isLT) { Write((ushort)(ltHue & 0x3FFF)); } else if (writeHue) { Write((ushort)item.Hue); } } Write((uint)0); // terminate }
internal MobileUpdate(Mobile m) : base(0x20, 19) { Write((int)m.Serial); Write((short)m.Body); Write((byte)0); int ltHue = Engine.MainWindow.LTHilight; if (ltHue != 0 && Targeting.IsLastTarget(m)) { Write((short)(ltHue | 0x8000)); } else { Write((short)m.Hue); } Write((byte)m.GetPacketFlags()); Write((short)m.Position.X); Write((short)m.Position.Y); Write((short)0); Write((byte)m.Direction); Write((sbyte)m.Position.Z); }
public MobileUpdate(Mobile m) : base(0x20, 19) { Write((int)m.Serial); Write((short)m.Body); Write((byte)0); int ltHue = Config.GetInt("LTHilight"); if (ltHue != 0 && Targeting.IsLastTarget(m)) { Write((short)(ltHue | 0x8000)); } else { Write((short)m.Hue); } Write((byte)m.GetPacketFlags()); Write((short)m.Position.X); Write((short)m.Position.Y); Write((short)0); Write((byte)m.Direction); Write((sbyte)m.Position.Z); }
internal MobileIncoming(Mobile m) : base(0x78) { int count = m.Contains.Count; int ltHue = Engine.MainWindow.LTHilight; int hue = m.Hue; if (ltHue != 0 && Targeting.IsLastTarget(m)) { hue = ltHue; } else // Inizio controllo flag { if (m.Poisoned) // Caso Poison { hue = (int)RazorEnhanced.Filters.HighLightColor.Poison; } else if (m.Blessed) // Caso Mortal { hue = (int)RazorEnhanced.Filters.HighLightColor.Mortal; } else if (m.Paralized) // Caso Paral { hue = (int)RazorEnhanced.Filters.HighLightColor.Paralized; } } EnsureCapacity(3 + 4 + 2 + 2 + 2 + 1 + 1 + 2 + 1 + 1 + 4 + count * (4 + 2 + 1 + 2)); Write((uint)m.Serial); Write((ushort)m.Body); Write((ushort)m.Position.X); Write((ushort)m.Position.Y); Write((sbyte)m.Position.Z); Write((byte)m.Direction); Write((ushort)hue); Write((byte)m.GetPacketFlags()); Write((byte)m.Notoriety); for (int i = 0; i < count; ++i) { Item item = (Item)m.Contains[i]; Write((uint)item.Serial); Write((ushort)item.ItemID); Write((byte)item.Layer); if (ltHue != 0 && Targeting.IsLastTarget(m)) { Write((ushort)ltHue); } else // Inizio controllo flag { if (m.Poisoned) // Caso Poison { hue = (int)RazorEnhanced.Filters.HighLightColor.Poison; } else if (m.Blessed) // Caso Mortal { hue = (int)RazorEnhanced.Filters.HighLightColor.Mortal; } else if (m.Paralized) // Caso Paral { hue = (int)RazorEnhanced.Filters.HighLightColor.Paralized; } else { Write((ushort)item.Hue); } } } Write((uint)0); // terminate }