1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-23 05:07:47 +00:00

Cleaned up some warnings.

This commit is contained in:
Filip Maj 2019-05-04 20:53:08 -04:00
parent 1e4a1cf263
commit 10017b7e8c
27 changed files with 68 additions and 98 deletions

View file

@ -60,7 +60,7 @@ namespace FFXIVClassic.Common
// Calculate a bitmask of the desired length
long mask = 0;
for (int i = 0; i < fieldLength; i++)
mask |= 1 << i;
mask |= 1L << i;
r |= ((UInt32)f.GetValue(t) & mask) << offset;

View file

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic.Common
{
@ -141,5 +137,23 @@ namespace FFXIVClassic.Common
//If the relative angle is less than the total angle of the cone, the target is inside the cone
return angleToTarget >= 0 && angleToTarget <= (coneAngle * Math.PI);
}
public override bool Equals(object obj)
{
var vector = obj as Vector3;
return vector != null &&
X == vector.X &&
Y == vector.Y &&
Z == vector.Z;
}
public override int GetHashCode()
{
var hashCode = -307843816;
hashCode = hashCode * -1521134295 + X.GetHashCode();
hashCode = hashCode * -1521134295 + Y.GetHashCode();
hashCode = hashCode * -1521134295 + Z.GetHashCode();
return hashCode;
}
}
}

View file

@ -58,7 +58,7 @@ namespace FFXIVClassic_Lobby_Server
socket.Send(packetBytes);
}
catch(Exception e)
{ Program.Log.Error("Weird case, socket was d/ced: {0}", e); }
{ Program.Log.Error(e, "Weird case, socket was d/ced: {0}"); }
}
}

View file

@ -509,7 +509,7 @@ namespace FFXIVClassic_Map_Server.Actors
{
className = className.Substring(0, 20 - zoneName.Length);
}
catch (ArgumentOutOfRangeException e)
catch (ArgumentOutOfRangeException)
{ }
//Convert actor number to base 63

View file

@ -41,7 +41,7 @@ namespace FFXIVClassic_Map_Server.Actors
byte byteOut = (Byte)(byteIn ^ 0x73);
binWriter.Write((Byte)byteOut);
}
catch (EndOfStreamException e) { break; }
catch (EndOfStreamException) { break; }
}
binReader.Close();
@ -88,7 +88,7 @@ namespace FFXIVClassic_Map_Server.Actors
}
}
}
catch(FileNotFoundException e)
catch(FileNotFoundException)
{ Program.Log.Error("Could not find staticactors file."); return false; }
Program.Log.Info("Loaded {0} static actors.", mStaticActors.Count());

View file

@ -2,20 +2,13 @@
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.actors.area;
using FFXIVClassic_Map_Server.actors.chara.npc;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.dataobjects.chara;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using MoonSharp.Interpreter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.actors.group;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.actors.chara.ai.controllers;
namespace FFXIVClassic_Map_Server.Actors
{

View file

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.packets.send.actor;

View file

@ -1,33 +1,28 @@
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.actors.chara.player;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.dataobjects.chara;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.packets.send.events;
using FFXIVClassic_Map_Server.packets.send.actor.events;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.packets.send.events;
using FFXIVClassic_Map_Server.packets.send.player;
using FFXIVClassic_Map_Server.utils;
using System;
using System.Collections.Generic;
using MoonSharp.Interpreter;
using FFXIVClassic_Map_Server.packets.receive.events;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.actors.group;
using FFXIVClassic_Map_Server.packets.send.group;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.dataobjects.chara;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.WorldPackets.Send.Group;
using FFXIVClassic_Map_Server.utils;
using FFXIVClassic_Map_Server.actors.group;
using FFXIVClassic_Map_Server.actors.chara.player;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.actors.chara.npc;
using FFXIVClassic_Map_Server.actors.chara.ai;
using FFXIVClassic_Map_Server.actors.chara.ai.controllers;
using FFXIVClassic_Map_Server.packets.send.actor.battle;
using FFXIVClassic_Map_Server.actors.chara.ai.utils;
using FFXIVClassic_Map_Server.actors.chara.ai.state;
using FFXIVClassic_Map_Server.actors.chara.npc;
using FFXIVClassic_Map_Server.actors.chara;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.packets.send.events;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.packets.send.player;
using FFXIVClassic_Map_Server.packets.send.actor.battle;
using FFXIVClassic_Map_Server.packets.receive.events;
namespace FFXIVClassic_Map_Server.Actors
{

View file

@ -241,7 +241,7 @@ namespace FFXIVClassic_Map_Server.actors.director
{
className = className.Substring(0, 20 - zoneName.Length);
}
catch (ArgumentOutOfRangeException e)
catch (ArgumentOutOfRangeException)
{ }
//Convert actor number to base 63

View file

@ -41,7 +41,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
socket.Send(packetBytes);
}
catch (Exception e)
{ Program.Log.Error("Weird case, socket was d/ced: {0}", e); }
{ Program.Log.Error(e, "Weird case, socket was d/ced: {0}"); }
}
}

