From 772a90f5ae11dcfefc16a95b3ae88b9d38c0594f Mon Sep 17 00:00:00 2001 From: AVild Date: Sun, 10 Mar 2024 11:08:53 -0400 Subject: [PATCH] 2172: Add support for a crafting journal (#2173) * feat: (Day) Add a journal-mode for crafting. Needs winforms update * feat: (Day) Winforms work for crafting journal * remove .resx --- .../Events/Commands/EventCommands.cs | 5 + .../Packets/Server/CraftingTablePacket.cs | 5 +- .../Interface/Game/Crafting/CraftingWindow.cs | 14 +- .../Interface/Game/GameInterface.cs | 8 +- Intersect.Client/Networking/PacketHandler.cs | 2 +- .../Forms/Editors/Events/CommandPrinter.cs | 4 +- .../EventCommand_OpenCrafting.Designer.cs | 159 ++++++++++-------- .../EventCommand_OpenCrafting.cs | 15 +- Intersect.Editor/Localization/Strings.cs | 9 + .../Entities/Events/CommandProcessing.cs | 2 +- Intersect.Server.Core/Entities/Player.cs | 7 +- Intersect.Server.Core/Localization/Strings.cs | 3 + .../Networking/PacketHandler.cs | 6 + .../Networking/PacketSender.cs | 7 +- 14 files changed, 161 insertions(+), 85 deletions(-) diff --git a/Intersect (Core)/GameObjects/Events/Commands/EventCommands.cs b/Intersect (Core)/GameObjects/Events/Commands/EventCommands.cs index 2673f0b6d2..1976a8dde4 100644 --- a/Intersect (Core)/GameObjects/Events/Commands/EventCommands.cs +++ b/Intersect (Core)/GameObjects/Events/Commands/EventCommands.cs @@ -726,6 +726,11 @@ public partial class OpenCraftingTableCommand : EventCommand public override EventCommandType Type { get; } = EventCommandType.OpenCraftingTable; public Guid CraftingTableId { get; set; } + + /// + /// Does not allow crafting, but displays crafts and their requirements. + /// + public bool JournalMode { get; set; } } public partial class SetClassCommand : EventCommand diff --git a/Intersect (Core)/Network/Packets/Server/CraftingTablePacket.cs b/Intersect (Core)/Network/Packets/Server/CraftingTablePacket.cs index fa54e30b3c..84b1e7e8ba 100644 --- a/Intersect (Core)/Network/Packets/Server/CraftingTablePacket.cs +++ b/Intersect (Core)/Network/Packets/Server/CraftingTablePacket.cs @@ -10,10 +10,11 @@ public CraftingTablePacket() { } - public CraftingTablePacket(string tableData, bool close) + public CraftingTablePacket(string tableData, bool close, bool journalMode) { TableData = tableData; Close = close; + JournalMode = journalMode; } [Key(0)] @@ -22,6 +23,8 @@ public CraftingTablePacket(string tableData, bool close) [Key(1)] public bool Close { get; set; } + [Key(2)] + public bool JournalMode { get; set; } } } diff --git a/Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs b/Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs index 58ab1528e2..29fa2bb634 100644 --- a/Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs +++ b/Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs @@ -71,13 +71,17 @@ public partial class CraftingWindow public bool IsCrafting => mRemainingCrafts > 0; - public CraftingWindow(Canvas gameCanvas) + private bool mJournalMode { get; set; } + + public CraftingWindow(Canvas gameCanvas, bool journalMode) { mCraftWindow = new WindowControl(gameCanvas, Globals.ActiveCraftingTable.Name, false, "CraftingWindow"); mCraftWindow.DisableResizing(); mItemContainer = new ScrollControl(mCraftWindow, "IngredientsContainer"); + mJournalMode = journalMode; + //Labels mLblRecipes = new Label(mCraftWindow, "RecipesTitle"); mLblRecipes.Text = Strings.Crafting.recipes; @@ -116,6 +120,12 @@ public CraftingWindow(Canvas gameCanvas) mCraftWindow.LoadJsonUi(GameContentManager.UI.InGame, Graphics.Renderer.GetResolutionString()); + if (mJournalMode) + { + mCraft.Hide(); + mCraftAll.Hide(); + } + Interface.InputBlockingElements.Add(mCraftWindow); Globals.Me.InventoryUpdatedDelegate = () => @@ -290,7 +300,7 @@ private void LoadCraftItems(Guid id) } } - mCraftAll.IsHidden = craftableQuantity < 2; + mCraftAll.IsHidden = mJournalMode || craftableQuantity < 2; if (!mCraftAll.IsHidden) { mCraftAll.SetText(Strings.Crafting.craftall.ToString(craftableQuantity)); diff --git a/Intersect.Client/Interface/Game/GameInterface.cs b/Intersect.Client/Interface/Game/GameInterface.cs index 24b2d14dc1..03f9814c64 100644 --- a/Intersect.Client/Interface/Game/GameInterface.cs +++ b/Intersect.Client/Interface/Game/GameInterface.cs @@ -83,6 +83,8 @@ public partial class GameInterface : MutableInterface private string mTradingTarget; + private bool mCraftJournal { get; set; } + private TradingWindow? mTradingWindow; public EntityBox PlayerBox; @@ -235,14 +237,16 @@ public BankWindow GetBankWindow() } //Crafting - public void NotifyOpenCraftingTable() + public void NotifyOpenCraftingTable(bool journalMode) { mShouldOpenCraftingTable = true; + mCraftJournal = journalMode; } public void NotifyCloseCraftingTable() { mShouldCloseCraftingTable = true; + mCraftJournal = false; } public void OpenCraftingTable() @@ -252,7 +256,7 @@ public void OpenCraftingTable() mCraftingWindow.Close(); } - mCraftingWindow = new CraftingWindow(GameCanvas); + mCraftingWindow = new CraftingWindow(GameCanvas, mCraftJournal); mShouldOpenCraftingTable = false; Globals.InCraft = true; } diff --git a/Intersect.Client/Networking/PacketHandler.cs b/Intersect.Client/Networking/PacketHandler.cs index 9452b36eff..dd14c70037 100644 --- a/Intersect.Client/Networking/PacketHandler.cs +++ b/Intersect.Client/Networking/PacketHandler.cs @@ -1636,7 +1636,7 @@ public void HandlePacket(IPacketSender packetSender, CraftingTablePacket packet) { Globals.ActiveCraftingTable = new CraftingTableBase(); Globals.ActiveCraftingTable.Load(packet.TableData); - Interface.Interface.GameUi.NotifyOpenCraftingTable(); + Interface.Interface.GameUi.NotifyOpenCraftingTable(packet.JournalMode); } else { diff --git a/Intersect.Editor/Forms/Editors/Events/CommandPrinter.cs b/Intersect.Editor/Forms/Editors/Events/CommandPrinter.cs index 972b864d47..66f013c86c 100644 --- a/Intersect.Editor/Forms/Editors/Events/CommandPrinter.cs +++ b/Intersect.Editor/Forms/Editors/Events/CommandPrinter.cs @@ -1203,7 +1203,9 @@ private static string GetCommandText(OpenShopCommand command, MapInstance map) private static string GetCommandText(OpenCraftingTableCommand command, MapInstance map) { - return Strings.EventCommandList.opencrafting.ToString(CraftingTableBase.GetName(command.CraftingTableId)); + return command.JournalMode ? + Strings.EventCommandList.OpenCraftingJournal.ToString(CraftingTableBase.GetName(command.CraftingTableId)) : + Strings.EventCommandList.opencrafting.ToString(CraftingTableBase.GetName(command.CraftingTableId)); } private static string GetCommandText(SetClassCommand command, MapInstance map) diff --git a/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.Designer.cs b/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.Designer.cs index 7ac5566b36..a014e4ad31 100644 --- a/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.Designer.cs +++ b/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.Designer.cs @@ -30,93 +30,111 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EventCommandOpenCraftingTable)); - this.grpTable = new DarkUI.Controls.DarkGroupBox(); - this.cmbTable = new DarkUI.Controls.DarkComboBox(); - this.lblTable = new System.Windows.Forms.Label(); - this.btnCancel = new DarkUI.Controls.DarkButton(); - this.btnSave = new DarkUI.Controls.DarkButton(); - this.grpTable.SuspendLayout(); - this.SuspendLayout(); + grpTable = new DarkGroupBox(); + chkJournalMode = new DarkCheckBox(); + cmbTable = new DarkComboBox(); + lblTable = new Label(); + btnCancel = new DarkButton(); + btnSave = new DarkButton(); + grpTable.SuspendLayout(); + SuspendLayout(); // // grpTable // - this.grpTable.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); - this.grpTable.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); - this.grpTable.Controls.Add(this.cmbTable); - this.grpTable.Controls.Add(this.lblTable); - this.grpTable.Controls.Add(this.btnCancel); - this.grpTable.Controls.Add(this.btnSave); - this.grpTable.ForeColor = System.Drawing.Color.Gainsboro; - this.grpTable.Location = new System.Drawing.Point(3, 3); - this.grpTable.Name = "grpTable"; - this.grpTable.Size = new System.Drawing.Size(176, 126); - this.grpTable.TabIndex = 17; - this.grpTable.TabStop = false; - this.grpTable.Text = "Open Crafting"; + grpTable.BackColor = System.Drawing.Color.FromArgb(60, 63, 65); + grpTable.BorderColor = System.Drawing.Color.FromArgb(90, 90, 90); + grpTable.Controls.Add(chkJournalMode); + grpTable.Controls.Add(cmbTable); + grpTable.Controls.Add(lblTable); + grpTable.Controls.Add(btnCancel); + grpTable.Controls.Add(btnSave); + grpTable.ForeColor = System.Drawing.Color.Gainsboro; + grpTable.Location = new System.Drawing.Point(4, -4); + grpTable.Margin = new Padding(4, 3, 4, 3); + grpTable.Name = "grpTable"; + grpTable.Padding = new Padding(4, 3, 4, 3); + grpTable.Size = new Size(272, 124); + grpTable.TabIndex = 17; + grpTable.TabStop = false; + grpTable.Text = "Open Crafting"; + // + // chkJournalMode + // + chkJournalMode.AutoSize = true; + chkJournalMode.BackColor = System.Drawing.Color.FromArgb(60, 63, 65); + chkJournalMode.Location = new System.Drawing.Point(8, 52); + chkJournalMode.Margin = new Padding(4, 3, 4, 3); + chkJournalMode.Name = "chkJournalMode"; + chkJournalMode.Size = new Size(158, 19); + chkJournalMode.TabIndex = 24; + chkJournalMode.Text = "Open as crafting journal?"; // // cmbTable // - this.cmbTable.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); - this.cmbTable.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); - this.cmbTable.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid; - this.cmbTable.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43))))); - this.cmbTable.DrawDropdownHoverOutline = false; - this.cmbTable.DrawFocusRectangle = false; - this.cmbTable.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.cmbTable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbTable.ForeColor = System.Drawing.Color.Gainsboro; - this.cmbTable.FormattingEnabled = true; - this.cmbTable.Location = new System.Drawing.Point(47, 19); - this.cmbTable.Name = "cmbTable"; - this.cmbTable.Size = new System.Drawing.Size(117, 21); - this.cmbTable.TabIndex = 22; - this.cmbTable.Text = null; - this.cmbTable.TextPadding = new System.Windows.Forms.Padding(2); + cmbTable.BackColor = System.Drawing.Color.FromArgb(69, 73, 74); + cmbTable.BorderColor = System.Drawing.Color.FromArgb(90, 90, 90); + cmbTable.BorderStyle = ButtonBorderStyle.Solid; + cmbTable.ButtonColor = System.Drawing.Color.FromArgb(43, 43, 43); + cmbTable.DrawDropdownHoverOutline = false; + cmbTable.DrawFocusRectangle = false; + cmbTable.DrawMode = DrawMode.OwnerDrawFixed; + cmbTable.DropDownStyle = ComboBoxStyle.DropDownList; + cmbTable.FlatStyle = FlatStyle.Flat; + cmbTable.ForeColor = System.Drawing.Color.Gainsboro; + cmbTable.FormattingEnabled = true; + cmbTable.Location = new System.Drawing.Point(55, 22); + cmbTable.Margin = new Padding(4, 3, 4, 3); + cmbTable.Name = "cmbTable"; + cmbTable.Size = new Size(209, 24); + cmbTable.TabIndex = 22; + cmbTable.Text = null; + cmbTable.TextPadding = new Padding(2); // // lblTable // - this.lblTable.AutoSize = true; - this.lblTable.Location = new System.Drawing.Point(4, 22); - this.lblTable.Name = "lblTable"; - this.lblTable.Size = new System.Drawing.Size(37, 13); - this.lblTable.TabIndex = 21; - this.lblTable.Text = "Table:"; + lblTable.AutoSize = true; + lblTable.Location = new System.Drawing.Point(5, 25); + lblTable.Margin = new Padding(4, 0, 4, 0); + lblTable.Name = "lblTable"; + lblTable.Size = new Size(37, 15); + lblTable.TabIndex = 21; + lblTable.Text = "Table:"; // // btnCancel // - this.btnCancel.Location = new System.Drawing.Point(89, 97); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Padding = new System.Windows.Forms.Padding(5); - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 20; - this.btnCancel.Text = "Cancel"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + btnCancel.Location = new System.Drawing.Point(176, 82); + btnCancel.Margin = new Padding(4, 3, 4, 3); + btnCancel.Name = "btnCancel"; + btnCancel.Padding = new Padding(6); + btnCancel.Size = new Size(88, 27); + btnCancel.TabIndex = 20; + btnCancel.Text = "Cancel"; + btnCancel.Click += btnCancel_Click; // // btnSave // - this.btnSave.Location = new System.Drawing.Point(7, 97); - this.btnSave.Name = "btnSave"; - this.btnSave.Padding = new System.Windows.Forms.Padding(5); - this.btnSave.Size = new System.Drawing.Size(75, 23); - this.btnSave.TabIndex = 19; - this.btnSave.Text = "Ok"; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + btnSave.Location = new System.Drawing.Point(80, 82); + btnSave.Margin = new Padding(4, 3, 4, 3); + btnSave.Name = "btnSave"; + btnSave.Padding = new Padding(6); + btnSave.Size = new Size(88, 27); + btnSave.TabIndex = 19; + btnSave.Text = "Ok"; + btnSave.Click += btnSave_Click; // // EventCommandOpenCraftingTable // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48))))); - this.Controls.Add(this.grpTable); - this.Name = "EventCommandOpenCraftingTable"; - this.Size = new System.Drawing.Size(182, 132); - this.grpTable.ResumeLayout(false); - this.grpTable.PerformLayout(); - this.ResumeLayout(false); - + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + AutoSize = true; + BackColor = System.Drawing.Color.FromArgb(45, 45, 48); + Controls.Add(grpTable); + Margin = new Padding(4, 3, 4, 3); + Name = "EventCommandOpenCraftingTable"; + Size = new Size(283, 125); + grpTable.ResumeLayout(false); + grpTable.PerformLayout(); + ResumeLayout(false); } #endregion @@ -124,7 +142,8 @@ private void InitializeComponent() private DarkGroupBox grpTable; private DarkButton btnCancel; private DarkButton btnSave; - private System.Windows.Forms.Label lblTable; + private Label lblTable; private DarkComboBox cmbTable; + private DarkCheckBox chkJournalMode; } } diff --git a/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.cs b/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.cs index 7db78c32e9..c3470852d6 100644 --- a/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.cs +++ b/Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_OpenCrafting.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Windows.Forms; using Intersect.Editor.Localization; @@ -24,6 +24,7 @@ public EventCommandOpenCraftingTable(OpenCraftingTableCommand refCommand, FrmEve cmbTable.Items.Clear(); cmbTable.Items.AddRange(CraftingTableBase.Names); cmbTable.SelectedIndex = CraftingTableBase.ListIndex(mMyCommand.CraftingTableId); + chkJournalMode.Checked = mMyCommand.JournalMode; } private void InitLocalization() @@ -32,6 +33,16 @@ private void InitLocalization() lblTable.Text = Strings.EventOpenCrafting.label; btnSave.Text = Strings.EventOpenCrafting.okay; btnCancel.Text = Strings.EventOpenCrafting.cancel; + chkJournalMode.Text = Strings.EventOpenCrafting.JournalMode; + + ToolTip toolTip1 = new ToolTip(); + + toolTip1.AutoPopDelay = 5000; + toolTip1.InitialDelay = 1000; + toolTip1.ReshowDelay = 500; + toolTip1.ShowAlways = true; + + toolTip1.SetToolTip(chkJournalMode, Strings.EventOpenCrafting.JournalModeTooltip); } private void btnSave_Click(object sender, EventArgs e) @@ -41,6 +52,8 @@ private void btnSave_Click(object sender, EventArgs e) mMyCommand.CraftingTableId = CraftingTableBase.IdFromList(cmbTable.SelectedIndex); } + mMyCommand.JournalMode = chkJournalMode.Checked; + mEventEditor.FinishCommandEdit(); } diff --git a/Intersect.Editor/Localization/Strings.cs b/Intersect.Editor/Localization/Strings.cs index 13632f5813..0631bd8ec7 100644 --- a/Intersect.Editor/Localization/Strings.cs +++ b/Intersect.Editor/Localization/Strings.cs @@ -2068,6 +2068,9 @@ public partial struct EventCommandList public static LocalizedString opencrafting = @"Open Crafting Table [{00}]"; + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString OpenCraftingJournal = @"Open Crafting Journal [{00}]"; + public static LocalizedString openshop = @"Open Shop [{00}]"; public static LocalizedString playanimation = @"Play Animation {00} {01}"; @@ -3089,6 +3092,12 @@ public partial struct EventOpenCrafting public static LocalizedString label = @"Table:"; + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString JournalMode = @"Journal Mode?"; + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString JournalModeTooltip = @"Opens the crafting window without the option for the player to actually craft."; + public static LocalizedString okay = @"Ok"; public static LocalizedString title = @"Open Crafting"; diff --git a/Intersect.Server.Core/Entities/Events/CommandProcessing.cs b/Intersect.Server.Core/Entities/Events/CommandProcessing.cs index 60c640fcc3..11eb04cfed 100644 --- a/Intersect.Server.Core/Entities/Events/CommandProcessing.cs +++ b/Intersect.Server.Core/Entities/Events/CommandProcessing.cs @@ -1238,7 +1238,7 @@ private static void ProcessCommand( Stack callStack ) { - player.OpenCraftingTable(CraftingTableBase.Get(command.CraftingTableId)); + player.OpenCraftingTable(CraftingTableBase.Get(command.CraftingTableId), command.JournalMode); callStack.Peek().WaitingForResponse = CommandInstance.EventResponse.Crafting; } diff --git a/Intersect.Server.Core/Entities/Player.cs b/Intersect.Server.Core/Entities/Player.cs index ac47a81bda..4ad64e3c3f 100644 --- a/Intersect.Server.Core/Entities/Player.cs +++ b/Intersect.Server.Core/Entities/Player.cs @@ -3910,7 +3910,7 @@ public void BuyItem(int slot, int amount) } //Crafting - public bool OpenCraftingTable(CraftingTableBase table) + public bool OpenCraftingTable(CraftingTableBase table, bool journalMode) { if (IsBusy()) { @@ -3920,7 +3920,8 @@ public bool OpenCraftingTable(CraftingTableBase table) if (table != null) { OpenCraftingTableId = table.Id; - PacketSender.SendOpenCraftingTable(this, table); + CraftJournalMode = journalMode; + PacketSender.SendOpenCraftingTable(this, table, journalMode); } return true; @@ -7371,6 +7372,8 @@ public bool TryAddToInstanceController() [NotMapped, JsonIgnore] public CraftingState CraftingState { get; set; } [NotMapped, JsonIgnore] public Guid OpenCraftingTableId { get; set; } + + [NotMapped, JsonIgnore] public bool CraftJournalMode { get; set; } #endregion diff --git a/Intersect.Server.Core/Localization/Strings.cs b/Intersect.Server.Core/Localization/Strings.cs index 3e41be00a3..b4feee205e 100644 --- a/Intersect.Server.Core/Localization/Strings.cs +++ b/Intersect.Server.Core/Localization/Strings.cs @@ -535,6 +535,9 @@ public sealed partial class CraftingNamespace : LocaleNamespace [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public readonly LocalizedString CraftFailureLostItems = @"The attempt to create the item {00} failed and you lost the materials!"; + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public readonly LocalizedString InJournalMode = @"You cannot craft from your crafting journal!"; + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public readonly LocalizedString RequirementsNotMet = @"You do not meet the requirements in order to craft this item!"; diff --git a/Intersect.Server.Core/Networking/PacketHandler.cs b/Intersect.Server.Core/Networking/PacketHandler.cs index 331a368db7..3c3e623051 100644 --- a/Intersect.Server.Core/Networking/PacketHandler.cs +++ b/Intersect.Server.Core/Networking/PacketHandler.cs @@ -1904,6 +1904,12 @@ public void HandlePacket(Client client, CraftItemPacket packet) return; } + if (player.CraftJournalMode) + { + PacketSender.SendChatMsg(player, Strings.Crafting.InJournalMode, ChatMessageType.Notice); + return; + } + lock (player.EntityLock) { //if player hit stop button in crafting window diff --git a/Intersect.Server.Core/Networking/PacketSender.cs b/Intersect.Server.Core/Networking/PacketSender.cs index 2a6099402c..2450734a89 100644 --- a/Intersect.Server.Core/Networking/PacketSender.cs +++ b/Intersect.Server.Core/Networking/PacketSender.cs @@ -1683,7 +1683,7 @@ public static void SendCloseShop(Player player) } //CraftingTablePacket - public static void SendOpenCraftingTable(Player player, CraftingTableBase table) + public static void SendOpenCraftingTable(Player player, CraftingTableBase table, bool journalMode) { if (table != null) { @@ -1701,15 +1701,14 @@ public static void SendOpenCraftingTable(Player player, CraftingTableBase table) } //Send the modfied table - player.SendPacket(new CraftingTablePacket(playerTable.JsonData, false)); - + player.SendPacket(new CraftingTablePacket(playerTable.JsonData, false, journalMode)); } } //CraftingTablePacket public static void SendCloseCraftingTable(Player player) { - player.SendPacket(new CraftingTablePacket(null, true)); + player.SendPacket(new CraftingTablePacket(null, true, false)); } //GameObjectPacket