Converts equipment packets (#314)

### Change to how DisplayEquipInfo works
* Fixes a bug where raw name wasn't used
* Fixes another bug where an empty, blank, or null string was still sending an empty crafted by property.

Bumps release version
This commit is contained in:
Kamron Batman 2020-11-16 01:04:56 -08:00 • committed by GitHub
parent b0d8dd42c0
commit 1fb7ac5cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 177 additions and 132 deletions

View file

@ -2036,9 +2036,7 @@ namespace Server.Items
return;
}
var eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray());
from.Send(new DisplayEquipmentInfo(this, eqInfo));
from.NetState?.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs);
}
[Flags]

View file

@ -880,9 +880,7 @@ namespace Server.Items
return;
}
var eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray());
from.Send(new DisplayEquipmentInfo(this, eqInfo));
from.NetState?.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs);
}
public virtual void AddEquipInfoAttributes(Mobile from, List<EquipInfoAttribute> attrs)

View file

@ -696,7 +696,7 @@ namespace Server.Items
else if (Parent is Mobile)
{
// What will happen if the client doesn't know about our parent?
to.Send(new EquipUpdate(this));
to.NetState?.SendEquipUpdate(this);
}
if (ns.HighSeas)

View file

@ -469,14 +469,7 @@ namespace Server.Items
return;
}
var eqInfo = new EquipmentInfo(
number,
m_Crafter,
false,
attrs.ToArray()
);
from.Send(new DisplayEquipmentInfo(this, eqInfo));
from.NetState?.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs);
}
public override void Serialize(IGenericWriter writer)

View file

@ -268,14 +268,7 @@ namespace Server.Items
return;
}
var eqInfo = new EquipmentInfo(
number,
Crafter,
false,
attrs.ToArray()
);
from.Send(new DisplayEquipmentInfo(this, eqInfo));
from.NetState?.SendDisplayEquipmentInfo(Serial, number, Crafter?.RawName, false, attrs);
}
public void Cast(Spell spell)

View file

@ -3413,9 +3413,7 @@ namespace Server.Items
return;
}
var eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray());
from.Send(new DisplayEquipmentInfo(this, eqInfo));
from.NetState?.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs);
}
public virtual int GetHitAttackSound(Mobile attacker, Mobile defender)

View file

@ -1021,13 +1021,13 @@ namespace Server.Mobiles
AddItem(pack);
}
from.Send(new EquipUpdate(pack));
from.NetState?.SendEquipUpdate(pack);
pack = FindItemOnLayer(Layer.ShopSell);
if (pack != null)
{
from.Send(new EquipUpdate(pack));
from.NetState?.SendEquipUpdate(pack);
}
pack = FindItemOnLayer(Layer.ShopResale);
@ -1038,7 +1038,7 @@ namespace Server.Mobiles
AddItem(pack);
}
from.Send(new EquipUpdate(pack));
from.NetState?.SendEquipUpdate(pack);
}
public virtual void VendorSell(Mobile from)