View file

@ -1,7 +1,5 @@
using FFXIVClassic.Common;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class AddActorPacket

View file

@ -1,7 +1,5 @@
using FFXIVClassic.Common;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class DeleteAllActorsPacket

View file

@ -1,8 +1,5 @@
using FFXIVClassic.Common;
using System;
using System.IO;
using FFXIVClassic.Common;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor

View file

@ -5,8 +5,6 @@ using System.Linq;
using System.Reflection;
using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorPropetyPacket

View file

@ -2,8 +2,6 @@
using System;
using System.IO;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusAllPacket

View file

@ -2,8 +2,6 @@
using System;
using System.IO;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusPacket

View file

@ -3,7 +3,6 @@ using System;
using System.IO;
using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class _0x132Packet

View file

@ -4,8 +4,6 @@ using System;
using System.IO;
using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetEmoteEventCondition

View file

@ -3,8 +3,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX08Packet

View file

@ -1,8 +1,6 @@
using FFXIVClassic.Common;
using System.IO;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.player
{
class SetCompletedAchievementsPacket

View file

@ -3,8 +3,6 @@ using System;
using System.IO;
using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.player
{
class SetCutsceneBookPacket

View file

@ -1,8 +1,6 @@
using FFXIVClassic.Common;
using System;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.player
{
class SetPlayerDreamPacket

View file

@ -1,7 +1,4 @@
using FFXIVClassic.Common;
using System;
using FFXIVClassic.Common;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.player

View file

@ -1,7 +1,5 @@
using FFXIVClassic.Common;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.supportdesk
{
class GMTicketSentResponsePacket

View file

@ -50,7 +50,7 @@ namespace FFXIVClassic_Map_Server.utils
name = matches[2].Value.Trim(',');
}
catch (FormatException e)
catch (FormatException)
{ continue; }
placenames.Add(id, name);
@ -72,7 +72,7 @@ namespace FFXIVClassic_Map_Server.utils
id = UInt32.Parse(matches[0].Value.Trim(','));
pId = UInt32.Parse(matches[1].Value.Trim(','));
}
catch (FormatException e)
catch (FormatException)
{ continue; }
cmd.Parameters["@id"].Value = id;
@ -131,7 +131,7 @@ namespace FFXIVClassic_Map_Server.utils
nameId = UInt32.Parse(matches[6].Value.Trim(','));
}
catch (FormatException e)
catch (FormatException)
{ continue; }
cmd.Parameters["@id"].Value = id;
@ -198,7 +198,7 @@ namespace FFXIVClassic_Map_Server.utils
}
catch (FormatException e)
catch (FormatException)
{ continue; }
cmd.Parameters["@id"].Value = id;
@ -260,7 +260,7 @@ namespace FFXIVClassic_Map_Server.utils
name = matches2[9].Value.Trim(',');
points = UInt32.Parse(matches[3].Value.Trim(','));
}
catch (FormatException e)
catch (FormatException)
{ continue; }
if (id == 100)

View file

@ -47,7 +47,7 @@ namespace FFXIVClassic_World_Server
socket.Send(packetBytes);
}
catch (Exception e)
{ Program.Log.Error("Weird case, socket was d/ced: {0}", e); }
{ Program.Log.Error(e, "Weird case, socket was d/ced: {0}"); }
}
}

View file

@ -59,7 +59,7 @@ namespace FFXIVClassic_World_Server.DataObjects
throw new ApplicationException("Error occured starting listeners, check inner exception", e);
}
}
catch (Exception e)
catch (Exception)
{ Program.Log.Error("Failed to connect"); return false; }
return true;
@ -76,7 +76,7 @@ namespace FFXIVClassic_World_Server.DataObjects
zoneServerConnection.Send(packetBytes);
}
catch (Exception e)
{ Program.Log.Error("Weird case, socket was d/ced: {0}", e); }
{ Program.Log.Error(e, "Weird case, socket was d/ced: {0}"); }
}
else
{