fix(core): Converts healthbar packets (#367)
- [X] Converts healthbar packets
This commit is contained in:
parent
26243a72a7
commit
8f8b650ab5
22 changed files with 174 additions and 166 deletions
|
|
@ -174,4 +174,50 @@ namespace Server.Tests.Network
|
|||
Stream.Write((byte)delay);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HealthbarPoison : Packet
|
||||
{
|
||||
public HealthbarPoison(Mobile m) : base(0x17)
|
||||
{
|
||||
EnsureCapacity(12);
|
||||
|
||||
Stream.Write(m.Serial);
|
||||
Stream.Write((short)1); // Show Bar?
|
||||
|
||||
Stream.Write((short)1); // Poison Bar
|
||||
|
||||
var p = m.Poison;
|
||||
|
||||
if (p != null)
|
||||
{
|
||||
Stream.Write((byte)(p.Level + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
Stream.Write((byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HealthbarYellow : Packet
|
||||
{
|
||||
public HealthbarYellow(Mobile m) : base(0x17)
|
||||
{
|
||||
EnsureCapacity(12);
|
||||
|
||||
Stream.Write(m.Serial);
|
||||
Stream.Write((short)1);
|
||||
|
||||
Stream.Write((short)2);
|
||||
|
||||
if (m.Blessed || m.YellowHealthbar)
|
||||
{
|
||||
Stream.Write((byte)1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Stream.Write((byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue