Skip to content

Commit 3ef493c

Browse files
committed
Compare To Path 5.5
1 parent 4df3ebf commit 3ef493c

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

HousingCheck/HousingCheck.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public enum ApiVersion { V1, V2 }
3030

3131
public class HousingCheck : IActPluginV1
3232
{
33-
public const int OPCODE = 894;
33+
public static bool DEBUG_MODE = false;
34+
public const int OPCODE = 321;
3435
/// <summary>
3536
/// 房屋列表,用于和控件双向绑定
3637
/// </summary>
@@ -228,7 +229,11 @@ void NetworkReceived(string connection, long epoch, byte[] message)
228229
{
229230
var opcode = BitConverter.ToUInt16(message, 18);
230231
//if (message.Length == 2440) Log("Debug", "opcode=" + opcode);
231-
if (opcode != OPCODE || message.Length != 2440) return;
232+
if ((!DEBUG_MODE && opcode != OPCODE) || message.Length != 2440) return;
233+
if (DEBUG_MODE)
234+
{
235+
Log("Info", string.Format("opcode: {0:X}", opcode.ToString()), true);
236+
}
232237

233238
HousingSlotSnapshot snapshot;
234239
List<HousingOnSaleItem> updatedHousingList = new List<HousingOnSaleItem>();

HousingCheck/PluginControl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public void LoadSettings()
9999
checkBoxUpload.Checked = bool.Parse(head?.SelectSingleNode("AutoUpload")?.InnerText ?? "false");
100100
//checkBoxML.Checked = bool.Parse(head?.SelectSingleNode("UploadMLOnly")?.InnerText ?? "true");
101101
checkBoxUploadSnapshot.Checked = bool.Parse(head?.SelectSingleNode("UploadSnapshot")?.InnerText ?? "true");
102+
HousingCheck.DEBUG_MODE = bool.Parse(head?.SelectSingleNode("DebugMode")?.InnerText ?? "false");
102103
}
103104
catch (Exception)
104105
{
@@ -119,6 +120,7 @@ public void SaveSettings()
119120
xWriter.WriteElementString("AutoUpload", checkBoxUpload.Checked.ToString());
120121
//xWriter.WriteElementString("UploadMLOnly", checkBoxML.Checked.ToString());
121122
xWriter.WriteElementString("UploadSnapshot", checkBoxUploadSnapshot.Checked.ToString());
123+
xWriter.WriteElementString("DebugMode", HousingCheck.DEBUG_MODE.ToString());
122124
xWriter.WriteEndElement(); // </Config>
123125
xWriter.WriteEndDocument(); // Tie up loose ends (shouldn't be any)
124126
xWriter.Flush(); // Flush the file buffer to disk

HousingCheck/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.4.2.0")]
36-
[assembly: AssemblyFileVersion("1.4.2.0")]
35+
[assembly: AssemblyVersion("1.4.3.0")]
36+
[assembly: AssemblyFileVersion("1.4.3.0")]

0 commit comments

Comments
 (0)