Unlimited
Member
- ServUO Version
- Publish 57
- Ultima Expansion
- Time Of Legends
Getting issue when color-wars event ends,issue in console:
Event is working as intended,and remove the robe as intended too,just getting this message in console,is it concerning? What could this error mean? Thank you in advance!
Here the robe code:
Here the method equiping the robe:
And here the call to the method:
C#:
Offending Mobile: Server.Mobiles.PlayerMobile [0x9110 "fddfgdfg"]
Offending Item: 0x40014CEE "Item" [Server.Item]
Equipped Item: 0x40014AEC "ColorWarsRobe" [Server.ColorWarsRobe]
Here the robe code:
C#:
using Server.Items;
namespace Server
{
public class ColorWarsRobe : Robe
{
[Constructable]
public ColorWarsRobe(int hue) : base(hue)
{
Name = "Color Wars Robe";
Movable = false;
}
public ColorWarsRobe(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
Here the method equiping the robe:
C#:
public class CWHelper
{
public static void SetEventRobe(Mobile m, int team)
{
if (m != null)
{
var robe = m.FindItemOnLayer(Layer.OuterTorso);
if (robe != null)
m.Backpack?.DropItem(robe);
}
int hue = 0;
switch (team)
{
case 0: hue = 3; break;
case 1: hue = 38; break;
case 2: hue = 55; break;
case 3: hue = 68; break;
default: hue = 0; break;
}
ColorWarsRobe eventRobe = new ColorWarsRobe(hue);
m.EquipItem(eventRobe);
}
C#:
for (int j = 0; j < duelPart.Players.Length; ++j)
{
if (duelPart.Players[j] != null)
{
if (tourny.TournyType == TournyType.ColorWars)
{
CWHelper.SetEventRobe(duelPart.Players[j].Mobile, i);
}
duelPart.Players[j].Ready = true;
}
}