using ODMO.Commons.Models.Config;
using ODMO.Commons.Models.Config.Events;
using ODMO.Commons.Models.Summon;
using ODMO.Commons.Writers;
namespace ODMO.Commons.Packets.GameServer.Combat
{
public class MobWalkPacket : PacketWriter
{
private const int PacketNumber = 1006;
///
/// Default mob movimentation packet.
///
/// The mob that is moving
public MobWalkPacket(MobConfigModel mob)
{
Type(PacketNumber);
WriteByte(5);
WriteShort(1);
WriteUInt((uint)mob.GeneralHandler);
WriteInt(mob.CurrentLocation.X);
WriteInt(mob.CurrentLocation.Y);
WriteInt(0);
}
public MobWalkPacket(SummonMobModel mob)
{
Type(PacketNumber);
WriteByte(5);
WriteShort(1);
WriteUInt((uint)mob.GeneralHandler);
WriteInt(mob.CurrentLocation.X);
WriteInt(mob.CurrentLocation.Y);
WriteInt(0);
}
public MobWalkPacket(EventMobConfigModel mob)
{
Type(PacketNumber);
WriteByte(5);
WriteShort(1);
WriteUInt((uint)mob.GeneralHandler);
WriteInt(mob.CurrentLocation.X);
WriteInt(mob.CurrentLocation.Y);
WriteInt(0);
}
public MobWalkPacket(int X,int Y,uint Handler)
{
Type(PacketNumber);
WriteByte(5);
WriteShort(1);
WriteUInt(Handler);
WriteInt(X);
WriteInt(Y);
WriteInt(0);
}
}
}