public static void SendStartComonMovePacketError(Character chr, bool instant, Asda2StartMovementStatus status) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.StartMoveCommon)) { packet.WriteByte((byte)status); packet.WriteInt16(chr.SessionId); packet.WriteInt32(chr.Account.AccountId); packet.WriteInt16(2); packet.WriteFloat(chr.Asda2X * 100f); packet.WriteFloat(chr.Asda2Y * 100f); packet.WriteFloat(instant ? chr.Asda2X * 100f : chr.LastNewPosition.X * 100f); packet.WriteFloat(instant ? chr.Asda2Y * 100f : chr.LastNewPosition.Y * 100f); packet.WriteFloat(instant ? 5f : chr.RunSpeed); NPC target = chr.Target as NPC; packet.WriteInt16(target == null ? 0 : (int)target.UniqIdOnMap); chr.Send(packet, true); } }
public static void SendStartComonMovePacketError(Character chr, bool instant, Asda2StartMovementStatus status) { using (var packet = new RealmPacketOut(RealmServerOpCode.StartMoveCommon)) //4007 { packet.WriteByte((byte)status); //value name : _ packet.WriteInt16(chr.SessionId); //default value : 0 packet.WriteInt32((int)chr.Account.AccountId); //{accId}default value : 0 Len : 4 packet.WriteInt16(2); //value name : _ packet.WriteFloat(chr.Asda2X * 100); //default value : 1 packet.WriteFloat(chr.Asda2Y * 100); //default value : 1 packet.WriteFloat(instant ? chr.Asda2X * 100 : chr.LastNewPosition.X * 100); //default value : 1 packet.WriteFloat(instant ? chr.Asda2Y * 100 : chr.LastNewPosition.Y * 100); //default value : 1 packet.WriteFloat(instant ? 5 : chr.RunSpeed); //default value : 1 var target = chr.Target as NPC; packet.WriteInt16(target == null ? 0 : target.UniqIdOnMap); chr.Send(packet, addEnd: true); } }