Skip to content

Commit

Permalink
Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
jianmingyong committed Nov 27, 2015
1 parent 92db655 commit f5a2916
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public void Handle(Package p, Player Player = null)
#region /op <Name> [OperatorLevel] [Reason]
if (this.MatchRequiredParam(p, Functions.CommandParamType.Any, Functions.CommandParamType.Integer, Functions.CommandParamType.Any))
{
List<string> Group = this.Groups(p, Functions.CommandParamType.Any, Functions.CommandParamType.Integer, Functions.CommandParamType.Any);

if (Player != null && this.MatchRequiredPermission(Player))
{
List<string> Group = this.Groups(p, Functions.CommandParamType.Any, Functions.CommandParamType.Integer, Functions.CommandParamType.Any);

if (!Core.Pokemon3DPlayer.HasPlayer(Group[0]))
{
Player.CommandFeedback(Core.Setting.Token("SERVER_PLAYERNOTEXIST"), null);
Expand All @@ -66,8 +66,6 @@ public void Handle(Package p, Player Player = null)
}
else if (Player == null)
{
List<string> Group = this.Groups(p, Functions.CommandParamType.Any, Functions.CommandParamType.Integer, Functions.CommandParamType.Any);

if (!Core.Pokemon3DPlayer.HasPlayer(Group[0]))
{
Core.Logger.Log(Core.Setting.Token("SERVER_PLAYERNOTEXIST"), Logger.LogTypes.Info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private void HandleGameData(Package p)
bool IsGameModeMatched = false;
for (int i = 0; i < Core.Setting.GameMode.Count; i++)
{
if (string.Equals(Core.Setting.GameMode[i].Trim(), Player.GameMode, StringComparison.OrdinalIgnoreCase))
if (string.Equals(Core.Setting.GameMode[i].Trim(), Player.GameMode, StringComparison.OrdinalIgnoreCase) || string.Equals(Core.Setting.GameMode[i].Trim(), p.DataItems[0], StringComparison.OrdinalIgnoreCase))
{
IsGameModeMatched = true;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void ThreadStartListening()
}
}
catch (ThreadAbortException) { return; }
catch (Exception) { }
catch (Exception) { Client.Close(); }
} while (IsActive);
}

Expand Down
6 changes: 3 additions & 3 deletions Pokemon.3D.Server.Core/Shared/jianmingyong/Modules/Math.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public static class Math
/// <summary>
/// Represents the natural logarithmic base, specified by the constant, e.
/// </summary>
public static readonly double E = "2.7182818284590452354".ToDouble();
public static readonly double E = System.Math.E.ToString().ToDouble();

/// <summary>
/// Represents the natural logarithmic base, specified by the constant, e.
/// Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
/// </summary>
public static readonly double PI = "3.14159265358979323846".ToDouble();
public static readonly double PI = System.Math.PI.ToString().ToDouble();

/// <summary>
/// Returns the absolute value of a Decimal number.
Expand Down

0 comments on commit f5a2916

Please sign in to comment.