private static void HandleStart(GameSession session, PacketReader packet) { if (session.Player.Guide != null) { return; } byte unk = packet.ReadByte(); int furnishingItemId = packet.ReadInt(); long furnishingItemUid = packet.ReadLong(); // Add Guide Object CoordF startCoord = Block.ClosestBlock(session.Player.FieldPlayer.Coord); startCoord.Z += Block.BLOCK_SIZE; GuideObject guide = new(0, session.Player.CharacterId); IFieldObject <GuideObject> fieldGuide = session.FieldManager.RequestFieldObject(guide); fieldGuide.Coord = startCoord; session.Player.Guide = fieldGuide; session.FieldManager.AddGuide(fieldGuide); session.FieldManager.BroadcastPacket(GuideObjectPacket.Add(fieldGuide)); session.FieldManager.BroadcastPacket(BuildModePacket.Use(session.Player.FieldPlayer, BuildModeType.House, furnishingItemId, furnishingItemUid)); }
private static void HandleStop(GameSession session) { session.Send(BuildModePacket.Use(session.FieldPlayer, false)); session.FieldManager.BroadcastPacket(GuideObjectPacket.Remove(session.Player.Guide)); session.FieldManager.RemoveGuide(session.FieldPlayer.Value.Guide); session.Player.Guide = null; // remove guide from player }
private static void HandleStop(GameSession session) { if (session.Player.Guide == null) { return; } session.FieldManager.BroadcastPacket(BuildModePacket.Use(session.Player.FieldPlayer, BuildModeType.Stop)); session.FieldManager.BroadcastPacket(GuideObjectPacket.Remove(session.Player.Guide)); session.FieldManager.RemoveGuide(session.Player.Guide); session.Player.Guide = null; // remove guide from player }