mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 03:20:30 +02:00
Cleaned up some warnings.
This commit is contained in:
parent
1e4a1cf263
commit
10017b7e8c
27 changed files with 68 additions and 98 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic.Common
|
||||
{
|
||||
|
@ -64,7 +60,7 @@ namespace FFXIVClassic.Common
|
|||
public static bool operator ==(Vector3 lhs, Vector3 rhs)
|
||||
{
|
||||
return (lhs?.X == rhs?.X && lhs?.Y == rhs?.Y && lhs?.Z == rhs?.Z);
|
||||
}
|
||||
}
|
||||
|
||||
public float Length()
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue