public void Die(Game.Entity killer)
{
if (MapID == 1038)
{
if (UID != 6700)
{
if (Hitpoints != 0 || Mesh != 251 && Mesh != 287)
{
if (Mesh == 241)
Mesh = (ushort)(251 + Mesh % 10);
else
Mesh = (ushort)(287 + Mesh % 10);
Update upd = new Update(true);
upd.UID = UID;
upd.Append(Update.Mesh, Mesh);
killer.Owner.SendScreen(upd, true);
Hitpoints = 0;
}
Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
killer.Owner.Send(attack);
killer.KOCount++;
}
}
else
{
Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
killer.Owner.Send(attack);
Hitpoints = MaxHitpoints;
Update upd = new Update(true);
upd.UID = UID;
upd.Append(Update.Hitpoints, MaxHitpoints);
killer.Owner.SendScreen(upd, true);
}
}
And here is the code of the mesh!
public enum SOBType : ushort
{
Gate = 0x1A,
Scarecrow = 0x16,
Shop = 14,
Stake = 0x15,
Pole = 0x0A
}
public enum SOBMesh : ushort
{
ShopFlag = 406,
LeftGate = 0x00F1,
LeftGateOpen = 251,
RightGate = 0x0115,
RightGateOpen = 287,
Pole = 0x471
}
If someone can tell me where is the error I will thank a lot.






