Skip to content

Commit

Permalink
Merge branch 'development' into masterIntoDev
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsnider committed Apr 6, 2020
2 parents 3ff3d7d + 3641c1f commit 8a36b82
Show file tree
Hide file tree
Showing 45 changed files with 640 additions and 249 deletions.
10 changes: 8 additions & 2 deletions Intersect (Core)/Config/Options.cs
Expand Up @@ -50,6 +50,8 @@ public class Options

[JsonProperty("Player")] public PlayerOptions PlayerOpts = new PlayerOptions();

[JsonProperty("Party")] public PartyOptions PartyOpts = new PartyOptions();

[JsonProperty("Security")] public SecurityOptions SecurityOpts = new SecurityOptions();

public SmtpSettings SmtpSettings = new SmtpSettings();
Expand Down Expand Up @@ -79,9 +81,13 @@ public class Options

public static int RequestTimeout => Instance.PlayerOpts.RequestTimeout;

public static int TradeRange => Instance.PlayerOpts.TradeRange;
public static int PartyInviteRange => Instance.PartyOpts.InviteRange;

public static int PartySharedXpRange => Instance.PartyOpts.SharedXpRange;

public static int PartyRange => Instance.PlayerOpts.PartyRange;
public static int PartyStartCommonEventRange => Instance.PartyOpts.NpcDeathCommonEventStartRange;

public static int TradeRange => Instance.PlayerOpts.TradeRange;

public static int WeaponIndex => Instance.EquipmentOpts.WeaponSlot;

Expand Down
19 changes: 19 additions & 0 deletions Intersect (Core)/Config/PartyOptions.cs
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Intersect.Config
{
public class PartyOptions
{

public int InviteRange = 40;

public int SharedXpRange = 40;

public int NpcDeathCommonEventStartRange = 0;

}
}
2 changes: 0 additions & 2 deletions Intersect (Core)/Config/PlayerOptions.cs
Expand Up @@ -18,8 +18,6 @@ public class PlayerOptions

public int MaxStat = 255;

public int PartyRange = 80;

public int RequestTimeout = 300000;

public int TradeRange = 6;
Expand Down
9 changes: 0 additions & 9 deletions Intersect (Core)/Crypto/RsaUtils.cs

This file was deleted.

25 changes: 25 additions & 0 deletions Intersect (Core)/Enums/SwitchVariableTypes.cs
Expand Up @@ -23,6 +23,8 @@ public enum VariableTypes

}

//Should properly seperate static value, player & global vars into a seperate enum.
//But technical debt :/
public enum VariableMods
{

Expand Down Expand Up @@ -50,6 +52,29 @@ public enum VariableMods

Replace,

Multiply,

MultiplyPlayerVar,

MultiplyGlobalVar,

Divide,

DividePlayerVar,

DivideGlobalVar,

LeftShift,

LeftShiftPlayerVar,

LeftShiftGlobalVar,

RightShift,

RightShiftPlayerVar,

RightShiftGlobalVar
}

public enum VariableComparators
Expand Down
5 changes: 0 additions & 5 deletions Intersect (Core)/GameObjects/Events/EventMoveRoute.cs
Expand Up @@ -8,11 +8,6 @@ namespace Intersect.GameObjects.Events

public class EventMoveRoute
{

public EventMoveRoute()
{
}

public List<MoveRouteAction> Actions { get; set; } = new List<MoveRouteAction>();

public bool IgnoreIfBlocked { get; set; }
Expand Down
5 changes: 0 additions & 5 deletions Intersect (Core)/GameObjects/Maps/MapAttribute.cs
Expand Up @@ -9,11 +9,6 @@ namespace Intersect.GameObjects.Maps

public abstract class MapAttribute
{

public MapAttribute()
{
}

public abstract MapAttributes Type { get; }

public static MapAttribute CreateAttribute(MapAttributes type)
Expand Down
2 changes: 1 addition & 1 deletion Intersect (Core)/Intersect (Core).csproj
Expand Up @@ -192,6 +192,7 @@
<Compile Include="Configuration\ConfigurationHelper.cs" />
<Compile Include="Config\ChatOptions.cs" />
<Compile Include="Config\PacketOptions.cs" />
<Compile Include="Config\PartyOptions.cs" />
<Compile Include="Config\SecurityOptions.cs" />
<Compile Include="Core\ApplicationContext.cs" />
<Compile Include="Core\ExperimentalFeatures\CommonExperiments.Core.cs" />
Expand Down Expand Up @@ -219,7 +220,6 @@
<Compile Include="Config\Passability.cs" />
<Compile Include="Console.cs" />
<Compile Include="Config\SmtpSettings.cs" />
<Compile Include="Crypto\RsaUtils.cs" />
<Compile Include="CustomColors.cs" />
<Compile Include="ErrorHandling\ExceptionInfo.cs" />
<Compile Include="Extensions\ArrayExtensions.cs" />
Expand Down
1 change: 0 additions & 1 deletion Intersect (Core)/Logging/Formatting/DefaultFormatter.cs
Expand Up @@ -120,7 +120,6 @@ private string FormatPrefix([NotNull] LogConfiguration configuration, LogLevel l
}

var innerException = exception;
;
while ((innerException = innerException.InnerException) != null)
{
builder.AppendLine(@"Caused By");
Expand Down
5 changes: 0 additions & 5 deletions Intersect (Core)/Network/CerasPacket.cs
Expand Up @@ -10,13 +10,8 @@ namespace Intersect.Network

public abstract class CerasPacket : IPacket
{

[NotNull] private static readonly Ceras sCerasInstance = new Ceras(true);

protected CerasPacket()
{
}

/// <inheritdoc />
public virtual void Dispose()
{
Expand Down
2 changes: 1 addition & 1 deletion Intersect (Core)/Network/NetworkStatus.cs
Expand Up @@ -16,7 +16,7 @@ public enum NetworkStatus
VersionMismatch,

ServerFull,

HandshakeFailure,

Quitting,
Expand Down
4 changes: 2 additions & 2 deletions Intersect (Core)/Properties/AssemblyInfo.cs
Expand Up @@ -38,5 +38,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("0.6.1.0")]
[assembly: AssemblyFileVersion("0.6.1.0")]
[assembly: AssemblyVersion("0.6.2.0")]
[assembly: AssemblyFileVersion("0.6.2.0")]
Expand Up @@ -5,6 +5,7 @@

using Intersect.Client.Framework.Audio;
using Intersect.Client.Framework.Graphics;
using Intersect.Logging;

namespace Intersect.Client.Framework.File_Management
{
Expand Down Expand Up @@ -400,8 +401,9 @@ public virtual void SaveUIJson(UI stage, string name, string json, string resolu
{
File.WriteAllText(path, json);
}
catch (Exception)
catch (Exception exception)
{
Log.Debug(exception);
}

return;
Expand All @@ -413,8 +415,9 @@ public virtual void SaveUIJson(UI stage, string name, string json, string resolu
{
File.WriteAllText(path, json);
}
catch (Exception)
catch (Exception exception)
{
Log.Debug(exception);
}
}

Expand Down
5 changes: 0 additions & 5 deletions Intersect.Client.Framework/GenericClasses/OpenFileDialog.cs
Expand Up @@ -10,11 +10,6 @@ public enum DialogResult

public class OpenFileDialog
{

public OpenFileDialog()
{
}

public string Title { get; set; }

public string InitialDirectory { get; set; }
Expand Down
5 changes: 0 additions & 5 deletions Intersect.Client.Framework/GenericClasses/SaveFileDialog.cs
Expand Up @@ -3,11 +3,6 @@

public class SaveFileDialog
{

public SaveFileDialog()
{
}

public string Title { get; set; }

public string InitialDirectory { get; set; }
Expand Down
6 changes: 4 additions & 2 deletions Intersect.Client.Framework/Gwen/Control/Base.cs
Expand Up @@ -11,6 +11,9 @@
using Intersect.Client.Framework.Gwen.ControlInternal;
using Intersect.Client.Framework.Gwen.DragDrop;
using Intersect.Client.Framework.Gwen.Input;
#if DEBUG
using Intersect.Logging;
#endif

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
Expand Down Expand Up @@ -1097,8 +1100,7 @@ private bool HasNamedChildren()
#if DEBUG
~Base()
{
//throw new InvalidOperationException(String.Format("IDisposable object finalized [{1:X}]: {0}", this, GetHashCode()));
////debug.print(String.Format("IDisposable object finalized: {0}", GetType()));
Log.Debug($"IDisposable object finalized: {GetType()}");
}
#endif

Expand Down
12 changes: 7 additions & 5 deletions Intersect.Client.Framework/Gwen/Renderer/Base.cs
@@ -1,7 +1,10 @@
using System;

using Intersect.Client.Framework.GenericClasses;
using Intersect.Client.Framework.GenericClasses;
using Intersect.Client.Framework.Graphics;
#if DEBUG
using Intersect.Logging;
#endif

using System;

namespace Intersect.Client.Framework.Gwen.Renderer
{
Expand Down Expand Up @@ -96,8 +99,7 @@ public virtual void Dispose()
#if DEBUG
~Base()
{
//throw new InvalidOperationException(String.Format("IDisposable object finalized: {0}", GetType()));
////debug.print(String.Format("IDisposable object finalized: {0}", GetType()));
Log.Debug($"IDisposable object finalized: {GetType()}");
}
#endif

Expand Down
13 changes: 8 additions & 5 deletions Intersect.Client.Framework/Gwen/Skin/Base.cs
@@ -1,8 +1,12 @@
using System;

using Intersect.Client.Framework.GenericClasses;
using Intersect.Client.Framework.GenericClasses;
using Intersect.Client.Framework.Graphics;

using System;

#if DEBUG
using Intersect.Logging;
#endif

namespace Intersect.Client.Framework.Gwen.Skin
{

Expand Down Expand Up @@ -56,8 +60,7 @@ public virtual void Dispose()
#if DEBUG
~Base()
{
//throw new InvalidOperationException(String.Format("IDisposable object finalized: {0}", GetType()));
////debug.print(String.Format("IDisposable object finalized: {0}", GetType()));
Log.Debug($"IDisposable object finalized: {GetType()}");
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions Intersect.Client.Framework/Properties/AssemblyInfo.cs
Expand Up @@ -34,5 +34,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.6.1.0")]
[assembly: AssemblyFileVersion("0.6.1.0")]
[assembly: AssemblyVersion("0.6.2.0")]
[assembly: AssemblyFileVersion("0.6.2.0")]
1 change: 0 additions & 1 deletion Intersect.Client/Interface/Game/Draggable.cs
Expand Up @@ -61,7 +61,6 @@ public void Dispose()
Active = null;
}

;
Interface.GameUi.GameCanvas.RemoveChild(mPnl, false);
}

Expand Down
4 changes: 0 additions & 4 deletions Intersect.Client/Items/Item.cs
Expand Up @@ -17,10 +17,6 @@ public class Item

public int[] StatBuffs = new int[(int) Stats.StatCount];

public Item()
{
}

public ItemBase Base => ItemBase.Get(ItemId);

public void Load(Guid id, int quantity, Guid? bagId, int[] statBuffs)
Expand Down
11 changes: 3 additions & 8 deletions Intersect.Client/MonoGame/Graphics/MonoTileBuffer.cs
Expand Up @@ -176,16 +176,11 @@ public override bool SetData()

public override void Dispose()
{
if (vertexBuffer != null)
{
;
}

vertexBuffer.Dispose();
vertexBuffer?.Dispose();
vertexBuffer = null;
indexBuffer.Dispose();
TileBufferCount--;
indexBuffer?.Dispose();
indexBuffer = null;
TileBufferCount--;
disposed = true;
}

Expand Down
4 changes: 0 additions & 4 deletions Intersect.Client/MonoGame/Network/MonoSocket.cs
Expand Up @@ -21,10 +21,6 @@ public class MonoSocket : GameSocket
public static ConcurrentQueue<KeyValuePair<IConnection, IPacket>> PacketQueue =
new ConcurrentQueue<KeyValuePair<IConnection, IPacket>>();

public MonoSocket()
{
}

public override void Connect(string host, int port)
{
if (ClientLidgrenNetwork != null)
Expand Down
4 changes: 2 additions & 2 deletions Intersect.Client/Properties/AssemblyInfo.cs
Expand Up @@ -38,5 +38,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("0.6.1.0")]
[assembly: AssemblyFileVersion("0.6.1.0")]
[assembly: AssemblyVersion("0.6.2.0")]
[assembly: AssemblyFileVersion("0.6.2.0")]

0 comments on commit 8a36b82

Please sign in to comment.