Core/Refactor: Part 3
This commit is contained in:
@@ -290,7 +290,7 @@ namespace System.Collections
|
||||
{
|
||||
Contract.Ensures(Contract.Result<int>() >= 0);
|
||||
|
||||
return (int)_mLength;
|
||||
return _mLength;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ namespace Framework.Constants
|
||||
{
|
||||
None = 0x00,
|
||||
Read = 0x01,
|
||||
Returned = 0x02, /// This Mail Was Returned. Do Not Allow Returning Mail Back Again.
|
||||
Copied = 0x04, /// This Mail Was Copied. Do Not Allow Making A Copy Of Items In Mail.
|
||||
Returned = 0x02, // This Mail Was Returned. Do Not Allow Returning Mail Back Again.
|
||||
Copied = 0x04, // This Mail Was Copied. Do Not Allow Making A Copy Of Items In Mail.
|
||||
CodPayment = 0x08,
|
||||
HasBody = 0x10 /// This Mail Has Body Text.
|
||||
HasBody = 0x10 // This Mail Has Body Text.
|
||||
}
|
||||
|
||||
public enum MailStationery
|
||||
|
||||
@@ -323,9 +323,9 @@ namespace Framework.Constants
|
||||
SavePlayer = 0x01,
|
||||
ResurrectPlayer = 0x02,
|
||||
SpellCastDeserter = 0x04,
|
||||
BGMountRestore = 0x08, ///< Flag to restore mount state after teleport from BG
|
||||
BGTaxiRestore = 0x10, ///< Flag to restore taxi state after teleport from BG
|
||||
BGGroupRestore = 0x20, ///< Flag to restore group state after teleport from BG
|
||||
BGMountRestore = 0x08, // Flag to restore mount state after teleport from BG
|
||||
BGTaxiRestore = 0x10, // Flag to restore taxi state after teleport from BG
|
||||
BGGroupRestore = 0x20, // Flag to restore group state after teleport from BG
|
||||
End
|
||||
}
|
||||
|
||||
|
||||
@@ -483,6 +483,12 @@ namespace Framework.Constants
|
||||
ChaseMove = 0x4000000,
|
||||
FollowMove = 0x8000000,
|
||||
IgnorePathfinding = 0x10000000,
|
||||
AllStateSupported = Died | MeleeAttacking | Stunned | Roaming | Chase
|
||||
| Fleeing | InFlight | Follow | Root | Confused
|
||||
| Distracted | Isolated | AttackPlayer | Casting
|
||||
| Possessed | Charging | Jumping | Move | Rotating
|
||||
| Evade | RoamingMove | ConfusedMove | FleeingMove
|
||||
| ChaseMove | FollowMove | IgnorePathfinding,
|
||||
Unattackable = InFlight,
|
||||
// For Real Move Using Movegen Check And Stop (Except Unstoppable Flight)
|
||||
Moving = RoamingMove | ConfusedMove | FleeingMove | ChaseMove | FollowMove,
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Framework.Database
|
||||
|
||||
public QueryCallbackStatus InvokeIfReady()
|
||||
{
|
||||
QueryCallbackData callback = _callbacks.Dequeue();
|
||||
QueryCallbackData callback = _callbacks.Peek();
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -64,6 +64,7 @@ namespace Framework.Database
|
||||
|
||||
cb(this, f.Result);
|
||||
|
||||
_callbacks.Dequeue();
|
||||
bool hasNext = _result != null;
|
||||
if (_callbacks.Count == 0)
|
||||
{
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Framework.Dynamic
|
||||
/// Calls the optional callback on successfully finish.
|
||||
/// </summary>
|
||||
/// <param name="milliseconds"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <returns></returns>
|
||||
public TaskScheduler Update(uint milliseconds, success_t callback = null)
|
||||
{
|
||||
@@ -89,6 +90,7 @@ namespace Framework.Dynamic
|
||||
/// Calls the optional callback on successfully finish.
|
||||
/// </summary>
|
||||
/// <param name="difftime"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <returns></returns>
|
||||
TaskScheduler Update(TimeSpan difftime, success_t callback = null)
|
||||
{
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Framework.GameMath
|
||||
/// the specified object.
|
||||
/// </summary>
|
||||
/// <param name="obj">An object to compare to this instance.</param>
|
||||
/// <returns>True if <paramref name="obj"/> is a <see cref="Vector2D"/> and has the same values as this instance; otherwise, False.</returns>
|
||||
/// <returns>True if <paramref name="obj"/> is a <see cref="Plane"/> and has the same values as this instance; otherwise, False.</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is Plane)
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace Framework.GameMath
|
||||
/// Converts the specified string to its <see cref="Quaternion"/> equivalent.
|
||||
/// </summary>
|
||||
/// <param name="value">A string representation of a <see cref="Quaternion"/></param>
|
||||
/// <returns>A <see cref="Quaternion"/> that represents the vector specified by the <paramref name="s"/> parameter.</returns>
|
||||
/// <returns>A <see cref="Quaternion"/> that represents the vector specified by the <paramref name="value"/> parameter.</returns>
|
||||
public static Quaternion Parse(string value)
|
||||
{
|
||||
Regex r = new Regex(@"\((?<w>.*),(?<x>.*),(?<y>.*),(?<z>.*)\)", RegexOptions.None);
|
||||
@@ -358,7 +358,7 @@ namespace Framework.GameMath
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies quaternion <paramref name="a"/> by quaternion <paramref name="b"/>.
|
||||
/// Multiplies quaternion <paramref name="left"/> by quaternion <paramref name="right"/>.
|
||||
/// </summary>
|
||||
/// <param name="left">A <see cref="Quaternion"/> instance.</param>
|
||||
/// <param name="right">A <see cref="Quaternion"/> instance.</param>
|
||||
@@ -374,7 +374,7 @@ namespace Framework.GameMath
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// Multiplies quaternion <paramref name="a"/> by quaternion <paramref name="b"/> and put the result in a third quaternion.
|
||||
/// Multiplies quaternion <paramref name="left"/> by quaternion <paramref name="right"/> and put the result in a third quaternion.
|
||||
/// </summary>
|
||||
/// <param name="left">A <see cref="Quaternion"/> instance.</param>
|
||||
/// <param name="right">A <see cref="Quaternion"/> instance.</param>
|
||||
@@ -617,7 +617,7 @@ namespace Framework.GameMath
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The quaternion values that are close to zero within the given tolerance are set to zero.
|
||||
/// The tolerance value used is <see cref="MathFunctions.EpsilonD"/>
|
||||
/// The tolerance value used is <see cref="MathFunctions.Epsilon"/>
|
||||
/// </remarks>
|
||||
public void ClampZero()
|
||||
{
|
||||
@@ -707,7 +707,7 @@ namespace Framework.GameMath
|
||||
return Quaternion.Subtract(left, right);
|
||||
}
|
||||
/// <summary>
|
||||
/// Multiplies quaternion <paramref name="a"/> by quaternion <paramref name="b"/>.
|
||||
/// Multiplies quaternion <paramref name="left"/> by quaternion <paramref name="right"/>.
|
||||
/// </summary>
|
||||
/// <param name="left">A <see cref="Quaternion"/> instance.</param>
|
||||
/// <param name="right">A <see cref="Quaternion"/> instance.</param>
|
||||
|
||||
@@ -285,7 +285,6 @@ namespace Framework.GameMath
|
||||
/// <param name="culture">The <see cref="System.Globalization.CultureInfo"/> to use as the current culture. </param>
|
||||
/// <param name="value">The <see cref="Object"/> to convert.</param>
|
||||
/// <returns>An <see cref="Object"/> that represents the converted value.</returns>
|
||||
/// <exception cref="ParseException">Failed parsing from string.</exception>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
|
||||
@@ -530,7 +530,7 @@ namespace Framework.GameMath
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The vector values that are close to zero within the given tolerance are set to zero.
|
||||
/// The tolerance value used is <see cref="MathFunctions.EpsilonD"/>
|
||||
/// The tolerance value used is <see cref="MathFunctions.Epsilon"/>
|
||||
/// </remarks>
|
||||
public void ClampZero()
|
||||
{
|
||||
@@ -825,10 +825,10 @@ namespace Framework.GameMath
|
||||
return array;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector2"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator List<float>(Vector2 vector)
|
||||
{
|
||||
List<float> list = new List<float>();
|
||||
@@ -838,10 +838,10 @@ namespace Framework.GameMath
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector2"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator LinkedList<float>(Vector2 vector)
|
||||
{
|
||||
LinkedList<float> list = new LinkedList<float>();
|
||||
@@ -910,7 +910,6 @@ namespace Framework.GameMath
|
||||
/// <param name="culture">The <see cref="System.Globalization.CultureInfo"/> to use as the current culture. </param>
|
||||
/// <param name="value">The <see cref="Object"/> to convert.</param>
|
||||
/// <returns>An <see cref="Object"/> that represents the converted value.</returns>
|
||||
/// <exception cref="ParseException">Failed parsing from string.</exception>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
|
||||
@@ -554,7 +554,7 @@ namespace Framework.GameMath
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The vector values that are close to zero within the given tolerance are set to zero.
|
||||
/// The tolerance value used is <see cref="MathFunctions.EpsilonD"/>
|
||||
/// The tolerance value used is <see cref="MathFunctions.Epsilon"/>
|
||||
/// </remarks>
|
||||
public void ClampZero()
|
||||
{
|
||||
@@ -895,10 +895,10 @@ namespace Framework.GameMath
|
||||
return array;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector3"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator List<float>(Vector3 vector)
|
||||
{
|
||||
List<float> list = new List<float>(3);
|
||||
@@ -909,10 +909,10 @@ namespace Framework.GameMath
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector3"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator LinkedList<float>(Vector3 vector)
|
||||
{
|
||||
LinkedList<float> list = new LinkedList<float>();
|
||||
@@ -1061,7 +1061,6 @@ namespace Framework.GameMath
|
||||
/// <param name="culture">The <see cref="System.Globalization.CultureInfo"/> to use as the current culture. </param>
|
||||
/// <param name="value">The <see cref="Object"/> to convert.</param>
|
||||
/// <returns>An <see cref="Object"/> that represents the converted value.</returns>
|
||||
/// <exception cref="ParseException">Failed parsing from string.</exception>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
|
||||
@@ -576,7 +576,7 @@ namespace Framework.GameMath
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The vector values that are close to zero within the given tolerance are set to zero.
|
||||
/// The tolerance value used is <see cref="MathFunctions.EpsilonD"/>
|
||||
/// The tolerance value used is <see cref="MathFunctions.Epsilon"/>
|
||||
/// </remarks>
|
||||
public void ClampZero()
|
||||
{
|
||||
@@ -908,10 +908,10 @@ namespace Framework.GameMath
|
||||
return array;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector4"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.List{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator List<float>(Vector4 vector)
|
||||
{
|
||||
List<float> list = new List<float>(4);
|
||||
@@ -923,10 +923,10 @@ namespace Framework.GameMath
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.
|
||||
/// Converts the vector to a <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.
|
||||
/// </summary>
|
||||
/// <param name="vector">A <see cref="Vector4"/> instance.</param>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList"/> of single-precision floating point values.</returns>
|
||||
/// <returns>A <see cref="System.Collections.Generic.LinkedList{T}"/> of single-precision floating point values.</returns>
|
||||
public static explicit operator LinkedList<float>(Vector4 vector)
|
||||
{
|
||||
LinkedList<float> list = new LinkedList<float>();
|
||||
@@ -997,7 +997,6 @@ namespace Framework.GameMath
|
||||
/// <param name="culture">The <see cref="System.Globalization.CultureInfo"/> to use as the current culture. </param>
|
||||
/// <param name="value">The <see cref="Object"/> to convert.</param>
|
||||
/// <returns>An <see cref="Object"/> that represents the converted value.</returns>
|
||||
/// <exception cref="ParseException">Failed parsing from string.</exception>
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
|
||||
@@ -247,8 +247,8 @@ public static partial class Detour
|
||||
/// @param[in] pt The point to check. [(x, y, z)]
|
||||
/// @param[in] verts The polygon vertices. [(x, y, z) * @p nverts]
|
||||
/// @param[in] nverts The number of vertices. [Limit: >= 3]
|
||||
/// @return True if the point is inside the polygon.
|
||||
/// @par
|
||||
// @return True if the point is inside the polygon.
|
||||
// @par
|
||||
///
|
||||
/// All points are projected onto the xz-plane, so the y-values are ignored.
|
||||
public static bool dtPointInPolygon(float[] pt, float[] verts, int nverts)
|
||||
@@ -305,8 +305,8 @@ public static partial class Detour
|
||||
/// @param[in] npolya The number of vertices in polygon A.
|
||||
/// @param[in] polyb Polygon B vertices. [(x, y, z) * @p npolyb]
|
||||
/// @param[in] npolyb The number of vertices in polygon B.
|
||||
/// @return True if the two polygons overlap.
|
||||
/// @par
|
||||
// @return True if the two polygons overlap.
|
||||
// @par
|
||||
///
|
||||
/// All vertices are projected onto the xz-plane, so the y-values are ignored.
|
||||
public static bool dtOverlapPolyPoly2D(float[] polya, int npolya, float[] polyb, int npolyb)
|
||||
@@ -478,9 +478,9 @@ public static partial class Detour
|
||||
return v < mn ? mn : (v > mx ? mx : v);
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Vector helper functions.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Vector helper functions.
|
||||
// @{
|
||||
|
||||
/// Derives the cross product of two vectors. (@p v1 x @p v2)
|
||||
/// @param[out] dest The cross product. [(x, y, z)]
|
||||
@@ -495,7 +495,7 @@ public static partial class Detour
|
||||
/// Derives the dot product of two vectors. (@p v1 . @p v2)
|
||||
/// @param[in] v1 A Vector [(x, y, z)]
|
||||
/// @param[in] v2 A vector [(x, y, z)]
|
||||
/// @return The dot product.
|
||||
// @return The dot product.
|
||||
public static float dtVdot(float[] v1, float[] v2)
|
||||
{
|
||||
return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
|
||||
@@ -521,7 +521,7 @@ public static partial class Detour
|
||||
/// @param[out] dest The result vector. [(x, y, x)]
|
||||
/// @param[in] v1 The starting vector.
|
||||
/// @param[in] v2 The destination vector.
|
||||
/// @param[in] t The interpolation factor. [Limits: 0 <= value <= 1.0]
|
||||
/// @param[in] t The interpolation factor. [Limits: 0 <= value <= 1.0]
|
||||
public static void dtVlerp(float[] dest, float[] v1, float[] v2, float t)
|
||||
{
|
||||
dest[0] = v1[0] + (v2[0] - v1[0]) * t;
|
||||
@@ -647,7 +647,7 @@ public static partial class Detour
|
||||
}
|
||||
/// Derives the scalar length of the vector.
|
||||
/// @param[in] v The vector. [(x, y, z)]
|
||||
/// @return The scalar length of the vector.
|
||||
// @return The scalar length of the vector.
|
||||
public static float dtVlen(float[] v)
|
||||
{
|
||||
return (float)Math.Sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
|
||||
@@ -659,7 +659,7 @@ public static partial class Detour
|
||||
|
||||
/// Derives the square of the scalar length of the vector. (len * len)
|
||||
/// @param[in] v The vector. [(x, y, z)]
|
||||
/// @return The square of the scalar length of the vector.
|
||||
// @return The square of the scalar length of the vector.
|
||||
public static float dtVlenSqr(float[] v)
|
||||
{
|
||||
return v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
|
||||
@@ -672,7 +672,7 @@ public static partial class Detour
|
||||
/// Returns the distance between two points.
|
||||
/// @param[in] v1 A point. [(x, y, z)]
|
||||
/// @param[in] v2 A point. [(x, y, z)]
|
||||
/// @return The distance between the two points.
|
||||
// @return The distance between the two points.
|
||||
public static float dtVdist(float[] v1, float[] v2)
|
||||
{
|
||||
float dx = v2[0] - v1[0];
|
||||
@@ -691,7 +691,7 @@ public static partial class Detour
|
||||
/// Returns the square of the distance between two points.
|
||||
/// @param[in] v1 A point. [(x, y, z)]
|
||||
/// @param[in] v2 A point. [(x, y, z)]
|
||||
/// @return The square of the distance between the two points.
|
||||
// @return The square of the distance between the two points.
|
||||
public static float dtVdistSqr(float[] v1, float[] v2)
|
||||
{
|
||||
float dx = v2[0] - v1[0];
|
||||
@@ -710,7 +710,7 @@ public static partial class Detour
|
||||
/// Derives the distance between the specified points on the xz-plane.
|
||||
/// @param[in] v1 A point. [(x, y, z)]
|
||||
/// @param[in] v2 A point. [(x, y, z)]
|
||||
/// @return The distance between the point on the xz-plane.
|
||||
// @return The distance between the point on the xz-plane.
|
||||
///
|
||||
/// The vectors are projected onto the xz-plane, so the y-values are ignored.
|
||||
public static float dtVdist2D(float[] v1, float[] v2)
|
||||
@@ -728,7 +728,7 @@ public static partial class Detour
|
||||
/// Derives the square of the distance between the specified points on the xz-plane.
|
||||
/// @param[in] v1 A point. [(x, y, z)]
|
||||
/// @param[in] v2 A point. [(x, y, z)]
|
||||
/// @return The square of the distance between the point on the xz-plane.
|
||||
// @return The square of the distance between the point on the xz-plane.
|
||||
public static float dtVdist2DSqr(float[] v1, float[] v2)
|
||||
{
|
||||
float dx = v2[0] - v1[0];
|
||||
@@ -761,7 +761,7 @@ public static partial class Detour
|
||||
/// Performs a 'sloppy' colocation check of the specified points.
|
||||
/// @param[in] p0 A point. [(x, y, z)]
|
||||
/// @param[in] p1 A point. [(x, y, z)]
|
||||
/// @return True if the points are considered to be at the same location.
|
||||
// @return True if the points are considered to be at the same location.
|
||||
///
|
||||
/// Basically, this function will return true if the specified points are
|
||||
/// close enough to eachother to be considered colocated.
|
||||
@@ -782,7 +782,7 @@ public static partial class Detour
|
||||
/// Derives the dot product of two vectors on the xz-plane. (@p u . @p v)
|
||||
/// @param[in] u A vector [(x, y, z)]
|
||||
/// @param[in] v A vector [(x, y, z)]
|
||||
/// @return The dot product on the xz-plane.
|
||||
// @return The dot product on the xz-plane.
|
||||
///
|
||||
/// The vectors are projected onto the xz-plane, so the y-values are ignored.
|
||||
public static float dtVdot2D(float[] u, float[] v)
|
||||
@@ -797,7 +797,7 @@ public static partial class Detour
|
||||
/// Derives the xz-plane 2D perp product of the two vectors. (uz*vx - ux*vz)
|
||||
/// @param[in] u The LHV vector [(x, y, z)]
|
||||
/// @param[in] v The RHV vector [(x, y, z)]
|
||||
/// @return The dot product on the xz-plane.
|
||||
// @return The dot product on the xz-plane.
|
||||
///
|
||||
/// The vectors are projected onto the xz-plane, so the y-values are ignored.
|
||||
public static float dtVperp2D(float[] u, float[] v)
|
||||
@@ -808,9 +808,9 @@ public static partial class Detour
|
||||
{
|
||||
return u[uStart + 2] * v[vStart + 0] - u[uStart + 0] * v[vStart + 2];
|
||||
}
|
||||
/// @}
|
||||
/// @name Computational geometry helper functions.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Computational geometry helper functions.
|
||||
// @{
|
||||
|
||||
/**
|
||||
|
||||
@@ -856,7 +856,7 @@ public static partial class Detour
|
||||
/// @param[in] a Vertex A. [(x, y, z)]
|
||||
/// @param[in] b Vertex B. [(x, y, z)]
|
||||
/// @param[in] c Vertex C. [(x, y, z)]
|
||||
/// @return The signed xz-plane area of the triangle.
|
||||
// @return The signed xz-plane area of the triangle.
|
||||
public static float dtTriArea2D(float[] a, float[] b, float[] c)
|
||||
{
|
||||
float abx = b[0] - a[0];
|
||||
@@ -878,8 +878,8 @@ public static partial class Detour
|
||||
/// @param[in] amax Maximum bounds of box A. [(x, y, z)]
|
||||
/// @param[in] bmin Minimum bounds of box B. [(x, y, z)]
|
||||
/// @param[in] bmax Maximum bounds of box B. [(x, y, z)]
|
||||
/// @return True if the two AABB's overlap.
|
||||
/// @see dtOverlapBounds
|
||||
// @return True if the two AABB's overlap.
|
||||
// @see dtOverlapBounds
|
||||
public static bool dtOverlapQuantBounds(ushort[] amin, ushort[] amax, ushort[] bmin, ushort[] bmax)
|
||||
{
|
||||
bool overlap = true;
|
||||
@@ -894,8 +894,8 @@ public static partial class Detour
|
||||
/// @param[in] amax Maximum bounds of box A. [(x, y, z)]
|
||||
/// @param[in] bmin Minimum bounds of box B. [(x, y, z)]
|
||||
/// @param[in] bmax Maximum bounds of box B. [(x, y, z)]
|
||||
/// @return True if the two AABB's overlap.
|
||||
/// @see dtOverlapQuantBounds
|
||||
// @return True if the two AABB's overlap.
|
||||
// @see dtOverlapQuantBounds
|
||||
public static bool dtOverlapBounds(float[] amin, float[] amax, float[] bmin, float[] bmax)
|
||||
{
|
||||
bool overlap = true;
|
||||
@@ -905,9 +905,9 @@ public static partial class Detour
|
||||
return overlap;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Miscellanious functions.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Miscellanious functions.
|
||||
// @{
|
||||
|
||||
public static uint dtNextPow2(uint v)
|
||||
{
|
||||
|
||||
@@ -164,7 +164,7 @@ public static partial class Detour
|
||||
return new(mem) dtNavMesh;
|
||||
}
|
||||
*/
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// This function will only free the memory for tiles with the #DT_TILE_FREE_DATA
|
||||
/// flag set.
|
||||
@@ -208,7 +208,7 @@ public static partial class Detour
|
||||
@see dtNavMeshQuery, dtCreateNavMeshData, dtNavMeshCreateParams, #dtAllocNavMesh, #dtFreeNavMesh
|
||||
*/
|
||||
/// A navigation mesh based on tiles of convex polygons.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public class dtNavMesh
|
||||
{
|
||||
private dtNavMeshParams m_params; //< Current initialization params. TODO: do not store this info twice.
|
||||
@@ -312,12 +312,12 @@ public static partial class Detour
|
||||
return (uint)(polyRef & polyMask);
|
||||
}
|
||||
|
||||
/// @{
|
||||
/// @name Initialization and Tile Management
|
||||
// @{
|
||||
// @name Initialization and Tile Management
|
||||
|
||||
/// Initializes the navigation mesh for tiled use.
|
||||
/// @param[in] params Initialization parameters.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus init(dtNavMeshParams navMeshParams)
|
||||
{
|
||||
//memcpy(&m_params, params, sizeof(dtNavMeshParams));
|
||||
@@ -363,7 +363,7 @@ public static partial class Detour
|
||||
/// @param[in] data Data of the new tile. (See: #dtCreateNavMeshData)
|
||||
/// @param[in] dataSize The data size of the new tile.
|
||||
/// @param[in] flags The tile flags. (See: #dtTileFlags)
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
/// @see dtCreateNavMeshData
|
||||
public dtStatus init(dtRawTileData rawTile, int flags)
|
||||
{
|
||||
@@ -394,9 +394,9 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
/// The navigation mesh initialization params.
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// @note The parameters are created automatically when the single tile
|
||||
// @note The parameters are created automatically when the single tile
|
||||
/// initialization is performed.
|
||||
public dtNavMeshParams getParams()
|
||||
{
|
||||
@@ -988,7 +988,7 @@ public static partial class Detour
|
||||
}
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// The add operation will fail if the data is in the wrong format, the allocated tile
|
||||
/// space is full, or there is a tile already at the specified reference.
|
||||
@@ -998,14 +998,14 @@ public static partial class Detour
|
||||
/// tile will be restored to the same values they were before the tile was
|
||||
/// removed.
|
||||
///
|
||||
/// @see dtCreateNavMeshData, #removeTile
|
||||
// @see dtCreateNavMeshData, #removeTile
|
||||
/// Adds a tile to the navigation mesh.
|
||||
/// @param[in] data Data for the new tile mesh. (See: #dtCreateNavMeshData)
|
||||
/// @param[in] dataSize Data size of the new tile mesh.
|
||||
/// @param[in] flags Tile flags. (See: #dtTileFlags)
|
||||
/// @param[in] lastRef The desired reference for the tile. (When reloading a tile.) [opt] [Default: 0]
|
||||
/// @param[out] result The tile reference. (If the tile was succesfully added.) [opt]
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus addTile(dtRawTileData rawTileData, int flags, dtTileRef lastRef, ref dtTileRef result)
|
||||
{
|
||||
//C#: Using an intermediate class dtRawTileData because Cpp uses a binary buffer.
|
||||
@@ -1153,7 +1153,7 @@ public static partial class Detour
|
||||
/// @param[in] x The tile's x-location. (x, y, layer)
|
||||
/// @param[in] y The tile's y-location. (x, y, layer)
|
||||
/// @param[in] layer The tile's layer. (x, y, layer)
|
||||
/// @return The tile, or null if the tile does not exist.
|
||||
// @return The tile, or null if the tile does not exist.
|
||||
public dtMeshTile getTileAt(int x, int y, int layer)
|
||||
{
|
||||
// Find tile based on hash.
|
||||
@@ -1192,7 +1192,7 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// This function will not fail if the tiles array is too small to hold the
|
||||
/// entire result set. It will simply fill the array to capacity.
|
||||
@@ -1201,7 +1201,7 @@ public static partial class Detour
|
||||
/// @param[in] y The tile's y-location. (x, y)
|
||||
/// @param[out] tiles A pointer to an array of tiles that will hold the result.
|
||||
/// @param[in] maxTiles The maximum tiles the tiles parameter can hold.
|
||||
/// @return The number of tiles returned in the tiles array.
|
||||
// @return The number of tiles returned in the tiles array.
|
||||
public int getTilesAt(int x, int y, dtMeshTile[] tiles, int maxTiles)
|
||||
{
|
||||
int n = 0;
|
||||
@@ -1228,7 +1228,7 @@ public static partial class Detour
|
||||
/// @param[in] x The tile's x-location. (x, y, layer)
|
||||
/// @param[in] y The tile's y-location. (x, y, layer)
|
||||
/// @param[in] layer The tile's layer. (x, y, layer)
|
||||
/// @return The tile reference of the tile, or 0 if there is none.
|
||||
// @return The tile reference of the tile, or 0 if there is none.
|
||||
public dtTileRef getTileRefAt(int x, int y, int layer)
|
||||
{
|
||||
// Find tile based on hash.
|
||||
@@ -1249,7 +1249,7 @@ public static partial class Detour
|
||||
}
|
||||
/// Gets the tile for the specified tile reference.
|
||||
/// @param[in] ref The tile reference of the tile to retrieve.
|
||||
/// @return The tile for the specified reference, or null if the
|
||||
// @return The tile for the specified reference, or null if the
|
||||
/// reference is invalid.
|
||||
public dtMeshTile getTileByRef(dtTileRef tileRef)
|
||||
{
|
||||
@@ -1266,15 +1266,15 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
/// The maximum number of tiles supported by the navigation mesh.
|
||||
/// @return The maximum number of tiles supported by the navigation mesh.
|
||||
// @return The maximum number of tiles supported by the navigation mesh.
|
||||
public int getMaxTiles()
|
||||
{
|
||||
return m_maxTiles;
|
||||
}
|
||||
|
||||
/// Gets the tile at the specified index.
|
||||
/// @param[in] i The tile index. [Limit: 0 >= index < #getMaxTiles()]
|
||||
/// @return The tile at the specified index.
|
||||
/// @param[in] i The tile index. [Limit: 0 >= index < #getMaxTiles()]
|
||||
// @return The tile at the specified index.
|
||||
public dtMeshTile getTile(int i)
|
||||
{
|
||||
return m_tiles[i];
|
||||
@@ -1294,7 +1294,7 @@ public static partial class Detour
|
||||
/// @param[in] ref The reference for the a polygon.
|
||||
/// @param[out] tile The tile containing the polygon.
|
||||
/// @param[out] poly The polygon.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus getTileAndPolyByRef(dtPolyRef polyRef, ref dtMeshTile tile, ref dtPoly poly)
|
||||
{
|
||||
if (polyRef == 0)
|
||||
@@ -1331,9 +1331,9 @@ public static partial class Detour
|
||||
return DT_SUCCESS;
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// @warning Only use this function if it is known that the provided polygon
|
||||
// @warning Only use this function if it is known that the provided polygon
|
||||
/// reference is valid. This function is faster than #getTileAndPolyByRef, but
|
||||
/// it does not validate the reference.
|
||||
/// Returns the tile and polygon for the specified polygon reference.
|
||||
@@ -1358,7 +1358,7 @@ public static partial class Detour
|
||||
|
||||
/// Checks the validity of a polygon reference.
|
||||
/// @param[in] ref The polygon reference to check.
|
||||
/// @return True if polygon reference is valid for the navigation mesh.
|
||||
// @return True if polygon reference is valid for the navigation mesh.
|
||||
public bool isValidPolyRef(dtPolyRef polyRef)
|
||||
{
|
||||
if (polyRef == 0)
|
||||
@@ -1374,17 +1374,17 @@ public static partial class Detour
|
||||
return true;
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// This function returns the data for the tile so that, if desired,
|
||||
/// it can be added back to the navigation mesh at a later point.
|
||||
///
|
||||
/// @see #addTile
|
||||
// @see #addTile
|
||||
/// Removes the specified tile from the navigation mesh.
|
||||
/// @param[in] ref The reference of the tile to remove.
|
||||
/// @param[out] data Data associated with deleted tile.
|
||||
/// @param[out] dataSize Size of the data associated with deleted tile.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus removeTile(dtTileRef tileRef, out dtRawTileData rawTileData)
|
||||
{
|
||||
rawTileData = null;
|
||||
@@ -1488,7 +1488,7 @@ public static partial class Detour
|
||||
|
||||
/// Gets the tile reference for the specified tile.
|
||||
/// @param[in] tile The tile.
|
||||
/// @return The tile reference of the tile.
|
||||
// @return The tile reference of the tile.
|
||||
public dtTileRef getTileRef(dtMeshTile tile)
|
||||
{
|
||||
if (tile == null) return 0;
|
||||
@@ -1496,23 +1496,23 @@ public static partial class Detour
|
||||
return encodePolyId(tile.salt, it, 0);
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// Example use case:
|
||||
/// @code
|
||||
// @code
|
||||
///
|
||||
/// const dtPolyRef base = navmesh.getPolyRefBase(tile);
|
||||
/// for (int i = 0; i < tile.header.polyCount; ++i)
|
||||
/// for (int i = 0; i < tile.header.polyCount; ++i)
|
||||
/// {
|
||||
/// const dtPoly* p = &tile.polys[i];
|
||||
/// const dtPoly* p = tile.polys[i];
|
||||
/// const dtPolyRef ref = base | (dtPolyRef)i;
|
||||
///
|
||||
/// // Use the reference to access the polygon data.
|
||||
/// }
|
||||
/// @endcode
|
||||
// @endcode
|
||||
/// Gets the polygon reference for the tile's base polygon.
|
||||
/// @param[in] tile The tile.
|
||||
/// @return The polygon reference for the base polygon in the specified tile.
|
||||
// @return The polygon reference for the base polygon in the specified tile.
|
||||
public dtPolyRef getPolyRefBase(dtMeshTile tile)
|
||||
{
|
||||
if (tile == null) return 0;
|
||||
@@ -1525,7 +1525,7 @@ public static partial class Detour
|
||||
/// @see #storeTileState
|
||||
/// Gets the size of the buffer required by #storeTileState to store the specified tile's state.
|
||||
/// @param[in] tile The tile.
|
||||
/// @return The size of the buffer required to store the state.
|
||||
// @return The size of the buffer required to store the state.
|
||||
int getTileStateSize(dtMeshTile tile)
|
||||
{
|
||||
if (tile == null) return 0;
|
||||
@@ -1534,16 +1534,16 @@ public static partial class Detour
|
||||
return headerSize + polyStateSize;
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// Tile state includes non-structural data such as polygon flags, area ids, etc.
|
||||
/// @note The state data is only valid until the tile reference changes.
|
||||
/// @see #getTileStateSize, #restoreTileState
|
||||
// @note The state data is only valid until the tile reference changes.
|
||||
// @see #getTileStateSize, #restoreTileState
|
||||
/// Stores the non-structural state of the tile in the specified buffer. (Flags, area ids, etc.)
|
||||
/// @param[in] tile The tile.
|
||||
/// @param[out] data The buffer to store the tile's state in.
|
||||
/// @param[in] maxDataSize The size of the data buffer. [Limit: >= #getTileStateSize]
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
dtStatus dtNavMesh::storeTileState(const dtMeshTile* tile, byte* data, const int maxDataSize) const
|
||||
{
|
||||
// Make sure there is enough space to store the state.
|
||||
@@ -1571,16 +1571,16 @@ public static partial class Detour
|
||||
return DT_SUCCESS;
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// Tile state includes non-structural data such as polygon flags, area ids, etc.
|
||||
/// @note This function does not impact the tile's #dtTileRef and #dtPolyRef's.
|
||||
/// @see #storeTileState
|
||||
// @note This function does not impact the tile's #dtTileRef and #dtPolyRef's.
|
||||
// @see #storeTileState
|
||||
/// Restores the state of the tile.
|
||||
/// @param[in] tile The tile.
|
||||
/// @param[in] data The new state. (Obtained from #storeTileState.)
|
||||
/// @param[in] maxDataSize The size of the state within the data buffer.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
dtStatus dtNavMesh::restoreTileState(dtMeshTile* tile, const byte* data, const int maxDataSize)
|
||||
{
|
||||
// Make sure there is enough space to store the state.
|
||||
@@ -1611,7 +1611,7 @@ public static partial class Detour
|
||||
return DT_SUCCESS;
|
||||
}
|
||||
*/
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// Off-mesh connections are stored in the navigation mesh as special 2-vertex
|
||||
/// polygons with a single edge. At least one of the vertices is expected to be
|
||||
@@ -1623,7 +1623,7 @@ public static partial class Detour
|
||||
/// @param[in] polyRef The reference of the off-mesh connection polygon.
|
||||
/// @param[out] startPos The start position of the off-mesh connection. [(x, y, z)]
|
||||
/// @param[out] endPos The end position of the off-mesh connection. [(x, y, z)]
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float[] startPos, float[] endPos)
|
||||
{
|
||||
uint salt = 0, it = 0, ip = 0;
|
||||
@@ -1668,7 +1668,7 @@ public static partial class Detour
|
||||
|
||||
/// Gets the specified off-mesh connection.
|
||||
/// @param[in] ref The polygon reference of the off-mesh connection.
|
||||
/// @return The specified off-mesh connection, or null if the polygon reference is not valid.
|
||||
// @return The specified off-mesh connection, or null if the polygon reference is not valid.
|
||||
public dtOffMeshConnection getOffMeshConnectionByRef(dtPolyRef polyRef)
|
||||
{
|
||||
uint salt = 0, it = 0, ip = 0;
|
||||
@@ -1693,14 +1693,14 @@ public static partial class Detour
|
||||
return tile.offMeshCons[idx];
|
||||
}
|
||||
|
||||
/// @{
|
||||
/// @name State Management
|
||||
// @{
|
||||
// @name State Management
|
||||
/// These functions do not effect #dtTileRef or #dtPolyRef's.
|
||||
|
||||
/// Sets the user defined flags for the specified polygon.
|
||||
/// @param[in] ref The polygon reference.
|
||||
/// @param[in] flags The new flags for the polygon.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus setPolyFlags(dtPolyRef polyRef, ushort flags)
|
||||
{
|
||||
if (polyRef == 0) return DT_FAILURE;
|
||||
@@ -1723,7 +1723,7 @@ public static partial class Detour
|
||||
/// Gets the user defined flags for the specified polygon.
|
||||
/// @param[in] ref The polygon reference.
|
||||
/// @param[out] resultFlags The polygon flags.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus getPolyFlags(dtPolyRef polyRef, ref ushort resultFlags)
|
||||
{
|
||||
if (polyRef == 0) return DT_FAILURE;
|
||||
@@ -1742,8 +1742,8 @@ public static partial class Detour
|
||||
|
||||
/// Sets the user defined area for the specified polygon.
|
||||
/// @param[in] ref The polygon reference.
|
||||
/// @param[in] area The new area id for the polygon. [Limit: < #DT_MAX_AREAS]
|
||||
/// @return The status flags for the operation.
|
||||
/// @param[in] area The new area id for the polygon. [Limit: < #DT_MAX_AREAS]
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus setPolyArea(dtPolyRef polyRef, byte area)
|
||||
{
|
||||
if (polyRef == 0) return DT_FAILURE;
|
||||
@@ -1763,7 +1763,7 @@ public static partial class Detour
|
||||
/// Gets the user defined area for the specified polygon.
|
||||
/// @param[in] ref The polygon reference.
|
||||
/// @param[out] resultArea The area id for the polygon.
|
||||
/// @return The status flags for the operation.
|
||||
// @return The status flags for the operation.
|
||||
public dtStatus getPolyArea(dtPolyRef polyRef, ref byte resultArea)
|
||||
{
|
||||
if (polyRef == 0) return DT_FAILURE;
|
||||
|
||||
@@ -6,11 +6,11 @@ using dtPolyRef = System.UInt64;
|
||||
public static partial class Detour
|
||||
{
|
||||
/// The maximum number of vertices per navigation polygon.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public const int DT_VERTS_PER_POLYGON = 6;
|
||||
|
||||
/// @{
|
||||
/// @name Tile Serialization Constants
|
||||
// @{
|
||||
// @name Tile Serialization Constants
|
||||
/// These constants are used to detect whether a navigation tile's data
|
||||
/// and state format is compatible with the current build.
|
||||
///
|
||||
@@ -27,7 +27,7 @@ public static partial class Detour
|
||||
/// A version number used to detect compatibility of navigation tile states.
|
||||
public const int DT_NAVMESH_STATE_VERSION = 1;
|
||||
|
||||
/// @}
|
||||
// @}
|
||||
|
||||
/// A flag that indicates that an entity links to an external entity.
|
||||
/// (E.g. A polygon edge is a portal that links to another polygon.)
|
||||
@@ -40,7 +40,7 @@ public static partial class Detour
|
||||
public const uint DT_OFFMESH_CON_BIDIR = 1;
|
||||
|
||||
/// The maximum number of user defined area ids.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public const int DT_MAX_AREAS = 64;
|
||||
|
||||
const ushort MESH_NULL_IDX = 0xffff;
|
||||
@@ -79,7 +79,7 @@ public static partial class Detour
|
||||
|
||||
|
||||
/// Defines a polyogn within a dtMeshTile object.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public class dtPoly
|
||||
{
|
||||
/// Index to first link in linked list. (Or #DT_NULL_LINK if there is no link.)
|
||||
@@ -119,7 +119,7 @@ public static partial class Detour
|
||||
public byte vertCount;
|
||||
|
||||
/// The bit packed area id and polygon type.
|
||||
/// @note Use the structure's set and get methods to acess this value.
|
||||
// @note Use the structure's set and get methods to acess this value.
|
||||
public byte areaAndtype;
|
||||
|
||||
public int FromBytes(byte[] array, int start)
|
||||
@@ -158,7 +158,7 @@ public static partial class Detour
|
||||
|
||||
return bytes.ToArray();
|
||||
}
|
||||
/// Sets the user defined area id. [Limit: < #DT_MAX_AREAS]
|
||||
/// Sets the user defined area id. [Limit: < #DT_MAX_AREAS]
|
||||
public void setArea(byte a)
|
||||
{
|
||||
//Bitwise operators are done on ints in C#
|
||||
@@ -216,8 +216,8 @@ public static partial class Detour
|
||||
};
|
||||
|
||||
/// Defines a link between polygons.
|
||||
/// @note This structure is rarely if ever used by the end user.
|
||||
/// @see dtMeshTile
|
||||
// @note This structure is rarely if ever used by the end user.
|
||||
// @see dtMeshTile
|
||||
public class dtLink
|
||||
{
|
||||
public dtPolyRef polyRef; //< Neighbour reference. (The neighbor that is linked to.)
|
||||
@@ -254,8 +254,8 @@ public static partial class Detour
|
||||
};
|
||||
|
||||
/// Bounding volume node.
|
||||
/// @note This structure is rarely if ever used by the end user.
|
||||
/// @see dtMeshTile
|
||||
// @note This structure is rarely if ever used by the end user.
|
||||
// @see dtMeshTile
|
||||
public class dtBVNode
|
||||
{
|
||||
public ushort[] bmin = new ushort[3]; //< Minimum bounds of the node's AABB. [(x, y, z)]
|
||||
@@ -307,7 +307,7 @@ public static partial class Detour
|
||||
public ushort poly;
|
||||
|
||||
/// Link flags.
|
||||
/// @note These are not the connection's user defined flags. Those are assigned via the
|
||||
// @note These are not the connection's user defined flags. Those are assigned via the
|
||||
/// connection's dtPoly definition. These are link flags used for internal purposes.
|
||||
public byte flags;
|
||||
|
||||
@@ -352,7 +352,7 @@ public static partial class Detour
|
||||
|
||||
|
||||
/// Provides high level information related to a dtMeshTile object.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public class dtMeshHeader
|
||||
{
|
||||
public int magic; //< Tile magic number. (Used to identify the data format.)
|
||||
@@ -605,7 +605,7 @@ public static partial class Detour
|
||||
}
|
||||
}
|
||||
/// Defines a navigation mesh tile.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
/*
|
||||
@struct dtMeshTile
|
||||
@par
|
||||
@@ -661,8 +661,8 @@ public static partial class Detour
|
||||
|
||||
/// Configuration parameters used to define multi-tile navigation meshes.
|
||||
/// The values are used to allocate space during the initialization of a navigation mesh.
|
||||
/// @see dtNavMesh::init()
|
||||
/// @ingroup detour
|
||||
// @see dtNavMesh::init()
|
||||
// @ingroup detour
|
||||
public class dtNavMeshParams
|
||||
{
|
||||
public float[] orig = new float[3]; //< The world space origin of the navigation mesh's tile space. [(x, y, z)]
|
||||
@@ -687,7 +687,7 @@ public static partial class Detour
|
||||
};
|
||||
|
||||
/// Represents the source data used to build an navigation mesh tile.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
/**
|
||||
@struct dtNavMeshCreateParams
|
||||
@par
|
||||
@@ -709,10 +709,10 @@ public static partial class Detour
|
||||
public class dtNavMeshCreateParams
|
||||
{
|
||||
|
||||
/// @name Polygon Mesh Attributes
|
||||
/// Used to create the base navigation graph.
|
||||
/// See #rcPolyMesh for details related to these attributes.
|
||||
/// @{
|
||||
// @name Polygon Mesh Attributes
|
||||
// Used to create the base navigation graph.
|
||||
// See #rcPolyMesh for details related to these attributes.
|
||||
// @{
|
||||
|
||||
public ushort[] verts; //< The polygon mesh vertices. [(x, y, z) * #vertCount] [Unit: vx]
|
||||
public int vertCount; //< The number vertices in the polygon mesh. [Limit: >= 3]
|
||||
@@ -722,10 +722,10 @@ public static partial class Detour
|
||||
public int polyCount; //< Number of polygons in the mesh. [Limit: >= 1]
|
||||
public int nvp; //< Number maximum number of vertices per polygon. [Limit: >= 3]
|
||||
|
||||
/// @}
|
||||
/// @name Height Detail Attributes (Optional)
|
||||
/// See #rcPolyMeshDetail for details related to these attributes.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Height Detail Attributes (Optional)
|
||||
// See #rcPolyMeshDetail for details related to these attributes.
|
||||
// @{
|
||||
|
||||
public uint[] detailMeshes; //< The height detail sub-mesh data. [Size: 4 * #polyCount]
|
||||
public float[] detailVerts; //< The detail mesh vertices. [Size: 3 * #detailVertsCount] [Unit: wu]
|
||||
@@ -733,35 +733,35 @@ public static partial class Detour
|
||||
public byte[] detailTris; //< The detail mesh triangles. [Size: 4 * #detailTriCount]
|
||||
public int detailTriCount; //< The number of triangles in the detail mesh.
|
||||
|
||||
/// @}
|
||||
/// @name Off-Mesh Connections Attributes (Optional)
|
||||
/// Used to define a custom point-to-point edge within the navigation graph, an
|
||||
/// off-mesh connection is a user defined traversable connection made up to two vertices,
|
||||
/// at least one of which resides within a navigation mesh polygon.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Off-Mesh Connections Attributes (Optional)
|
||||
// Used to define a custom point-to-point edge within the navigation graph, an
|
||||
// off-mesh connection is a user defined traversable connection made up to two vertices,
|
||||
// at least one of which resides within a navigation mesh polygon.
|
||||
// @{
|
||||
|
||||
/// Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * #offMeshConCount] [Unit: wu]
|
||||
// Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * #offMeshConCount] [Unit: wu]
|
||||
public float[] offMeshConVerts;
|
||||
/// Off-mesh connection radii. [Size: #offMeshConCount] [Unit: wu]
|
||||
// Off-mesh connection radii. [Size: #offMeshConCount] [Unit: wu]
|
||||
public float[] offMeshConRad;
|
||||
/// User defined flags assigned to the off-mesh connections. [Size: #offMeshConCount]
|
||||
// User defined flags assigned to the off-mesh connections. [Size: #offMeshConCount]
|
||||
public ushort[] offMeshConFlags;
|
||||
/// User defined area ids assigned to the off-mesh connections. [Size: #offMeshConCount]
|
||||
// User defined area ids assigned to the off-mesh connections. [Size: #offMeshConCount]
|
||||
public byte[] offMeshConAreas;
|
||||
/// The permitted travel direction of the off-mesh connections. [Size: #offMeshConCount]
|
||||
///
|
||||
/// 0 = Travel only from endpoint A to endpoint B.<br/>
|
||||
/// #DT_OFFMESH_CON_BIDIR = Bidirectional travel.
|
||||
// The permitted travel direction of the off-mesh connections. [Size: #offMeshConCount]
|
||||
//
|
||||
// 0 = Travel only from endpoint A to endpoint B.<br/>
|
||||
// #DT_OFFMESH_CON_BIDIR = Bidirectional travel.
|
||||
public byte[] offMeshConDir;
|
||||
/// The user defined ids of the off-mesh connection. [Size: #offMeshConCount]
|
||||
// The user defined ids of the off-mesh connection. [Size: #offMeshConCount]
|
||||
public uint[] offMeshConUserID;
|
||||
/// The number of off-mesh connections. [Limit: >= 0]
|
||||
// The number of off-mesh connections. [Limit: >= 0]
|
||||
public int offMeshConCount;
|
||||
|
||||
/// @}
|
||||
/// @name Tile Attributes
|
||||
/// @note The tile grid/layer data can be left at zero if the destination is a single tile mesh.
|
||||
/// @{
|
||||
// @}
|
||||
// @name Tile Attributes
|
||||
// @note The tile grid/layer data can be left at zero if the destination is a single tile mesh.
|
||||
// @{
|
||||
|
||||
public uint userId; //< The user defined id of the tile.
|
||||
public int tileX; //< The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.)
|
||||
@@ -770,9 +770,9 @@ public static partial class Detour
|
||||
public float[] bmin = new float[3]; //< The minimum bounds of the tile. [(x, y, z)] [Unit: wu]
|
||||
public float[] bmax = new float[3]; //< The maximum bounds of the tile. [(x, y, z)] [Unit: wu]
|
||||
|
||||
/// @}
|
||||
/// @name General Configuration Attributes
|
||||
/// @{
|
||||
// @}
|
||||
// @name General Configuration Attributes
|
||||
// @{
|
||||
|
||||
public float walkableHeight; //< The agent height. [Unit: wu]
|
||||
public float walkableRadius; //< The agent radius. [Unit: wu]
|
||||
@@ -781,10 +781,10 @@ public static partial class Detour
|
||||
public float ch; //< The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu]
|
||||
|
||||
/// True if a bounding volume tree should be built for the tile.
|
||||
/// @note The BVTree is not normally needed for layered navigation meshes.
|
||||
// @note The BVTree is not normally needed for layered navigation meshes.
|
||||
public bool buildBvTree;
|
||||
|
||||
/// @}
|
||||
// @}
|
||||
}
|
||||
|
||||
public class BVItem
|
||||
@@ -1008,19 +1008,19 @@ public static partial class Detour
|
||||
|
||||
// TODO: Better error handling.
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// The output data array is allocated using the detour allocator (dtAlloc()). The method
|
||||
/// used to free the memory will be determined by how the tile is added to the navigation
|
||||
/// mesh.
|
||||
///
|
||||
/// @see dtNavMesh, dtNavMesh::addTile()
|
||||
// @see dtNavMesh, dtNavMesh::addTile()
|
||||
/// Builds navigation mesh tile data from the provided tile creation data.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
/// @param[in] params Tile creation data.
|
||||
/// @param[out] outData The resulting tile data.
|
||||
/// @param[out] outDataSize The size of the tile data array.
|
||||
/// @return True if the tile data was successfully created.
|
||||
// @return True if the tile data was successfully created.
|
||||
public static bool dtCreateNavMeshData(dtNavMeshCreateParams createParams, out dtRawTileData outTile)//ref byte[] outData, ref int outDataSize)
|
||||
{
|
||||
outTile = null;
|
||||
@@ -1526,15 +1526,15 @@ public static partial class Detour
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
/// @par
|
||||
///
|
||||
/// @warning This function assumes that the header is in the correct endianess already.
|
||||
/// Call #dtNavMeshHeaderSwapEndian() first on the data if the data is expected to be in wrong endianess
|
||||
/// to start with. Call #dtNavMeshHeaderSwapEndian() after the data has been swapped if converting from
|
||||
/// native to foreign endianess.
|
||||
/// Swaps endianess of the tile data.
|
||||
/// @param[in,out] data The tile data array.
|
||||
/// @param[in] dataSize The size of the data array.
|
||||
// @par
|
||||
//
|
||||
// @warning This function assumes that the header is in the correct endianess already.
|
||||
// Call #dtNavMeshHeaderSwapEndian() first on the data if the data is expected to be in wrong endianess
|
||||
// to start with. Call #dtNavMeshHeaderSwapEndian() after the data has been swapped if converting from
|
||||
// native to foreign endianess.
|
||||
// Swaps endianess of the tile data.
|
||||
// @param[in,out] data The tile data array.
|
||||
// @param[in] dataSize The size of the data array.
|
||||
/*
|
||||
bool dtNavMeshDataSwapEndian(byte* data, const int dataSize)
|
||||
{
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
/// @class dtQueryFilter
|
||||
///
|
||||
/// <b>The Default Implementation</b>
|
||||
///
|
||||
/// At construction: All area costs default to 1.0. All flags are included
|
||||
/// and none are excluded.
|
||||
///
|
||||
/// If a polygon has both an include and an exclude flag, it will be excluded.
|
||||
///
|
||||
/// The way filtering works, a navigation mesh polygon must have at least one flag
|
||||
/// set to ever be considered by a query. So a polygon with no flags will never
|
||||
/// be considered.
|
||||
///
|
||||
/// Setting the include flags to 0 will result in all polygons being excluded.
|
||||
///
|
||||
/// <b>Custom Implementations</b>
|
||||
///
|
||||
/// DT_VIRTUAL_QUERYFILTER must be defined in order to extend this class.
|
||||
///
|
||||
/// Implement a custom query filter by overriding the virtual passFilter()
|
||||
/// and getCost() functions. If this is done, both functions should be as
|
||||
/// fast as possible. Use cached local copies of data rather than accessing
|
||||
/// your own objects where possible.
|
||||
///
|
||||
/// Custom implementations do not need to adhere to the flags or cost logic
|
||||
/// used by the default implementation.
|
||||
///
|
||||
/// In order for A* searches to work properly, the cost should be proportional to
|
||||
/// the travel distance. Implementing a cost modifier less than 1.0 is likely
|
||||
/// to lead to problems during pathfinding.
|
||||
///
|
||||
/// @see dtNavMeshQuery
|
||||
///
|
||||
// @class dtQueryFilter
|
||||
//
|
||||
// <b>The Default Implementation</b>
|
||||
//
|
||||
// At construction: All area costs default to 1.0. All flags are included
|
||||
// and none are excluded.
|
||||
//
|
||||
// If a polygon has both an include and an exclude flag, it will be excluded.
|
||||
//
|
||||
// The way filtering works, a navigation mesh polygon must have at least one flag
|
||||
// set to ever be considered by a query. So a polygon with no flags will never
|
||||
// be considered.
|
||||
//
|
||||
// Setting the include flags to 0 will result in all polygons being excluded.
|
||||
//
|
||||
// <b>Custom Implementations</b>
|
||||
//
|
||||
// DT_VIRTUAL_QUERYFILTER must be defined in order to extend this class.
|
||||
//
|
||||
// Implement a custom query filter by overriding the virtual passFilter()
|
||||
// and getCost() functions. If this is done, both functions should be as
|
||||
// fast as possible. Use cached local copies of data rather than accessing
|
||||
// your own objects where possible.
|
||||
//
|
||||
// Custom implementations do not need to adhere to the flags or cost logic
|
||||
// used by the default implementation.
|
||||
//
|
||||
// In order for A* searches to work properly, the cost should be proportional to
|
||||
// the travel distance. Implementing a cost modifier less than 1.0 is likely
|
||||
// to lead to problems during pathfinding.
|
||||
//
|
||||
// @see dtNavMeshQuery
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@@ -49,7 +49,7 @@ public static partial class Detour
|
||||
const float H_SCALE = 0.999f; // Search heuristic scale.
|
||||
|
||||
/// Defines polygon filtering and traversal costs for navigation mesh query operations.
|
||||
/// @ingroup detour
|
||||
// @ingroup detour
|
||||
public class dtQueryFilter
|
||||
{
|
||||
public float[] m_areaCost = new float[DT_MAX_AREAS]; //< Cost per area type. (Used by default implementation.)
|
||||
@@ -91,12 +91,12 @@ public static partial class Detour
|
||||
return dtVdist(pa, pb) * m_areaCost[curPoly.getArea()];
|
||||
}
|
||||
|
||||
/// @name Getters and setters for the default implementation data.
|
||||
// @name Getters and setters for the default implementation data.
|
||||
///@{
|
||||
|
||||
/// Returns the traversal cost of the area.
|
||||
/// @param[in] i The id of the area.
|
||||
/// @returns The traversal cost of the area.
|
||||
// @returns The traversal cost of the area.
|
||||
public float getAreaCost(int i)
|
||||
{
|
||||
return m_areaCost[i];
|
||||
@@ -119,7 +119,7 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
/// Sets the include flags for the filter.
|
||||
/// @param[in] flags The new flags.
|
||||
// @param[in] flags The new flags.
|
||||
public void setIncludeFlags(ushort flags)
|
||||
{
|
||||
m_includeFlags = flags;
|
||||
@@ -134,7 +134,7 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
/// Sets the exclude flags for the filter.
|
||||
/// @param[in] flags The new flags.
|
||||
// @param[in] flags The new flags.
|
||||
public void setExcludeFlags(ushort flags)
|
||||
{
|
||||
m_excludeFlags = flags;
|
||||
@@ -143,7 +143,7 @@ public static partial class Detour
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// @class dtNavMeshQuery
|
||||
// @class dtNavMeshQuery
|
||||
/// Provides the ability to perform pathfinding related queries against
|
||||
/// a navigation mesh.
|
||||
///
|
||||
@@ -159,8 +159,8 @@ public static partial class Detour
|
||||
/// considered impassable. A @e portal is a passable segment between polygons.
|
||||
/// A portal may be treated as a wall based on the dtQueryFilter used for a query.
|
||||
///
|
||||
/// @see dtNavMesh, dtQueryFilter, #dtAllocNavMeshQuery(), #dtAllocNavMeshQuery()
|
||||
/// @ingroup detour
|
||||
// @see dtNavMesh, dtQueryFilter, #dtAllocNavMeshQuery(), #dtAllocNavMeshQuery()
|
||||
// @ingroup detour
|
||||
public class dtNavMeshQuery
|
||||
{
|
||||
private dtNavMesh m_nav; //< Pointer to navmesh data.
|
||||
@@ -201,7 +201,7 @@ public static partial class Detour
|
||||
{
|
||||
}
|
||||
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// Must be the first function called after construction, before other
|
||||
/// functions are used.
|
||||
@@ -209,8 +209,8 @@ public static partial class Detour
|
||||
/// This function can be used multiple times.
|
||||
/// Initializes the query object.
|
||||
/// @param[in] nav Pointer to the dtNavMesh object to use for all queries.
|
||||
/// @param[in] maxNodes Maximum number of search nodes. [Limits: 0 < value <= 65536]
|
||||
/// @returns The status flags for the query.
|
||||
/// @param[in] maxNodes Maximum number of search nodes. [Limits: 0 < value <= 65536]
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus init(dtNavMesh nav, int maxNodes)
|
||||
{
|
||||
m_nav = nav;
|
||||
@@ -264,7 +264,7 @@ public static partial class Detour
|
||||
return DT_SUCCESS;
|
||||
}
|
||||
|
||||
/// @name Standard Pathfinding Functions
|
||||
// @name Standard Pathfinding Functions
|
||||
|
||||
public delegate float randomFloatGenerator();
|
||||
|
||||
@@ -274,7 +274,7 @@ public static partial class Detour
|
||||
/// @param[in] frand Function returning a random number [0..1).
|
||||
/// @param[out] randomRef The reference id of the random location.
|
||||
/// @param[out] randomPt The random location.
|
||||
/// @returns The status flags for the query.
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus findRandomPoint(dtQueryFilter filter, randomFloatGenerator frand, ref dtPolyRef randomRef, ref float[] randomPt)
|
||||
{
|
||||
Debug.Assert(m_nav != null);
|
||||
@@ -377,7 +377,7 @@ public static partial class Detour
|
||||
/// @param[in] frand Function returning a random number [0..1).
|
||||
/// @param[out] randomRef The reference id of the random location.
|
||||
/// @param[out] randomPt The random location. [(x, y, z)]
|
||||
/// @returns The status flags for the query.
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus findRandomPointAroundCircle(dtPolyRef startRef, float[] centerPos, float radius, dtQueryFilter filter, randomFloatGenerator frand, ref dtPolyRef randomRef, ref float[] randomPt)
|
||||
{
|
||||
Debug.Assert(m_nav != null);
|
||||
@@ -574,12 +574,12 @@ public static partial class Detour
|
||||
/// @param[in] pos The position to check. [(x, y, z)]
|
||||
/// @param[out] closest The closest point on the polygon. [(x, y, z)]
|
||||
/// @param[out] posOverPoly True of the position is over the polygon.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// Uses the detail polygons to find the surface height. (Most accurate.)
|
||||
///
|
||||
/// @p pos does not have to be within the bounds of the polygon or navigation mesh.
|
||||
// @p pos does not have to be within the bounds of the polygon or navigation mesh.
|
||||
///
|
||||
/// See closestPointOnPolyBoundary() for a limited but faster option.
|
||||
///
|
||||
@@ -693,8 +693,8 @@ public static partial class Detour
|
||||
/// @param[in] ref The reference id to the polygon.
|
||||
/// @param[in] pos The position to check. [(x, y, z)]
|
||||
/// @param[out] closest The closest point. [(x, y, z)]
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// Much faster than closestPointOnPoly().
|
||||
///
|
||||
@@ -703,7 +703,7 @@ public static partial class Detour
|
||||
///
|
||||
/// The height of @p closest will be the polygon boundary. The height detail is not used.
|
||||
///
|
||||
/// @p pos does not have to be within the bounds of the polybon or the navigation mesh.
|
||||
// @p pos does not have to be within the bounds of the polybon or the navigation mesh.
|
||||
///
|
||||
public dtStatus closestPointOnPolyBoundary(dtPolyRef polyRef, float[] pos, float[] closest)
|
||||
{
|
||||
@@ -758,8 +758,8 @@ public static partial class Detour
|
||||
/// @param[in] ref The reference id of the polygon.
|
||||
/// @param[in] pos A position within the xz-bounds of the polygon. [(x, y, z)]
|
||||
/// @param[out] height The height at the surface of the polygon.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// Will return #DT_FAILURE if the provided position is outside the xz-bounds
|
||||
/// of the polygon.
|
||||
@@ -827,8 +827,8 @@ public static partial class Detour
|
||||
return DT_FAILURE | DT_INVALID_PARAM;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Local Query Functions
|
||||
// @}
|
||||
// @name Local Query Functions
|
||||
///@{
|
||||
|
||||
/// Finds the polygon nearest to the specified center point.
|
||||
@@ -837,14 +837,14 @@ public static partial class Detour
|
||||
/// @param[in] filter The polygon filter to apply to the query.
|
||||
/// @param[out] nearestRef The reference id of the nearest polygon.
|
||||
/// @param[out] nearestPt The nearest point on the polygon. [opt] [(x, y, z)]
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// @note If the search box does not intersect any polygons the search will
|
||||
// @note If the search box does not intersect any polygons the search will
|
||||
/// return #DT_SUCCESS, but @p nearestRef will be zero. So if in doubt, check
|
||||
/// @p nearestRef before using @p nearestPt.
|
||||
// @p nearestRef before using @p nearestPt.
|
||||
///
|
||||
/// @warning This function is not suitable for large area searches. If the search
|
||||
// @warning This function is not suitable for large area searches. If the search
|
||||
/// extents overlaps more than 128 polygons it may return an invalid result.
|
||||
///
|
||||
public dtStatus findNearestPoly(float[] center, float[] extents, dtQueryFilter filter, ref dtPolyRef nearestRef, ref float[] nearestPt)
|
||||
@@ -1014,11 +1014,11 @@ public static partial class Detour
|
||||
/// @param[out] polys The reference ids of the polygons that overlap the query box.
|
||||
/// @param[out] polyCount The number of polygons in the search result.
|
||||
/// @param[in] maxPolys The maximum number of polygons the search result can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// If no polygons are found, the function will return #DT_SUCCESS with a
|
||||
/// @p polyCount of zero.
|
||||
// @p polyCount of zero.
|
||||
///
|
||||
/// If @p polys is too small to hold the entire result set, then the array will
|
||||
/// be filled to capacity. The method of choosing which polygons from the
|
||||
@@ -1073,7 +1073,7 @@ public static partial class Detour
|
||||
/// [(polyRef) * @p pathCount]
|
||||
/// @param[out] pathCount The number of polygons returned in the @p path array.
|
||||
/// @param[in] maxPath The maximum number of polygons the @p path array can hold. [Limit: >= 1]
|
||||
/// @par
|
||||
// @par
|
||||
///
|
||||
/// If the end polygon cannot be reached through the navigation graph,
|
||||
/// the last polygon in the path will be the nearest the end polygon.
|
||||
@@ -1298,7 +1298,7 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
///@}
|
||||
/// @name Sliced Pathfinding Functions
|
||||
// @name Sliced Pathfinding Functions
|
||||
/// Common use case:
|
||||
/// -# Call initSlicedFindPath() to initialize the sliced path query.
|
||||
/// -# Call updateSlicedFindPath() until it returns complete.
|
||||
@@ -1311,10 +1311,10 @@ public static partial class Detour
|
||||
/// @param[in] startPos A position within the start polygon. [(x, y, z)]
|
||||
/// @param[in] endPos A position within the end polygon. [(x, y, z)]
|
||||
/// @param[in] filter The polygon filter to apply to the query.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// @warning Calling any non-slice methods before calling finalizeSlicedFindPath()
|
||||
// @warning Calling any non-slice methods before calling finalizeSlicedFindPath()
|
||||
/// or finalizeSlicedFindPathPartial() may result in corrupted data!
|
||||
///
|
||||
/// The @p filter pointer is stored and used for the duration of the sliced
|
||||
@@ -1371,7 +1371,7 @@ public static partial class Detour
|
||||
/// Updates an in-progress sliced path query.
|
||||
/// @param[in] maxIter The maximum number of iterations to perform.
|
||||
/// @param[out] doneIters The actual number of iterations completed. [opt]
|
||||
/// @returns The status flags for the query.
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus updateSlicedFindPath(int maxIter, ref int doneIters)
|
||||
{
|
||||
if (!dtStatusInProgress(m_query.status))
|
||||
@@ -1557,7 +1557,7 @@ public static partial class Detour
|
||||
/// [(polyRef) * @p pathCount]
|
||||
/// @param[out] pathCount The number of polygons returned in the @p path array.
|
||||
/// @param[in] maxPath The max number of polygons the path array can hold. [Limit: >= 1]
|
||||
/// @returns The status flags for the query.
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus finalizeSlicedFindPath(dtPolyRef[] path, ref int pathCount, int maxPath)
|
||||
{
|
||||
pathCount = 0;
|
||||
@@ -1630,7 +1630,7 @@ public static partial class Detour
|
||||
/// [(polyRef) * @p pathCount]
|
||||
/// @param[out] pathCount The number of polygons returned in the @p path array.
|
||||
/// @param[in] maxPath The max number of polygons the @p path array can hold. [Limit: >= 1]
|
||||
/// @returns The status flags for the query.
|
||||
// @returns The status flags for the query.
|
||||
public dtStatus finalizeSlicedFindPathPartial(dtPolyRef[] existing, int existingSize, dtPolyRef[] path, ref int pathCount, int maxPath)
|
||||
{
|
||||
pathCount = 0;
|
||||
@@ -1801,8 +1801,8 @@ public static partial class Detour
|
||||
/// @param[out] straightPathCount The number of points in the straight path.
|
||||
/// @param[in] maxStraightPath The maximum number of points the straight path arrays can hold. [Limit: > 0]
|
||||
/// @param[in] options Query options. (see: #dtStraightPathOptions)
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// This method peforms what is often called 'string pulling'.
|
||||
///
|
||||
@@ -2050,17 +2050,17 @@ public static partial class Detour
|
||||
/// @param[out] visited The reference ids of the polygons visited during the move.
|
||||
/// @param[out] visitedCount The number of polygons visited during the move.
|
||||
/// @param[in] maxVisitedSize The maximum number of polygons the @p visited array can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// This method is optimized for small delta movement and a small number of
|
||||
/// polygons. If used for too great a distance, the result set will form an
|
||||
/// incomplete path.
|
||||
///
|
||||
/// @p resultPos will equal the @p endPos if the end is reached.
|
||||
// @p resultPos will equal the @p endPos if the end is reached.
|
||||
/// Otherwise the closest reachable position will be returned.
|
||||
///
|
||||
/// @p resultPos is not projected onto the surface of the navigation
|
||||
// @p resultPos is not projected onto the surface of the navigation
|
||||
/// mesh. Use #getPolyHeight if this is needed.
|
||||
///
|
||||
/// This method treats the end position in the same manner as
|
||||
@@ -2404,8 +2404,8 @@ public static partial class Detour
|
||||
/// @param[out] path The reference ids of the visited polygons. [opt]
|
||||
/// @param[out] pathCount The number of visited polygons. [opt]
|
||||
/// @param[in] maxPath The maximum number of polygons the @p path array can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// This method is meant to be used for quick, short distance checks.
|
||||
///
|
||||
@@ -2421,12 +2421,12 @@ public static partial class Detour
|
||||
/// If the hit parameter is zero, then the start position is on the wall that
|
||||
/// was hit and the value of @p hitNormal is undefined.
|
||||
///
|
||||
/// If 0 < t < 1.0 then the following applies:
|
||||
/// If 0 < t < 1.0 then the following applies:
|
||||
///
|
||||
/// @code
|
||||
// @code
|
||||
/// distanceToHitBorder = distanceToEndPosition * t
|
||||
/// hitPoint = startPos + (endPos - startPos) * t
|
||||
/// @endcode
|
||||
// @endcode
|
||||
///
|
||||
/// <b>Use Case Restriction</b>
|
||||
///
|
||||
@@ -2628,8 +2628,8 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
///@}
|
||||
/// @name Dijkstra Search Functions
|
||||
/// @{
|
||||
// @name Dijkstra Search Functions
|
||||
// @{
|
||||
|
||||
/// Finds the polygons along the navigation graph that touch the specified circle.
|
||||
/// @param[in] startRef The reference id of the polygon where the search starts.
|
||||
@@ -2642,8 +2642,8 @@ public static partial class Detour
|
||||
/// @param[out] resultCost The search cost from @p centerPos to the polygon. [opt]
|
||||
/// @param[out] resultCount The number of polygons found. [opt]
|
||||
/// @param[in] maxResult The maximum number of polygons the result arrays can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// At least one result array must be provided.
|
||||
///
|
||||
@@ -2838,8 +2838,8 @@ public static partial class Detour
|
||||
/// @param[out] resultCost The search cost from the centroid point to the polygon. [opt]
|
||||
/// @param[out] resultCount The number of polygons found.
|
||||
/// @param[in] maxResult The maximum number of polygons the result arrays can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// The order of the result set is from least to highest cost.
|
||||
///
|
||||
@@ -3031,8 +3031,8 @@ public static partial class Detour
|
||||
/// Zero if a result polygon has no parent. [opt]
|
||||
/// @param[out] resultCount The number of polygons found.
|
||||
/// @param[in] maxResult The maximum number of polygons the result arrays can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// This method is optimized for a small search radius and small number of result
|
||||
/// polygons.
|
||||
@@ -3276,8 +3276,8 @@ public static partial class Detour
|
||||
/// Or zero if the segment is a wall. [opt] [(parentRef) * @p segmentCount]
|
||||
/// @param[out] segmentCount The number of segments returned.
|
||||
/// @param[in] maxSegments The maximum number of segments the result arrays can hold.
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// If the @p segmentRefs parameter is provided, then all polygon segments will be returned.
|
||||
/// Otherwise only the wall segments are returned.
|
||||
@@ -3443,12 +3443,12 @@ public static partial class Detour
|
||||
/// @param[out] hitPos The nearest position on the wall that was hit. [(x, y, z)]
|
||||
/// @param[out] hitNormal The normalized ray formed from the wall point to the
|
||||
/// source point. [(x, y, z)]
|
||||
/// @returns The status flags for the query.
|
||||
/// @par
|
||||
// @returns The status flags for the query.
|
||||
// @par
|
||||
///
|
||||
/// @p hitPos is not adjusted using the height detail data.
|
||||
// @p hitPos is not adjusted using the height detail data.
|
||||
///
|
||||
/// @p hitDist will equal the search radius if there is no wall within the
|
||||
// @p hitDist will equal the search radius if there is no wall within the
|
||||
/// radius. In this case the values of @p hitPos and @p hitNormal are
|
||||
/// undefined.
|
||||
///
|
||||
@@ -3643,9 +3643,9 @@ public static partial class Detour
|
||||
return status;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Miscellaneous Functions
|
||||
/// @{
|
||||
// @}
|
||||
// @name Miscellaneous Functions
|
||||
// @{
|
||||
|
||||
/// Returns true if the polygon reference is valid and passes the filter restrictions.
|
||||
/// @param[in] ref The polygon reference to check.
|
||||
@@ -3666,8 +3666,8 @@ public static partial class Detour
|
||||
|
||||
/// Returns true if the polygon reference is in the closed list.
|
||||
/// @param[in] ref The reference id of the polygon to check.
|
||||
/// @returns True if the polygon is in closed list.
|
||||
/// @par
|
||||
// @returns True if the polygon is in closed list.
|
||||
// @par
|
||||
///
|
||||
/// The closed list is the list of polygons that were fully evaluated during
|
||||
/// the last navigation graph search. (A* or Dijkstra)
|
||||
@@ -3680,7 +3680,7 @@ public static partial class Detour
|
||||
}
|
||||
|
||||
/// Gets the navigation mesh the query object is using.
|
||||
/// @return The navigation mesh the query object is using.
|
||||
// @return The navigation mesh the query object is using.
|
||||
public dtNavMesh getAttachedNavMesh()
|
||||
{
|
||||
return m_nav;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Framework.Serialization
|
||||
return CreateObject<T>(Encoding.UTF8.GetBytes(split ? jsonData.Split(new[] { ':' }, 2)[1] : jsonData));
|
||||
}
|
||||
|
||||
public static T CreateObject<T>(byte[] jsonData) => (T)CreateObject<T>(new MemoryStream(jsonData));
|
||||
public static T CreateObject<T>(byte[] jsonData) => CreateObject<T>(new MemoryStream(jsonData));
|
||||
|
||||
public static object CreateObject(Stream jsonData, Type type)
|
||||
{
|
||||
|
||||
@@ -66,6 +66,9 @@ namespace System.Collections.Generic
|
||||
}
|
||||
public static KeyValuePair<TKey, TValue> Find<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key)
|
||||
{
|
||||
if (!dict.ContainsKey(key))
|
||||
return default(KeyValuePair<TKey, TValue>);
|
||||
|
||||
return new KeyValuePair<TKey, TValue>(key, dict[key]);
|
||||
}
|
||||
|
||||
@@ -113,17 +116,17 @@ namespace System.Collections.Generic
|
||||
}
|
||||
}
|
||||
|
||||
public static void RandomResize<T>(this ICollection<T> list, Predicate<T> predicate, uint size)
|
||||
public static void RandomResize<T>(this List<T> list, Predicate<T> predicate, uint size)
|
||||
{
|
||||
List<T> listCopy = new List<T>();
|
||||
foreach (var obj in list)
|
||||
if (predicate(obj))
|
||||
listCopy.Add(obj);
|
||||
for (var i = 0; i < list.Count; ++i)
|
||||
{
|
||||
var obj = list[i];
|
||||
if (!predicate(obj))
|
||||
list.Remove(obj);
|
||||
}
|
||||
|
||||
if (size != 0)
|
||||
listCopy.Resize(size);
|
||||
|
||||
list = listCopy;
|
||||
list.Resize(size);
|
||||
}
|
||||
|
||||
public static T SelectRandom<T>(this IEnumerable<T> source)
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace System
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
int randValue = -1;
|
||||
int randValue;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace System
|
||||
|
||||
public static BigInteger ToBigInteger<T>(this T value, bool isBigEndian = false)
|
||||
{
|
||||
var ret = BigInteger.Zero;
|
||||
BigInteger ret;
|
||||
|
||||
switch (typeof(T).Name)
|
||||
{
|
||||
|
||||
@@ -100,9 +100,9 @@ public class RandomHelper
|
||||
|
||||
public static T RAND<T>(params T[] args)
|
||||
{
|
||||
int rand = IRand(0, args.Length - 1);
|
||||
int randIndex = IRand(0, args.Length - 1);
|
||||
|
||||
return args[rand];
|
||||
return args[randIndex];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace Game.AI
|
||||
}
|
||||
public override bool CanAIAttack(Unit victim)
|
||||
{
|
||||
/// todo use one function to replace it
|
||||
// todo use one function to replace it
|
||||
if (!me.IsWithinCombatRange(me.GetVictim(), me.m_CombatDistance)
|
||||
|| (m_minRange != 0 && me.IsWithinCombatRange(me.GetVictim(), m_minRange)))
|
||||
return false;
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace Game.AI
|
||||
if (me.GetVictim() && me.GetVictim() != victim)
|
||||
{
|
||||
// Check if our owner selected this target and clicked "attack"
|
||||
Unit ownerTarget = null;
|
||||
Unit ownerTarget;
|
||||
Player owner = me.GetCharmerOrOwner().ToPlayer();
|
||||
if (owner)
|
||||
ownerTarget = owner.GetSelectedUnit();
|
||||
|
||||
@@ -57,7 +57,6 @@ namespace Game.AI
|
||||
if (victim == null || !victim.isTargetableForAttack() || !me.IsWithinDistInMap(victim, max_range) ||
|
||||
me.IsFriendlyTo(victim) || !me.CanSeeOrDetect(victim))
|
||||
{
|
||||
victim = null;
|
||||
var u_check = new NearestAttackableUnitInObjectRangeCheck(me, me.GetCharmerOrOwnerOrSelf(), max_range);
|
||||
var checker = new UnitLastSearcher(me, u_check);
|
||||
Cell.VisitAllObjects(me, checker, max_range);
|
||||
|
||||
@@ -133,12 +133,10 @@ namespace Game.AI
|
||||
|
||||
uint spellCount = 0;
|
||||
|
||||
SpellInfo tempSpell = null;
|
||||
|
||||
//Check if each spell is viable(set it to null if not)
|
||||
for (uint i = 0; i < SharedConst.MaxCreatureSpells; i++)
|
||||
{
|
||||
tempSpell = Global.SpellMgr.GetSpellInfo(me.m_spells[i]);
|
||||
SpellInfo tempSpell = Global.SpellMgr.GetSpellInfo(me.m_spells[i]);
|
||||
|
||||
//This spell doesn't exist
|
||||
if (tempSpell == null)
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Game.AI
|
||||
if (!HasFollowState(eFollowState.Inprogress) || m_uiLeaderGUID.IsEmpty() || m_pQuestForFollow == null)
|
||||
return;
|
||||
|
||||
/// @todo need a better check for quests with time limit.
|
||||
// @todo need a better check for quests with time limit.
|
||||
Player player = GetLeaderForFollower();
|
||||
if (player)
|
||||
{
|
||||
|
||||
@@ -1255,7 +1255,7 @@ namespace Game.AI
|
||||
if (e.GetScriptType() != SmartScriptType.Creature)
|
||||
return true;
|
||||
|
||||
uint entry = 0;
|
||||
uint entry;
|
||||
if (e.GetEventType() == SmartEvents.TextOver)
|
||||
{
|
||||
entry = e.Event.textOver.creatureEntry;
|
||||
|
||||
@@ -3272,7 +3272,7 @@ namespace Game.AI
|
||||
if (me == null || !me.IsInCombat())
|
||||
return;
|
||||
|
||||
List<WorldObject> _targets = null;
|
||||
List<WorldObject> _targets;
|
||||
|
||||
switch (e.GetTargetType())
|
||||
{
|
||||
|
||||
@@ -180,13 +180,13 @@ namespace Game.Achievements
|
||||
|
||||
public virtual void CompletedAchievement(AchievementRecord entry, Player referencePlayer) { }
|
||||
|
||||
public Func<KeyValuePair<uint, CompletedAchievementData>, AchievementRecord> VisibleAchievementCheck = new Func<KeyValuePair<uint, CompletedAchievementData>, AchievementRecord>(value =>
|
||||
public Func<KeyValuePair<uint, CompletedAchievementData>, AchievementRecord> VisibleAchievementCheck = value =>
|
||||
{
|
||||
AchievementRecord achievement = CliDB.AchievementStorage.LookupByKey(value.Key);
|
||||
if (achievement != null && !achievement.Flags.HasAnyFlag(AchievementFlags.Hidden))
|
||||
return achievement;
|
||||
return null;
|
||||
});
|
||||
};
|
||||
|
||||
protected Dictionary<uint, CompletedAchievementData> _completedAchievements = new Dictionary<uint, CompletedAchievementData>();
|
||||
protected uint _achievementPoints;
|
||||
@@ -1045,7 +1045,7 @@ namespace Game.Achievements
|
||||
public bool IsRealmCompleted(AchievementRecord achievement)
|
||||
{
|
||||
var time = _allCompletedAchievements.LookupByKey(achievement.Id);
|
||||
if (time == null)
|
||||
if (time == default(DateTime))
|
||||
return false;
|
||||
|
||||
if (time == DateTime.MinValue)
|
||||
|
||||
@@ -694,7 +694,7 @@ namespace Game.BattleFields
|
||||
|
||||
public override void OnPlayerLeaveWar(Player player)
|
||||
{
|
||||
// Remove all aura from WG /// @todo false we can go out of this zone on retail and keep Rank buff, remove on end of WG
|
||||
// Remove all aura from WG // @todo false we can go out of this zone on retail and keep Rank buff, remove on end of WG
|
||||
if (!player.GetSession().PlayerLogout())
|
||||
{
|
||||
Creature vehicle = player.GetVehicleCreatureBase();
|
||||
|
||||
@@ -380,21 +380,21 @@ namespace Game.BattleFields
|
||||
struct WGAchievements
|
||||
{
|
||||
public const uint WinWg = 1717;
|
||||
public const uint WinWg100 = 1718; /// @Todo: Has To Be Implemented
|
||||
public const uint WgGnomeslaughter = 1723; /// @Todo: Has To Be Implemented
|
||||
public const uint WinWg100 = 1718; // @Todo: Has To Be Implemented
|
||||
public const uint WgGnomeslaughter = 1723; // @Todo: Has To Be Implemented
|
||||
public const uint WgTowerDestroy = 1727;
|
||||
public const uint DestructionDerbyA = 1737; /// @Todo: Has To Be Implemented
|
||||
public const uint WgTowerCannonKill = 1751; /// @Todo: Has To Be Implemented
|
||||
public const uint WgMasterA = 1752; /// @Todo: Has To Be Implemented
|
||||
public const uint DestructionDerbyA = 1737; // @Todo: Has To Be Implemented
|
||||
public const uint WgTowerCannonKill = 1751; // @Todo: Has To Be Implemented
|
||||
public const uint WgMasterA = 1752; // @Todo: Has To Be Implemented
|
||||
public const uint WinWgTimer10 = 1755;
|
||||
public const uint StoneKeeper50 = 2085; /// @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper100 = 2086; /// @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper250 = 2087; /// @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper500 = 2088; /// @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper1000 = 2089; /// @Todo: Has To Be Implemented
|
||||
public const uint WgRanger = 2199; /// @Todo: Has To Be Implemented
|
||||
public const uint DestructionDerbyH = 2476; /// @Todo: Has To Be Implemented
|
||||
public const uint WgMasterH = 2776; /// @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper50 = 2085; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper100 = 2086; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper250 = 2087; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper500 = 2088; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper1000 = 2089; // @Todo: Has To Be Implemented
|
||||
public const uint WgRanger = 2199; // @Todo: Has To Be Implemented
|
||||
public const uint DestructionDerbyH = 2476; // @Todo: Has To Be Implemented
|
||||
public const uint WgMasterH = 2776; // @Todo: Has To Be Implemented
|
||||
}
|
||||
|
||||
struct WGSpells
|
||||
@@ -693,7 +693,7 @@ namespace Game.BattleFields
|
||||
public uint towerEntry; // Gameobject id of tower
|
||||
public WintergraspGameObjectData[] GameObject = new WintergraspGameObjectData[6]; // Gameobject position and entry (Horde/Alliance)
|
||||
|
||||
// Creature: Turrets and Guard /// @todo: Killed on Tower destruction ? Tower damage ? Requires confirming
|
||||
// Creature: Turrets and Guard // @todo: Killed on Tower destruction ? Tower damage ? Requires confirming
|
||||
public WintergraspObjectPositionData[] CreatureBottom = new WintergraspObjectPositionData[9];
|
||||
}
|
||||
|
||||
|
||||
@@ -227,9 +227,9 @@ namespace Game.BattleGrounds
|
||||
{
|
||||
if (GetReviveQueueSize() != 0)
|
||||
{
|
||||
Creature sh = null;
|
||||
foreach (var pair in m_ReviveQueue)
|
||||
{
|
||||
Creature sh = null;
|
||||
Player player = Global.ObjAccessor.FindPlayer(pair.Value);
|
||||
if (!player)
|
||||
continue;
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace Game.BattleGrounds.Zones
|
||||
EventTeamLostPoint(player, point);
|
||||
}
|
||||
|
||||
/// @workaround The original AreaTrigger is covered by a bigger one and not triggered on client side.
|
||||
// @workaround The original AreaTrigger is covered by a bigger one and not triggered on client side.
|
||||
if (point == EotSPoints.FelReaver && m_PointOwnedByTeam[point] == player.GetTeam())
|
||||
if (m_FlagState != 0 && GetFlagPickerGUID() == player.GetGUID())
|
||||
if (player.GetDistance(2044.0f, 1729.729f, 1190.03f) < 3.0f)
|
||||
|
||||
@@ -574,7 +574,7 @@ namespace Game.Chat
|
||||
Log.outDebug(LogFilter.ChatSystem, "SMSG_CHANNEL_LIST {0} Channel: {1}", player.GetSession().GetPlayerInfo(), channelName);
|
||||
|
||||
ChannelListResponse list = new ChannelListResponse();
|
||||
list.Display = true; /// always true?
|
||||
list.Display = true; // always true?
|
||||
list.Channel = channelName;
|
||||
list.ChannelFlags = GetFlags();
|
||||
|
||||
|
||||
@@ -52,11 +52,11 @@ namespace Game.Chat
|
||||
if (text.Length < 2)
|
||||
return false;
|
||||
|
||||
/// ignore messages staring from many dots.
|
||||
// ignore messages staring from many dots.
|
||||
if ((text[0] == '.' && text[1] == '.') || (text[0] == '!' && text[1] == '!'))
|
||||
return false;
|
||||
|
||||
/// skip first . or ! (in console allowed use command with . and ! and without its)
|
||||
// skip first . or ! (in console allowed use command with . and ! and without its)
|
||||
if (text[0] == '!' || text[0] == '.')
|
||||
text = text.Substring(1);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Game.Chat
|
||||
"Unknown security level: Notify technician for details."));
|
||||
|
||||
// RBAC required display - is not displayed for console
|
||||
if (pwConfig == 2 && session != null && hasRBAC)
|
||||
if (pwConfig == 2 && hasRBAC)
|
||||
handler.SendSysMessage(CypherStrings.RbacEmailRequired);
|
||||
|
||||
// Email display if sufficient rights
|
||||
@@ -635,8 +635,8 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
/// can set email only for target with less security
|
||||
/// This also restricts setting handler's own email.
|
||||
// can set email only for target with less security
|
||||
// This also restricts setting handler's own email.
|
||||
if (handler.HasLowerSecurityAccount(null, targetAccountId, true))
|
||||
return false;
|
||||
|
||||
@@ -696,8 +696,8 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
/// can set email only for target with less security
|
||||
/// This also restricts setting handler's own email.
|
||||
// can set email only for target with less security
|
||||
// This also restricts setting handler's own email.
|
||||
if (handler.HasLowerSecurityAccount(null, targetAccountId, true))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Game.Chat.Commands
|
||||
if (!uint.TryParse(durationStr, out uint tempValue) || tempValue > 0)
|
||||
{
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.ShowBanInWorld))
|
||||
Global.WorldMgr.SendWorldText(CypherStrings.BanAccountYoubannedmessageWorld, author, nameOrIP, Time.secsToTimeString(Time.TimeStringToSecs(durationStr)).ToString(), reasonStr);
|
||||
Global.WorldMgr.SendWorldText(CypherStrings.BanAccountYoubannedmessageWorld, author, nameOrIP, Time.secsToTimeString(Time.TimeStringToSecs(durationStr)), reasonStr);
|
||||
else
|
||||
handler.SendSysMessage(CypherStrings.BanYoubanned, nameOrIP, Time.secsToTimeString(Time.TimeStringToSecs(durationStr), true), reasonStr);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace Game.Chat
|
||||
stmt.AddValue(0, AtLoginFlags.ChangeRace);
|
||||
if (target)
|
||||
{
|
||||
/// @todo add text into database
|
||||
// @todo add text into database
|
||||
handler.SendSysMessage(CypherStrings.CustomizePlayer, handler.GetNameLink(target));
|
||||
target.SetAtLoginFlag(AtLoginFlags.ChangeRace);
|
||||
stmt.AddValue(1, target.GetGUID().GetCounter());
|
||||
@@ -314,7 +314,7 @@ namespace Game.Chat
|
||||
else
|
||||
{
|
||||
string oldNameLink = handler.playerLink(targetName);
|
||||
/// @todo add text into database
|
||||
// @todo add text into database
|
||||
handler.SendSysMessage(CypherStrings.CustomizePlayerGuid, oldNameLink, targetGuid.ToString());
|
||||
stmt.AddValue(1, targetGuid.GetCounter());
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
target.SetUnitMovementFlags((MovementFlag)moveFlags);
|
||||
|
||||
/// @fixme: port master's HandleDebugMoveflagsCommand; flags need different handling
|
||||
// @fixme: port master's HandleDebugMoveflagsCommand; flags need different handling
|
||||
|
||||
if (!string.IsNullOrEmpty(mask2))
|
||||
{
|
||||
|
||||
@@ -609,13 +609,13 @@ namespace Game.Chat
|
||||
if (string.IsNullOrEmpty(state))
|
||||
return false;
|
||||
|
||||
if (!uint.TryParse(state, out uint objectState))
|
||||
if (!int.TryParse(state, out int objectState))
|
||||
return false;
|
||||
|
||||
if (objectType < 4)
|
||||
obj.SetByteValue(GameObjectFields.Bytes1, (byte)objectType, (byte)objectState);
|
||||
else if (objectType == 4)
|
||||
obj.SendCustomAnim(objectState);
|
||||
obj.SendCustomAnim((uint)objectState);
|
||||
else if (objectType == 5)
|
||||
{
|
||||
if (objectState < 0 || objectState > (uint)GameObjectDestructibleState.Rebuilding)
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Game.Chat.Commands
|
||||
uint ownerAccountId = result.Read<uint>(4);
|
||||
string ownerName = result.Read<string>(5);
|
||||
|
||||
string itemPos = "";
|
||||
string itemPos;
|
||||
if (Player.IsEquipmentPos((byte)itemBag, itemSlot))
|
||||
itemPos = "[equipped]";
|
||||
else if (Player.IsInventoryPos((byte)itemBag, itemSlot))
|
||||
|
||||
@@ -618,7 +618,7 @@ namespace Game.Chat
|
||||
Global.ObjectMgr.LoadQuests();
|
||||
handler.SendGlobalGMSysMessage("DB table `quest_template` (quest definitions) reloaded.");
|
||||
|
||||
/// dependent also from `gameobject` but this table not reloaded anyway
|
||||
// dependent also from `gameobject` but this table not reloaded anyway
|
||||
Log.outInfo(LogFilter.Server, "Re-Loading GameObjects for quests...");
|
||||
Global.ObjectMgr.LoadGameObjectForQuests();
|
||||
handler.SendGlobalGMSysMessage("Data GameObjects for quests reloaded.");
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Game.Chat.Commands
|
||||
// from console show not existed sender
|
||||
MailSender sender = new MailSender(MailMessageType.Normal, handler.GetSession() ? handler.GetSession().GetPlayer().GetGUID().GetCounter() : 0, MailStationery.Gm);
|
||||
|
||||
/// @todo Fix poor design
|
||||
// @todo Fix poor design
|
||||
SQLTransaction trans = new SQLTransaction();
|
||||
new MailDraft(subject, text)
|
||||
.SendMailTo(trans, new MailReceiver(target, targetGuid.GetCounter()), sender);
|
||||
@@ -102,7 +102,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
// get from tail next item str
|
||||
StringArguments itemStr;
|
||||
while ((itemStr = new StringArguments(tail.NextString(" "))) != null)
|
||||
while (!(itemStr = new StringArguments(tail.NextString(" "))).Empty())
|
||||
{
|
||||
// parse item str
|
||||
string itemIdStr = itemStr.NextString(":");
|
||||
@@ -172,7 +172,7 @@ namespace Game.Chat.Commands
|
||||
[Command("money", RBACPermissions.CommandSendMoney, true)]
|
||||
static bool HandleSendMoneyCommand(StringArguments args, CommandHandler handler)
|
||||
{
|
||||
/// format: name "subject text" "mail text" money
|
||||
// format: name "subject text" "mail text" money
|
||||
|
||||
Player receiver;
|
||||
ObjectGuid receiverGuid;
|
||||
@@ -221,7 +221,7 @@ namespace Game.Chat.Commands
|
||||
[Command("message", RBACPermissions.CommandSendMessage, true)]
|
||||
static bool HandleSendMessageCommand(StringArguments args, CommandHandler handler)
|
||||
{
|
||||
/// - Find the player
|
||||
// - Find the player
|
||||
Player player;
|
||||
if (!handler.extractPlayerTarget(args, out player))
|
||||
return false;
|
||||
@@ -237,7 +237,7 @@ namespace Game.Chat.Commands
|
||||
return false;
|
||||
}
|
||||
|
||||
/// - Send the message
|
||||
// - Send the message
|
||||
player.GetSession().SendNotification("{0}", msgStr);
|
||||
player.GetSession().SendNotification("|cffff0000[Message from administrator]:|r");
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace Game.Collision
|
||||
meshTree.readFromFile(reader);
|
||||
|
||||
// write liquid data
|
||||
if (reader.ReadStringFromChars(4).ToString() != "LIQU")
|
||||
if (reader.ReadStringFromChars(4) != "LIQU")
|
||||
return false;
|
||||
|
||||
chunkSize = reader.ReadUInt32();
|
||||
|
||||
@@ -1504,7 +1504,7 @@ namespace Game
|
||||
}
|
||||
case ConditionTypes.UnitState:
|
||||
{
|
||||
if (cond.ConditionValue1 > (uint)UnitState.AllState)
|
||||
if (cond.ConditionValue1 > (uint)UnitState.AllStateSupported)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} has non existing UnitState in value1 ({1}), skipped.", cond.ToString(true), cond.ConditionValue1);
|
||||
return false;
|
||||
|
||||
@@ -2122,7 +2122,7 @@ namespace Game.DungeonFinding
|
||||
public bool isNew;
|
||||
public List<ObjectGuid> queues = new List<ObjectGuid>();
|
||||
public List<ulong> showorder = new List<ulong>();
|
||||
public Dictionary<ObjectGuid, LfgProposalPlayer> players = new Dictionary<ObjectGuid, LfgProposalPlayer>(); ///< Players data
|
||||
public Dictionary<ObjectGuid, LfgProposalPlayer> players = new Dictionary<ObjectGuid, LfgProposalPlayer>(); // Players data
|
||||
}
|
||||
|
||||
public class LfgRoleCheck
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Game.DungeonFinding
|
||||
}
|
||||
|
||||
Global.LFGMgr.SetTeam(player.GetGUID(), player.GetTeam());
|
||||
/// @todo - Restore LfgPlayerData and send proper status to player if it was in a group
|
||||
// @todo - Restore LfgPlayerData and send proper status to player if it was in a group
|
||||
}
|
||||
|
||||
public override void OnMapChanged(Player player)
|
||||
@@ -157,7 +157,7 @@ namespace Game.DungeonFinding
|
||||
|
||||
if (isLFG && method == RemoveMethod.Kick) // Player have been kicked
|
||||
{
|
||||
/// @todo - Update internal kick cooldown of kicker
|
||||
// @todo - Update internal kick cooldown of kicker
|
||||
string str_reason = "";
|
||||
if (!string.IsNullOrEmpty(reason))
|
||||
str_reason = reason;
|
||||
|
||||
@@ -740,7 +740,7 @@ namespace Game.Entities
|
||||
|
||||
public bool HasSplines() { return !_spline.empty(); }
|
||||
public Spline GetSpline() { return _spline; }
|
||||
public uint GetElapsedTimeForMovement() { return GetTimeSinceCreated(); } /// @todo: research the right value, in sniffs both timers are nearly identical
|
||||
public uint GetElapsedTimeForMovement() { return GetTimeSinceCreated(); } // @todo: research the right value, in sniffs both timers are nearly identical
|
||||
|
||||
ObjectGuid _targetGuid;
|
||||
|
||||
|
||||
@@ -121,41 +121,39 @@ namespace Game.Entities
|
||||
switch (TriggerType)
|
||||
{
|
||||
case AreaTriggerTypes.Sphere:
|
||||
{
|
||||
MaxSearchRadius = Math.Max(SphereDatas.Radius, SphereDatas.RadiusTarget);
|
||||
break;
|
||||
}
|
||||
{
|
||||
MaxSearchRadius = Math.Max(SphereDatas.Radius, SphereDatas.RadiusTarget);
|
||||
break;
|
||||
}
|
||||
case AreaTriggerTypes.Box:
|
||||
{
|
||||
fixed (float* ptr = BoxDatas.Extents)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (float* ptr = BoxDatas.Extents)
|
||||
{
|
||||
MaxSearchRadius = (float)Math.Sqrt(ptr[0] * ptr[0] / 4 + ptr[1] * ptr[1] / 4);
|
||||
}
|
||||
}
|
||||
break;
|
||||
MaxSearchRadius = (float) Math.Sqrt(ptr[0] * ptr[0] / 4 + ptr[1] * ptr[1] / 4);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case AreaTriggerTypes.Polygon:
|
||||
{
|
||||
if (PolygonDatas.Height <= 0.0f)
|
||||
PolygonDatas.Height = 1.0f;
|
||||
|
||||
foreach (Vector2 vertice in PolygonVertices)
|
||||
{
|
||||
if (PolygonDatas.Height <= 0.0f)
|
||||
PolygonDatas.Height = 1.0f;
|
||||
float pointDist = vertice.GetLength();
|
||||
|
||||
foreach (Vector2 vertice in PolygonVertices)
|
||||
{
|
||||
float pointDist = vertice.GetLength();
|
||||
|
||||
if (pointDist > MaxSearchRadius)
|
||||
MaxSearchRadius = pointDist;
|
||||
}
|
||||
|
||||
break;
|
||||
if (pointDist > MaxSearchRadius)
|
||||
MaxSearchRadius = pointDist;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case AreaTriggerTypes.Cylinder:
|
||||
{
|
||||
MaxSearchRadius = CylinderDatas.Radius;
|
||||
break;
|
||||
}
|
||||
{
|
||||
MaxSearchRadius = CylinderDatas.Radius;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Game.Entities
|
||||
|
||||
public override void AddToWorld()
|
||||
{
|
||||
///- Register the Conversation for guid lookup and for caster
|
||||
//- Register the Conversation for guid lookup and for caster
|
||||
if (!IsInWorld)
|
||||
{
|
||||
GetMap().GetObjectsStore().Add(GetGUID(), this);
|
||||
@@ -50,7 +50,7 @@ namespace Game.Entities
|
||||
|
||||
public override void RemoveFromWorld()
|
||||
{
|
||||
///- Remove the Conversation from the accessor and from all lists of objects in world
|
||||
//- Remove the Conversation from the accessor and from all lists of objects in world
|
||||
if (IsInWorld)
|
||||
{
|
||||
base.RemoveFromWorld();
|
||||
@@ -110,7 +110,7 @@ namespace Game.Entities
|
||||
SetMap(map);
|
||||
Relocate(pos);
|
||||
|
||||
base._Create(ObjectGuid.Create(HighGuid.Conversation, GetMapId(), conversationEntry, lowGuid));
|
||||
_Create(ObjectGuid.Create(HighGuid.Conversation, GetMapId(), conversationEntry, lowGuid));
|
||||
PhasingHandler.InheritPhaseShift(this, creator);
|
||||
|
||||
SetEntry(conversationEntry);
|
||||
|
||||
@@ -1177,7 +1177,7 @@ namespace Game.Entities
|
||||
SetModifierValue(UnitMods.AttackPower, UnitModifierType.BaseValue, stats.AttackPower);
|
||||
SetModifierValue(UnitMods.AttackPowerRanged, UnitModifierType.BaseValue, stats.RangedAttackPower);
|
||||
|
||||
float armor = stats.GenerateArmor(cInfo); /// @todo Why is this treated as uint32 when it's a float?
|
||||
float armor = stats.GenerateArmor(cInfo); // @todo Why is this treated as uint32 when it's a float?
|
||||
SetModifierValue(UnitMods.Armor, UnitModifierType.BaseValue, armor);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,20 +73,20 @@ namespace Game.Misc
|
||||
/// <param name="action">action Custom action given to OnGossipHello.</param>
|
||||
public void AddMenuItem(uint menuId, uint optionIndex, uint sender, uint action)
|
||||
{
|
||||
/// Find items for given menu id.
|
||||
// Find items for given menu id.
|
||||
var bounds = Global.ObjectMgr.GetGossipMenuItemsMapBounds(menuId);
|
||||
/// Return if there are none.
|
||||
// Return if there are none.
|
||||
if (bounds.Empty())
|
||||
return;
|
||||
|
||||
/// Iterate over each of them.
|
||||
// Iterate over each of them.
|
||||
foreach (var item in bounds)
|
||||
{
|
||||
// Find the one with the given menu item id.
|
||||
if (item.OptionIndex != optionIndex)
|
||||
continue;
|
||||
|
||||
/// Store texts for localization.
|
||||
// Store texts for localization.
|
||||
string strOptionText = "", strBoxText = "";
|
||||
BroadcastTextRecord optionBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(item.OptionBroadcastTextId);
|
||||
BroadcastTextRecord boxBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(item.BoxBroadcastTextId);
|
||||
|
||||
@@ -396,16 +396,16 @@ namespace Game.Entities
|
||||
case GameObjectTypes.Trap:
|
||||
{
|
||||
// Arming Time for GAMEOBJECT_TYPE_TRAP (6)
|
||||
GameObjectTemplate m_goInfo = GetGoInfo();
|
||||
GameObjectTemplate goInfo = GetGoInfo();
|
||||
|
||||
// Bombs
|
||||
Unit owner = GetOwner();
|
||||
if (m_goInfo.Trap.charges == 2)
|
||||
if (goInfo.Trap.charges == 2)
|
||||
m_cooldownTime = (uint)Time.UnixTime + 10; // Hardcoded tooltip value
|
||||
else if (owner)
|
||||
{
|
||||
if (owner.IsInCombat())
|
||||
m_cooldownTime = (uint)Time.UnixTime + m_goInfo.Trap.startDelay;
|
||||
m_cooldownTime = (uint)Time.UnixTime + goInfo.Trap.startDelay;
|
||||
}
|
||||
m_lootState = LootState.Ready;
|
||||
break;
|
||||
@@ -1552,7 +1552,7 @@ namespace Game.Entities
|
||||
|
||||
player.UpdateFishingSkill();
|
||||
|
||||
/// @todo find reasonable value for fishing hole search
|
||||
// @todo find reasonable value for fishing hole search
|
||||
GameObject fishingPool = LookupFishingHoleAround(20.0f + SharedConst.ContactDistance);
|
||||
|
||||
// If fishing skill is high enough, or if fishing on a pool, send correct loot.
|
||||
|
||||
@@ -2563,13 +2563,13 @@ namespace Game.Entities
|
||||
{
|
||||
Log.outDebug(LogFilter.Spells, "Player.AddSpellMod {0}", mod.spellId);
|
||||
|
||||
/// First, manipulate our spellmodifier container
|
||||
// First, manipulate our spellmodifier container
|
||||
if (apply)
|
||||
m_spellMods[(int)mod.op][(int)mod.type].Add(mod);
|
||||
else
|
||||
m_spellMods[(int)mod.op][(int)mod.type].Remove(mod);
|
||||
|
||||
/// Now, send spellmodifier packet
|
||||
// Now, send spellmodifier packet
|
||||
if (!IsLoading())
|
||||
{
|
||||
ServerOpcodes opcode = (mod.type == SpellModType.Flat ? ServerOpcodes.SetFlatSpellModifier : ServerOpcodes.SetPctSpellModifier);
|
||||
|
||||
@@ -1952,7 +1952,7 @@ namespace Game.Entities
|
||||
//move player's guid into HateOfflineList of those mobs
|
||||
//which can't swim and move guid back into ThreatList when
|
||||
//on surface.
|
||||
/// @todo exist also swimming mobs, and function must be symmetric to enter/leave water
|
||||
// @todo exist also swimming mobs, and function must be symmetric to enter/leave water
|
||||
m_isInWater = apply;
|
||||
|
||||
// remove auras that need water/land
|
||||
@@ -5283,7 +5283,7 @@ namespace Game.Entities
|
||||
packet.Level = level;
|
||||
packet.HealthDelta = 0;
|
||||
|
||||
/// @todo find some better solution
|
||||
// @todo find some better solution
|
||||
packet.PowerDelta[0] = (int)basemana - (int)GetCreateMana();
|
||||
packet.PowerDelta[1] = 0;
|
||||
packet.PowerDelta[2] = 0;
|
||||
@@ -5584,18 +5584,18 @@ namespace Game.Entities
|
||||
loginSetTimeSpeed.NewSpeed = TimeSpeed;
|
||||
loginSetTimeSpeed.GameTime = (uint)Global.WorldMgr.GetGameTime();
|
||||
loginSetTimeSpeed.ServerTime = (uint)Global.WorldMgr.GetGameTime();
|
||||
loginSetTimeSpeed.GameTimeHolidayOffset = 0; /// @todo
|
||||
loginSetTimeSpeed.ServerTimeHolidayOffset = 0; /// @todo
|
||||
loginSetTimeSpeed.GameTimeHolidayOffset = 0; // @todo
|
||||
loginSetTimeSpeed.ServerTimeHolidayOffset = 0; // @todo
|
||||
SendPacket(loginSetTimeSpeed);
|
||||
|
||||
// SMSG_WORLD_SERVER_INFO
|
||||
WorldServerInfo worldServerInfo = new WorldServerInfo();
|
||||
worldServerInfo.InstanceGroupSize.Set(GetMap().GetMapDifficulty().MaxPlayers); /// @todo
|
||||
worldServerInfo.IsTournamentRealm = 0; /// @todo
|
||||
worldServerInfo.RestrictedAccountMaxLevel.Clear(); /// @todo
|
||||
worldServerInfo.RestrictedAccountMaxMoney.Clear(); /// @todo
|
||||
worldServerInfo.InstanceGroupSize.Set(GetMap().GetMapDifficulty().MaxPlayers); // @todo
|
||||
worldServerInfo.IsTournamentRealm = 0; // @todo
|
||||
worldServerInfo.RestrictedAccountMaxLevel.Clear(); // @todo
|
||||
worldServerInfo.RestrictedAccountMaxMoney.Clear(); // @todo
|
||||
worldServerInfo.DifficultyID = (uint)GetMap().GetDifficultyID();
|
||||
// worldServerInfo.XRealmPvpAlert; /// @todo
|
||||
// worldServerInfo.XRealmPvpAlert; // @todo
|
||||
SendPacket(worldServerInfo);
|
||||
|
||||
// Spell modifiers
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace Game.Entities
|
||||
|
||||
public override void UpdateObjectVisibilityOnCreate()
|
||||
{
|
||||
base.UpdateObjectVisibility(true);
|
||||
UpdateObjectVisibility(true);
|
||||
}
|
||||
|
||||
public void SetTempSummonType(TempSummonType type)
|
||||
|
||||
@@ -2411,7 +2411,7 @@ namespace Game.Entities
|
||||
|
||||
bool defaultPrevented = false;
|
||||
|
||||
absorbAurEff.GetBase().CallScriptEffectManaShieldHandlers(absorbAurEff, aurApp, damageInfo, ref tempAbsorb, defaultPrevented);
|
||||
absorbAurEff.GetBase().CallScriptEffectManaShieldHandlers(absorbAurEff, aurApp, damageInfo, ref tempAbsorb, ref defaultPrevented);
|
||||
currentAbsorb = (int)tempAbsorb;
|
||||
|
||||
if (defaultPrevented)
|
||||
|
||||
@@ -476,11 +476,11 @@ namespace Game.Entities
|
||||
hitOutCome = _hitOutCome;
|
||||
}
|
||||
|
||||
public uint absorbed_damage { get; set; }
|
||||
public uint absorbed_damage { get; }
|
||||
public uint mitigated_damage { get; set; }
|
||||
|
||||
public WeaponAttackType attackType { get; set; }
|
||||
public MeleeHitOutcome hitOutCome { get; set; }
|
||||
public WeaponAttackType attackType { get; }
|
||||
public MeleeHitOutcome hitOutCome { get; }
|
||||
}
|
||||
|
||||
public class DispelInfo
|
||||
|
||||
@@ -2243,7 +2243,7 @@ namespace Game.Entities
|
||||
|
||||
spellHealLog.Crit = critical;
|
||||
|
||||
/// @todo: 6.x Has to be implemented
|
||||
// @todo: 6.x Has to be implemented
|
||||
/*
|
||||
var hasCritRollMade = spellHealLog.WriteBit("HasCritRollMade");
|
||||
var hasCritRollNeeded = spellHealLog.WriteBit("HasCritRollNeeded");
|
||||
@@ -2494,7 +2494,7 @@ namespace Game.Entities
|
||||
spellLogEffect.AbsorbedOrAmplitude = info.absorb;
|
||||
spellLogEffect.Resisted = info.resist;
|
||||
spellLogEffect.Crit = info.critical;
|
||||
/// @todo: implement debug info
|
||||
// @todo: implement debug info
|
||||
|
||||
SandboxScalingData sandboxScalingData = new SandboxScalingData();
|
||||
Unit caster = Global.ObjAccessor.GetUnit(this, aura.GetCasterGUID());
|
||||
@@ -4181,10 +4181,9 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
bool remove = false;
|
||||
var appliedAuraList = GetAppliedAuras();
|
||||
for (var i = 0; i < appliedAuraList.Count; i++)
|
||||
for (var i = 0; i < m_appliedAuras.KeyValueList.Count; i++)
|
||||
{
|
||||
var app = appliedAuraList[i];
|
||||
var app = m_appliedAuras.KeyValueList[i];
|
||||
if (remove)
|
||||
{
|
||||
remove = false;
|
||||
@@ -4195,7 +4194,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
RemoveAura(app, AuraRemoveMode.Default);
|
||||
if (i == appliedAuraList.Count - 1)
|
||||
if (i == m_appliedAuras.KeyValueList.Count - 1)
|
||||
break;
|
||||
|
||||
remove = true;
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace Game.Entities
|
||||
{
|
||||
var seat = Seats.LookupByKey(seatId);
|
||||
if (seat == null)
|
||||
return seat;
|
||||
return null;
|
||||
|
||||
foreach (var sea in Seats)
|
||||
{
|
||||
@@ -633,7 +633,7 @@ namespace Game.Entities
|
||||
Log.outDebug(LogFilter.Vehicle, "Passenger GuidLow: {0}, Entry: {1}, board on vehicle GuidLow: {2}, Entry: {3} SeatId: {4} cancelled",
|
||||
Passenger.GetGUID().ToString(), Passenger.GetEntry(), Target.GetBase().GetGUID().ToString(), Target.GetBase().GetEntry(), Seat.Key);
|
||||
|
||||
/// Remove the pending event when Abort was called on the event directly
|
||||
// Remove the pending event when Abort was called on the event directly
|
||||
Target.RemovePendingEvent(this);
|
||||
|
||||
// @SPELL_AURA_CONTROL_VEHICLE auras can be applied even when the passenger is not (yet) on the vehicle.
|
||||
|
||||
@@ -726,7 +726,7 @@ namespace Game
|
||||
do
|
||||
{
|
||||
uint questId = result.Read<uint>(0);
|
||||
ushort eventEntry = result.Read<byte>(1); /// @todo Change to byte
|
||||
ushort eventEntry = result.Read<byte>(1); // @todo Change to byte
|
||||
|
||||
if (Global.ObjectMgr.GetQuestTemplate(questId) == null)
|
||||
{
|
||||
@@ -1214,10 +1214,10 @@ namespace Game
|
||||
if (!map.Instanceable() && map.IsGridLoaded(data.posX, data.posY))
|
||||
{
|
||||
GameObject pGameobject = GameObject.CreateGameObjectFromDB(guid, map, false);
|
||||
/// @todo find out when it is add to map
|
||||
// @todo find out when it is add to map
|
||||
if (pGameobject)
|
||||
{
|
||||
/// @todo find out when it is add to map
|
||||
// @todo find out when it is add to map
|
||||
if (pGameobject.isSpawnedByDefault())
|
||||
map.AddToMap(pGameobject);
|
||||
}
|
||||
|
||||
@@ -4561,6 +4561,7 @@ namespace Game
|
||||
ItemTemplateStorage.Add(sparse.Id, itemTemplate);
|
||||
}
|
||||
|
||||
// Load item effects (spells)
|
||||
foreach (var effectEntry in CliDB.ItemEffectStorage.Values)
|
||||
{
|
||||
var itemTemplate = ItemTemplateStorage.LookupByKey(effectEntry.ParentItemID);
|
||||
|
||||
@@ -939,7 +939,7 @@ namespace Game.Guilds
|
||||
GuildChallengeUpdate updatePacket = new GuildChallengeUpdate();
|
||||
|
||||
for (int i = 0; i < GuildConst.ChallengesTypes; ++i)
|
||||
updatePacket.CurrentCount[i] = 0; /// @todo current count
|
||||
updatePacket.CurrentCount[i] = 0; // @todo current count
|
||||
|
||||
for (int i = 0; i < GuildConst.ChallengesTypes; ++i)
|
||||
updatePacket.MaxCount[i] = GuildConst.ChallengesMaxCount[i];
|
||||
@@ -3697,7 +3697,7 @@ namespace Game.Guilds
|
||||
public override void LogAction(MoveItemData pFrom)
|
||||
{
|
||||
base.LogAction(pFrom);
|
||||
if (!pFrom.IsBank() && m_pPlayer.GetSession().HasPermission(RBACPermissions.LogGmTrade)) /// @todo Move this to scripts
|
||||
if (!pFrom.IsBank() && m_pPlayer.GetSession().HasPermission(RBACPermissions.LogGmTrade)) // @todo Move this to scripts
|
||||
{
|
||||
Log.outCommand(m_pPlayer.GetSession().GetAccountId(), "GM {0} ({1}) (Account: {2}) deposit item: {3} (Entry: {4} Count: {5}) to guild bank named: {6} (Guild ID: {7})",
|
||||
m_pPlayer.GetName(), m_pPlayer.GetGUID().ToString(), m_pPlayer.GetSession().GetAccountId(), pFrom.GetItem().GetTemplate().GetName(),
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Game
|
||||
SQLTransaction trans;
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.AllowTwoSideInteractionAuction))
|
||||
AH.auctioneer = 23442; ///@TODO - HARDCODED DB GUID, BAD BAD BAD
|
||||
AH.auctioneer = 23442; //@TODO - HARDCODED DB GUID, BAD BAD BAD
|
||||
else
|
||||
AH.auctioneer = creature.GetSpawnId();
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Game
|
||||
|
||||
public void SendSetTimeZoneInformation()
|
||||
{
|
||||
/// @todo: replace dummy values
|
||||
// @todo: replace dummy values
|
||||
SetTimeZoneInformation packet = new SetTimeZoneInformation();
|
||||
packet.ServerTimeTZ = "Europe/Paris";
|
||||
packet.GameTimeTZ = "Europe/Paris";
|
||||
|
||||
@@ -591,8 +591,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.RequestRatedBattlefieldInfo)]
|
||||
void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet)
|
||||
{
|
||||
/// @Todo: perfome research in this case
|
||||
/// The unk fields are related to arenas
|
||||
// @Todo: perfome research in this case
|
||||
// The unk fields are related to arenas
|
||||
WorldPacket data = new WorldPacket(ServerOpcodes.RatedBattlefieldInfo);
|
||||
data.WriteInt32(0); // BgWeeklyWins20vs20
|
||||
data.WriteInt32(0); // BgWeeklyPlayed20vs20
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace Game
|
||||
return;
|
||||
|
||||
CalendarEvent oldEvent = Global.CalendarMgr.GetEvent(calendarCopyEvent.EventID);
|
||||
if (oldEvent == null)
|
||||
if (oldEvent != null)
|
||||
{
|
||||
CalendarEvent newEvent = new CalendarEvent(oldEvent, Global.CalendarMgr.GetFreeEventId());
|
||||
newEvent.Date = calendarCopyEvent.Date;
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.EnumCharactersDeletedByClient, Status = SessionStatus.Authed)]
|
||||
void HandleCharUndeleteEnum(EnumCharacters enumCharacters)
|
||||
{
|
||||
/// get all the data necessary for loading all undeleted characters (along with their pets) on the account
|
||||
// get all the data necessary for loading all undeleted characters (along with their pets) on the account
|
||||
PreparedStatement stmt;
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.DeclinedNamesUsed))
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_UNDELETE_ENUM_DECLINED_NAME);
|
||||
@@ -379,7 +379,7 @@ namespace Game
|
||||
}
|
||||
|
||||
// need to check team only for first character
|
||||
/// @todo what to if account already has characters of both races?
|
||||
// @todo what to if account already has characters of both races?
|
||||
if (!allowTwoSideAccounts)
|
||||
{
|
||||
Team accTeam = 0;
|
||||
@@ -866,7 +866,7 @@ namespace Game
|
||||
{
|
||||
FeatureSystemStatus features = new FeatureSystemStatus();
|
||||
|
||||
/// START OF DUMMY VALUES
|
||||
// START OF DUMMY VALUES
|
||||
features.ComplaintStatus = 2;
|
||||
features.ScrollOfResurrectionRequestsRemaining = 1;
|
||||
features.ScrollOfResurrectionMaxRequestsPerDay = 1;
|
||||
@@ -887,7 +887,7 @@ namespace Game
|
||||
features.ComplaintStatus = 0;
|
||||
features.TutorialsEnabled = true;
|
||||
features.NPETutorialsEnabled = true;
|
||||
/// END OF DUMMY VALUES
|
||||
// END OF DUMMY VALUES
|
||||
|
||||
features.EuropaTicketSystemStatus.Value.TicketsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportTicketsEnabled);
|
||||
features.EuropaTicketSystemStatus.Value.BugsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportBugsEnabled);
|
||||
@@ -1246,7 +1246,7 @@ namespace Game
|
||||
}
|
||||
|
||||
// character with this name already exist
|
||||
/// @todo: make async
|
||||
// @todo: make async
|
||||
ObjectGuid newGuid = ObjectManager.GetPlayerGUIDByName(customizeInfo.CharName);
|
||||
if (!newGuid.IsEmpty())
|
||||
{
|
||||
@@ -1261,7 +1261,7 @@ namespace Game
|
||||
SQLTransaction trans = new SQLTransaction();
|
||||
ulong lowGuid = customizeInfo.CharGUID.GetCounter();
|
||||
|
||||
/// Customize
|
||||
// Customize
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_GENDER_AND_APPEARANCE);
|
||||
|
||||
@@ -1279,7 +1279,7 @@ namespace Game
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
/// Name Change and update atLogin flags
|
||||
// Name Change and update atLogin flags
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHAR_NAME_AT_LOGIN);
|
||||
stmt.AddValue(0, customizeInfo.CharName);
|
||||
@@ -1325,11 +1325,11 @@ namespace Game
|
||||
{
|
||||
Item item = _player.GetItemByPos(InventorySlots.Bag0, i);
|
||||
|
||||
/// cheating check 1 (item equipped but sent empty guid)
|
||||
// cheating check 1 (item equipped but sent empty guid)
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
/// cheating check 2 (sent guid does not match equipped item)
|
||||
// cheating check 2 (sent guid does not match equipped item)
|
||||
if (item.GetGUID() != itemGuid)
|
||||
return;
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ namespace Game
|
||||
saveEquipmentSet.Set.Appearances[i] = 0;
|
||||
}
|
||||
}
|
||||
saveEquipmentSet.Set.IgnoreMask &= 0x7FFFF; /// clear invalid bits (i > EQUIPMENT_SLOT_END)
|
||||
saveEquipmentSet.Set.IgnoreMask &= 0x7FFFF; // clear invalid bits (i > EQUIPMENT_SLOT_END)
|
||||
if (saveEquipmentSet.Set.Type == EquipmentSetInfo.EquipmentSetType.Equipment)
|
||||
{
|
||||
saveEquipmentSet.Set.Enchants[0] = 0;
|
||||
@@ -1583,7 +1583,7 @@ namespace Game
|
||||
// resurrect the character in case he's dead
|
||||
Player.OfflineResurrect(factionChangeInfo.Guid, trans);
|
||||
|
||||
/// Name Change and update atLogin flags
|
||||
// Name Change and update atLogin flags
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHAR_NAME_AT_LOGIN);
|
||||
stmt.AddValue(0, factionChangeInfo.Name);
|
||||
@@ -1719,7 +1719,7 @@ namespace Game
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
/// @todo: make this part asynch
|
||||
// @todo: make this part asynch
|
||||
if (!WorldConfig.GetBoolValue(WorldCfg.AllowTwoSideInteractionGuild))
|
||||
{
|
||||
// Reset guild
|
||||
@@ -2092,11 +2092,11 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
/// @todo: add more safety checks
|
||||
/// * max char count per account
|
||||
/// * max death knight count
|
||||
/// * max demon hunter count
|
||||
/// * team violation
|
||||
// @todo: add more safety checks
|
||||
// * max char count per account
|
||||
// * max death knight count
|
||||
// * max demon hunter count
|
||||
// * team violation
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_SUM_CHARS);
|
||||
stmt.AddValue(0, GetAccountId());
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace Game
|
||||
}
|
||||
break;
|
||||
case ChatMsg.Whisper:
|
||||
/// @todo implement cross realm whispers (someday)
|
||||
// @todo implement cross realm whispers (someday)
|
||||
ExtendedPlayerName extName = ObjectManager.ExtractExtendedPlayerName(target);
|
||||
|
||||
if (!ObjectManager.NormalizePlayerName(ref extName.Name))
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Game
|
||||
honorStats.LifetimeHK = player.GetUInt32Value(PlayerFields.LifetimeHonorableKills);
|
||||
honorStats.YesterdayHK = player.GetUInt16Value(PlayerFields.Kills, 1);
|
||||
honorStats.TodayHK = player.GetUInt16Value(PlayerFields.Kills, 0);
|
||||
honorStats.LifetimeMaxRank = 0; /// @todo
|
||||
honorStats.LifetimeMaxRank = 0; // @todo
|
||||
|
||||
SendPacket(honorStats);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.InspectPvp)]
|
||||
void HandleInspectPVP(InspectPVPRequest request)
|
||||
{
|
||||
/// @todo: deal with request.InspectRealmAddress
|
||||
// @todo: deal with request.InspectRealmAddress
|
||||
|
||||
Player player = Global.ObjAccessor.FindPlayer(request.InspectTarget);
|
||||
if (!player)
|
||||
@@ -127,7 +127,7 @@ namespace Game
|
||||
|
||||
InspectPVPResponse response = new InspectPVPResponse();
|
||||
response.ClientGUID = request.InspectTarget;
|
||||
/// @todo: fill brackets
|
||||
// @todo: fill brackets
|
||||
|
||||
SendPacket(response);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
/// @todo: 6.x research new values
|
||||
// @todo: 6.x research new values
|
||||
/*WorldPackets.Item.ReadItemResultFailed packet;
|
||||
packet.Item = item->GetGUID();
|
||||
packet.Subcode = ??;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Game
|
||||
Player player = GetPlayer();
|
||||
AELootResult aeResult = player.GetAELootView().Count > 1 ? new AELootResult() : null;
|
||||
|
||||
/// @todo Implement looting by LootObject guid
|
||||
// @todo Implement looting by LootObject guid
|
||||
foreach (LootRequest req in packet.Loot)
|
||||
{
|
||||
Loot loot = null;
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Game
|
||||
{
|
||||
// NOTE: this is actually called many times while falling
|
||||
// even after the player has been teleported away
|
||||
/// @todo discard movement packets after the player is rooted
|
||||
// @todo discard movement packets after the player is rooted
|
||||
if (plrMover.IsAlive())
|
||||
{
|
||||
plrMover.SetFlag(PlayerFields.Flags, PlayerFlags.IsOutOfBounds);
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
/// @todo allow control charmed player?
|
||||
// @todo allow control charmed player?
|
||||
if (pet.IsTypeId(TypeId.Player) && !(flag == ActiveStates.Command && spellid == (uint)CommandStates.Attack))
|
||||
return;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace Game
|
||||
// Can't attack if owner is pacified
|
||||
if (GetPlayer().HasAuraType(AuraType.ModPacify))
|
||||
{
|
||||
/// @todo Send proper error message to client
|
||||
// @todo Send proper error message to client
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pet.isPossessed() || pet.IsVehicle()) /// @todo: confirm this check
|
||||
if (pet.isPossessed() || pet.IsVehicle()) // @todo: confirm this check
|
||||
Spell.SendCastResult(GetPlayer(), spellInfo, spell.m_SpellVisual, spell.m_castId, result);
|
||||
else
|
||||
spell.SendPetCastResult(result);
|
||||
|
||||
@@ -471,7 +471,7 @@ namespace Game
|
||||
if (!GetPlayer().IsInSameRaidWith(originalPlayer))
|
||||
return;
|
||||
|
||||
if (!!originalPlayer.IsActiveQuest(packet.QuestID))
|
||||
if (!originalPlayer.IsActiveQuest(packet.QuestID))
|
||||
return;
|
||||
|
||||
if (!GetPlayer().CanTakeQuest(quest, true))
|
||||
@@ -646,7 +646,7 @@ namespace Game
|
||||
{
|
||||
WorldQuestUpdate response = new WorldQuestUpdate();
|
||||
|
||||
/// @todo: 7.x Has to be implemented
|
||||
// @todo: 7.x Has to be implemented
|
||||
//response.WorldQuestUpdates.push_back(WorldPackets::Quest::WorldQuestUpdateInfo(lastUpdate, questID, timer, variableID, value));
|
||||
|
||||
SendPacket(response);
|
||||
|
||||
@@ -44,17 +44,17 @@ namespace Game
|
||||
if (request.Words.Count > 4)
|
||||
return;
|
||||
|
||||
/// @todo: handle following packet values
|
||||
/// VirtualRealmNames
|
||||
/// ShowEnemies
|
||||
/// ShowArenaPlayers
|
||||
/// ExactName
|
||||
/// ServerInfo
|
||||
// @todo: handle following packet values
|
||||
// VirtualRealmNames
|
||||
// ShowEnemies
|
||||
// ShowArenaPlayers
|
||||
// ExactName
|
||||
// ServerInfo
|
||||
|
||||
request.Words.ForEach(p => p = p.ToLower());
|
||||
|
||||
request.Name.ToLower();
|
||||
request.Guild.ToLower();
|
||||
request.Name = request.Name.ToLower();
|
||||
request.Guild = request.Guild.ToLower();
|
||||
|
||||
// client send in case not set max level value 100 but we support 255 max level,
|
||||
// update it to show GMs with characters after 100 level
|
||||
@@ -282,7 +282,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.DelFriend)]
|
||||
void HandleDelFriend(DelFriend packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
GetPlayer().GetSocial().RemoveFromSocialList(packet.Player.Guid, SocialFlag.Friend);
|
||||
|
||||
Global.SocialMgr.SendFriendStatus(GetPlayer(), FriendsResult.Removed, packet.Player.Guid);
|
||||
@@ -336,7 +336,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.DelIgnore)]
|
||||
void HandleDelIgnore(DelIgnore packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
Log.outDebug(LogFilter.Network, "WorldSession.HandleDelIgnoreOpcode: {0}", packet.Player.Guid.ToString());
|
||||
|
||||
GetPlayer().GetSocial().RemoveFromSocialList(packet.Player.Guid, SocialFlag.Ignored);
|
||||
@@ -347,7 +347,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SetContactNotes)]
|
||||
void HandleSetContactNotes(SetContactNotes packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
Log.outDebug(LogFilter.Network, "WorldSession.HandleSetContactNotesOpcode: Contact: {0}, Notes: {1}", packet.Player.Guid.ToString(), packet.Notes);
|
||||
GetPlayer().GetSocial().SetFriendNote(packet.Player.Guid, packet.Notes);
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ namespace Game
|
||||
if (unit == null)
|
||||
return;
|
||||
|
||||
/// @todo Unit.SetCharmedBy: 28782 is not in world but 0 is trying to charm it! . crash
|
||||
// @todo Unit.SetCharmedBy: 28782 is not in world but 0 is trying to charm it! . crash
|
||||
if (!unit.IsInWorld)
|
||||
return;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Game
|
||||
{
|
||||
UpdateListedAuctionableTokensResponse response = new UpdateListedAuctionableTokensResponse();
|
||||
|
||||
/// @todo: fix 6.x implementation
|
||||
// @todo: fix 6.x implementation
|
||||
response.UnkInt = updateListedAuctionableTokens.UnkInt;
|
||||
response.Result = TokenResult.Success;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Game
|
||||
{
|
||||
WowTokenMarketPriceResponse response = new WowTokenMarketPriceResponse();
|
||||
|
||||
/// @todo: 6.x fix implementation
|
||||
// @todo: 6.x fix implementation
|
||||
response.CurrentMarketPrice = 300000000;
|
||||
response.UnkInt = requestWowTokenMarketPrice.UnkInt;
|
||||
response.Result = TokenResult.Success;
|
||||
|
||||
@@ -841,7 +841,7 @@ namespace Game.Loots
|
||||
foreach (var group in Groups)
|
||||
group.Value.Verify(lootstore, id, (byte)(group.Key + 1));
|
||||
|
||||
/// @todo References validity checks
|
||||
// @todo References validity checks
|
||||
}
|
||||
public void CheckLootRefs(LootTemplateMap store, List<uint> ref_set)
|
||||
{
|
||||
@@ -992,7 +992,7 @@ namespace Game.Loots
|
||||
public void Verify(LootStore lootstore, uint id, byte group_id = 0)
|
||||
{
|
||||
float chance = RawTotalChance();
|
||||
if (chance > 101.0f) /// @todo replace with 100% when DBs will be ready
|
||||
if (chance > 101.0f) // @todo replace with 100% when DBs will be ready
|
||||
Log.outError(LogFilter.Sql, "Table '{0}' entry {1} group {2} has total chance > 100% ({3})", lootstore.GetName(), id, group_id, chance);
|
||||
|
||||
if (chance >= 100.0f && !EqualChanced.Empty())
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace Game.Maps
|
||||
void DeleteFromWorld(Player player)
|
||||
{
|
||||
Global.ObjAccessor.RemoveObject(player);
|
||||
RemoveUpdateObject(player); /// @todo I do not know why we need this, it should be removed in ~Object anyway
|
||||
RemoveUpdateObject(player); // @todo I do not know why we need this, it should be removed in ~Object anyway
|
||||
player.Dispose();
|
||||
}
|
||||
|
||||
@@ -1147,8 +1147,8 @@ namespace Game.Maps
|
||||
//This may happen when a player just logs in and a pet moves to a nearby unloaded cell
|
||||
//To avoid this, we can load nearby cells when player log in
|
||||
//But this check is always needed to ensure safety
|
||||
/// @todo pets will disappear if this is outside CreatureRespawnRelocation
|
||||
/// //need to check why pet is frequently relocated to an unloaded cell
|
||||
// @todo pets will disappear if this is outside CreatureRespawnRelocation
|
||||
//need to check why pet is frequently relocated to an unloaded cell
|
||||
if (creature.IsPet())
|
||||
((Pet)creature).Remove(PetSaveMode.NotInSlot, true);
|
||||
else
|
||||
@@ -4434,7 +4434,7 @@ namespace Game.Maps
|
||||
|
||||
public override bool AddPlayerToMap(Player player, bool initPlayer = true)
|
||||
{
|
||||
/// @todo Not sure about checking player level: already done in HandleAreaTriggerOpcode
|
||||
// @todo Not sure about checking player level: already done in HandleAreaTriggerOpcode
|
||||
// GMs still can teleport player in instance.
|
||||
// Is it needed?
|
||||
lock(_mapLock)
|
||||
@@ -4623,7 +4623,7 @@ namespace Game.Maps
|
||||
|
||||
if (load)
|
||||
{
|
||||
/// @todo make a global storage for this
|
||||
// @todo make a global storage for this
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_INSTANCE);
|
||||
stmt.AddValue(0, GetId());
|
||||
stmt.AddValue(1, i_InstanceId);
|
||||
|
||||
@@ -255,7 +255,7 @@ namespace Game.Movement
|
||||
}
|
||||
|
||||
// look for startPoly/endPoly in current path
|
||||
/// @todo we can merge it with getPathPolyByPosition() loop
|
||||
// @todo we can merge it with getPathPolyByPosition() loop
|
||||
bool startPolyFound = false;
|
||||
bool endPolyFound = false;
|
||||
uint pathStartIndex = 0;
|
||||
@@ -314,7 +314,7 @@ namespace Game.Movement
|
||||
// sub-path of optimal path is optimal
|
||||
|
||||
// take ~80% of the original length
|
||||
/// @todo play with the values here
|
||||
// @todo play with the values here
|
||||
uint prefixPolyLength = (uint)(_polyLength * 0.8f + 0.5f);
|
||||
Array.Copy(_pathPolyRefs, pathStartIndex, _pathPolyRefs, 0, prefixPolyLength);
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace Game.Movement
|
||||
{
|
||||
// only happens if pass bad data to findStraightPath or navmesh is broken
|
||||
// single point paths can be generated here
|
||||
/// @todo check the exact cases
|
||||
// @todo check the exact cases
|
||||
Log.outDebug(LogFilter.Maps, "++ PathGenerator.BuildPointPath FAILED! path sized {0} returned\n", pointCount);
|
||||
BuildShortcut();
|
||||
pathType = PathType.NoPath;
|
||||
@@ -921,9 +921,9 @@ namespace Game.Movement
|
||||
|
||||
_navMesh.calcTileLoc(point, ref tx, ref ty);
|
||||
|
||||
/// Workaround
|
||||
/// For some reason, often the tx and ty variables wont get a valid value
|
||||
/// Use this check to prevent getting negative tile coords and crashing on getTileAt
|
||||
// Workaround
|
||||
// For some reason, often the tx and ty variables wont get a valid value
|
||||
// Use this check to prevent getting negative tile coords and crashing on getTileAt
|
||||
if (tx < 0 || ty < 0)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Game.Movement
|
||||
// Returns true to show that the arguments were configured correctly and MoveSpline initialization will succeed.
|
||||
public bool Validate(Unit unit)
|
||||
{
|
||||
Func<bool, bool> CHECK = new Func<bool, bool>(exp =>
|
||||
Func<bool, bool> CHECK = exp =>
|
||||
{
|
||||
if (!(exp))
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace Game.Movement
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
if (!CHECK(path.Length > 1))
|
||||
return false;
|
||||
|
||||
@@ -139,8 +139,8 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (var klass in SuccessInfo.Value.AvailableClasses)
|
||||
{
|
||||
_worldPacket.WriteUInt8(klass.Key); /// the current class
|
||||
_worldPacket.WriteUInt8(klass.Value); /// the required Expansion
|
||||
_worldPacket.WriteUInt8(klass.Key); // the current class
|
||||
_worldPacket.WriteUInt8(klass.Value); // the required Expansion
|
||||
}
|
||||
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.IsExpansionTrial);
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public bool Success;
|
||||
public bool IsDeletedCharacters; // used for character undelete list
|
||||
public bool IsDemonHunterCreationAllowed = false; ///< used for demon hunter early access
|
||||
public bool IsDemonHunterCreationAllowed = false; //used for demon hunter early access
|
||||
public bool HasDemonHunterOnRealm = false;
|
||||
public bool Unknown7x = false;
|
||||
public bool IsAlliedRacesCreationAllowed = false;
|
||||
@@ -72,7 +72,7 @@ namespace Game.Network.Packets
|
||||
public Optional<uint> DisabledClassesMask = new Optional<uint>();
|
||||
|
||||
public List<CharacterInfo> Characters = new List<CharacterInfo>(); // all characters on the list
|
||||
public List<RaceUnlock> RaceUnlockData = new List<RaceUnlock>(); ///<
|
||||
public List<RaceUnlock> RaceUnlockData = new List<RaceUnlock>(); //
|
||||
|
||||
public class CharacterInfo
|
||||
{
|
||||
|
||||
@@ -716,7 +716,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid NoteeGUID;
|
||||
public bool IsPublic; ///< 0 == Officer, 1 == Public
|
||||
public bool IsPublic; // 0 == Officer, 1 == Public
|
||||
public string Note;
|
||||
}
|
||||
|
||||
@@ -736,7 +736,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid Member;
|
||||
public bool IsPublic; ///< 0 == Officer, 1 == Public
|
||||
public bool IsPublic; // 0 == Officer, 1 == Public
|
||||
public string Note;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,8 +98,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(PlayerGUID);
|
||||
_worldPacket.WriteUInt8(LifetimeMaxRank);
|
||||
_worldPacket.WriteUInt16(YesterdayHK); /// @todo: confirm order
|
||||
_worldPacket.WriteUInt16(TodayHK); /// @todo: confirm order
|
||||
_worldPacket.WriteUInt16(YesterdayHK); // @todo: confirm order
|
||||
_worldPacket.WriteUInt16(TodayHK); // @todo: confirm order
|
||||
_worldPacket.WriteUInt32(LifetimeHK);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Game.Network.Packets
|
||||
|
||||
Item = new ItemInstance(item);
|
||||
Index = index;
|
||||
Usable = true; /// @todo
|
||||
Usable = true; // @todo
|
||||
|
||||
for (EnchantmentSlot enchant = 0; enchant < EnchantmentSlot.Max; ++enchant)
|
||||
{
|
||||
|
||||
@@ -305,8 +305,8 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
public InvUpdate Inv;
|
||||
public byte Slot1; /// Source Slot
|
||||
public byte Slot2; /// Destination Slot
|
||||
public byte Slot1; // Source Slot
|
||||
public byte Slot2; // Destination Slot
|
||||
}
|
||||
|
||||
public class SwapItem : ClientPacket
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
public int[] FactionStandings = new int[FactionCount];
|
||||
public bool[] FactionHasBonus = new bool[FactionCount]; ///< @todo: implement faction bonus
|
||||
public bool[] FactionHasBonus = new bool[FactionCount]; //@todo: implement faction bonus
|
||||
public FactionFlags[] FactionFlags = new FactionFlags[FactionCount];
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Game
|
||||
{
|
||||
initFactions.FactionFlags[pair.Key] = pair.Value.Flags;
|
||||
initFactions.FactionStandings[pair.Key] = pair.Value.Standing;
|
||||
/// @todo faction bonus
|
||||
// @todo faction bonus
|
||||
pair.Value.needSend = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -859,7 +859,7 @@ namespace Game
|
||||
//to set mailtimer to return mails every day between 4 and 5 am
|
||||
//mailtimer is increased when updating auctions
|
||||
//one second is 1000 -(tested on win system)
|
||||
/// @todo Get rid of magic numbers
|
||||
// @todo Get rid of magic numbers
|
||||
var localTime = Time.UnixTimeToDateTime(m_gameTime).ToLocalTime();
|
||||
mail_timer = ((((localTime.Hour + 20) % 24) * Time.Hour * Time.InMilliseconds) / m_timers[WorldTimers.Auctions].GetInterval());
|
||||
//1440
|
||||
@@ -1212,7 +1212,7 @@ namespace Game
|
||||
{
|
||||
m_timers[WorldTimers.Blackmarket].Reset();
|
||||
|
||||
///- Update blackmarket, refresh auctions if necessary
|
||||
//- Update blackmarket, refresh auctions if necessary
|
||||
if ((blackmarket_timer * m_timers[WorldTimers.Blackmarket].GetInterval() >= WorldConfig.GetIntValue(WorldCfg.BlackmarketUpdatePeriod) * Time.Hour * Time.InMilliseconds) || blackmarket_timer == 0)
|
||||
{
|
||||
Global.BlackMarketMgr.RefreshAuctions();
|
||||
@@ -1230,7 +1230,7 @@ namespace Game
|
||||
UpdateSessions(diff);
|
||||
RecordTimeDiff("UpdateSessions");
|
||||
|
||||
/// <li> Update uptime table
|
||||
// <li> Update uptime table
|
||||
if (m_timers[WorldTimers.UpTime].Passed())
|
||||
{
|
||||
uint tmpDiff = (uint)(m_gameTime - m_startTime);
|
||||
@@ -1248,7 +1248,7 @@ namespace Game
|
||||
DB.Login.Execute(stmt);
|
||||
}
|
||||
|
||||
/// <li> Clean logs table
|
||||
// <li> Clean logs table
|
||||
if (WorldConfig.GetIntValue(WorldCfg.LogdbCleartime) > 0) // if not enabled, ignore the timer
|
||||
{
|
||||
if (m_timers[WorldTimers.CleanDB].Passed())
|
||||
@@ -1580,7 +1580,7 @@ namespace Game
|
||||
|
||||
uint duration_secs = Time.TimeStringToSecs(duration);
|
||||
|
||||
/// Pick a player to ban if not online
|
||||
// Pick a player to ban if not online
|
||||
if (!pBanned)
|
||||
{
|
||||
guid = ObjectManager.GetPlayerGUIDByName(name);
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Game
|
||||
if (_player)
|
||||
LogoutPlayer(true);
|
||||
|
||||
/// - If have unclosed socket, close it
|
||||
// - If have unclosed socket, close it
|
||||
for (byte i = 0; i < 2; ++i)
|
||||
{
|
||||
if (m_Socket[i] != null)
|
||||
@@ -633,7 +633,7 @@ namespace Game
|
||||
_accountLoginCallback = null;
|
||||
}
|
||||
|
||||
//! HandlePlayerLoginOpcode
|
||||
// HandlePlayerLoginOpcode
|
||||
if (_charLoginCallback != null && _charLoginCallback.IsCompleted)
|
||||
{
|
||||
HandlePlayerLogin((LoginQueryHolder)_charLoginCallback.Result);
|
||||
|
||||
@@ -388,7 +388,7 @@ namespace Game.Spells
|
||||
|
||||
var app = m_applications.LookupByKey(target.GetGUID());
|
||||
|
||||
/// @todo Figure out why this happens
|
||||
// @todo Figure out why this happens
|
||||
if (app == null)
|
||||
{
|
||||
Log.outError(LogFilter.Spells, "Aura._UnapplyForTarget, target: {0}, caster: {1}, spell: {2} was not found in owners application map!",
|
||||
@@ -537,7 +537,7 @@ namespace Game.Spells
|
||||
// owner has to be in world, or effect has to be applied to self
|
||||
if (!m_owner.IsSelfOrInSameMap(unit))
|
||||
{
|
||||
/// @todo There is a crash caused by shadowfiend load addon
|
||||
// @todo There is a crash caused by shadowfiend load addon
|
||||
Log.outFatal(LogFilter.Spells, "Aura {0}: Owner {1} (map {2}) is not in the same map as target {3} (map {4}).", GetSpellInfo().Id,
|
||||
m_owner.GetName(), m_owner.IsInWorld ? (int)m_owner.GetMap().GetId() : -1,
|
||||
unit.GetName(), unit.IsInWorld ? (int)unit.GetMap().GetId() : -1);
|
||||
@@ -1706,7 +1706,7 @@ namespace Game.Spells
|
||||
if (procEffectMask == 0)
|
||||
return 0;
|
||||
|
||||
/// @todo
|
||||
// @todo
|
||||
// do allow additional requirements for procs
|
||||
// this is needed because this is the last moment in which you can prevent aura charge drop on proc
|
||||
// and possibly a way to prevent default checks (if there're going to be any)
|
||||
@@ -1720,7 +1720,7 @@ namespace Game.Spells
|
||||
|
||||
// Check if current equipment meets aura requirements
|
||||
// do that only for passive spells
|
||||
/// @todo this needs to be unified for all kinds of auras
|
||||
// @todo this needs to be unified for all kinds of auras
|
||||
Unit target = aurApp.GetTarget();
|
||||
if (IsPassive() && target.IsTypeId(TypeId.Player))
|
||||
{
|
||||
@@ -2039,9 +2039,7 @@ namespace Game.Spells
|
||||
if (eff.IsEffectAffected(m_spellInfo, aurEff.GetEffIndex()))
|
||||
eff.Call(aurEff, dmgInfo, ref absorbAmount);
|
||||
|
||||
if (!defaultPrevented)
|
||||
defaultPrevented = auraScript._IsDefaultActionPrevented();
|
||||
|
||||
defaultPrevented = auraScript._IsDefaultActionPrevented();
|
||||
auraScript._FinishScriptCall();
|
||||
}
|
||||
}
|
||||
@@ -2060,7 +2058,7 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
public void CallScriptEffectManaShieldHandlers(AuraEffect aurEff, AuraApplication aurApp, DamageInfo dmgInfo, ref uint absorbAmount, bool defaultPrevented)
|
||||
public void CallScriptEffectManaShieldHandlers(AuraEffect aurEff, AuraApplication aurApp, DamageInfo dmgInfo, ref uint absorbAmount, ref bool defaultPrevented)
|
||||
{
|
||||
foreach (var auraScript in m_loadedScripts)
|
||||
{
|
||||
|
||||
@@ -1938,7 +1938,7 @@ namespace Game.Spells
|
||||
Unit target = aurApp.GetTarget();
|
||||
|
||||
// Vengeance of the Blue Flight (@todo REMOVE THIS!)
|
||||
/// @workaround
|
||||
// @workaround
|
||||
if (m_spellInfo.Id == 45839)
|
||||
{
|
||||
if (apply)
|
||||
@@ -4985,7 +4985,7 @@ namespace Game.Spells
|
||||
HealInfo healInfo = new HealInfo(caster, target, heal, auraSpellInfo, auraSpellInfo.GetSchoolMask());
|
||||
caster.HealBySpell(healInfo);
|
||||
|
||||
/// @todo: should proc other auras?
|
||||
// @todo: should proc other auras?
|
||||
int mana = caster.GetMaxPower(PowerType.Mana);
|
||||
if (mana != 0)
|
||||
{
|
||||
@@ -5044,7 +5044,7 @@ namespace Game.Spells
|
||||
triggerSpellId = 30571;
|
||||
break;
|
||||
// Doom
|
||||
/// @todo effect trigger spell may be independant on spell targets, and executed in spell finish phase
|
||||
// @todo effect trigger spell may be independant on spell targets, and executed in spell finish phase
|
||||
// so instakill will be naturally done before trigger spell
|
||||
case 31347:
|
||||
{
|
||||
|
||||
@@ -778,7 +778,7 @@ namespace Game.Spells
|
||||
SpellTargetPosition st = Global.SpellMgr.GetSpellTargetPosition(m_spellInfo.Id, effIndex);
|
||||
if (st != null)
|
||||
{
|
||||
/// @todo fix this check
|
||||
// @todo fix this check
|
||||
if (m_spellInfo.HasEffect(SpellEffectName.TeleportUnits) || m_spellInfo.HasEffect(SpellEffectName.Bind))
|
||||
dest = new SpellDestination(st.target_X, st.target_Y, st.target_Z, st.target_Orientation, st.target_mapId);
|
||||
else if (st.target_mapId == m_caster.GetMapId())
|
||||
@@ -1244,7 +1244,7 @@ namespace Game.Spells
|
||||
void SelectEffectTypeImplicitTargets(uint effIndex)
|
||||
{
|
||||
// special case for SPELL_EFFECT_SUMMON_RAF_FRIEND and SPELL_EFFECT_SUMMON_PLAYER
|
||||
/// @todo this is a workaround - target shouldn't be stored in target map for those spells
|
||||
// @todo this is a workaround - target shouldn't be stored in target map for those spells
|
||||
SpellEffectInfo effect = GetEffect(effIndex);
|
||||
if (effect == null)
|
||||
return;
|
||||
@@ -1670,7 +1670,7 @@ namespace Game.Spells
|
||||
if (m_spellInfo.Speed > 0.0f && m_caster != target)
|
||||
{
|
||||
// calculate spell incoming interval
|
||||
/// @todo this is a hack
|
||||
// @todo this is a hack
|
||||
float dist = m_caster.GetDistance(target.GetPositionX(), target.GetPositionY(), target.GetPositionZ());
|
||||
|
||||
if (dist < 5.0f)
|
||||
@@ -2132,7 +2132,7 @@ namespace Game.Spells
|
||||
else if (m_caster.IsFriendlyTo(unit))
|
||||
{
|
||||
// for delayed spells ignore negative spells (after duel end) for friendly targets
|
||||
/// @todo this cause soul transfer bugged
|
||||
// @todo this cause soul transfer bugged
|
||||
// 63881 - Malady of the Mind jump spell (Yogg-Saron)
|
||||
if (m_spellInfo.Speed > 0.0f && unit.IsTypeId(TypeId.Player) && !m_spellInfo.IsPositive() && m_spellInfo.Id != 63881)
|
||||
return SpellMissInfo.Evade;
|
||||
@@ -4089,7 +4089,7 @@ namespace Game.Spells
|
||||
|
||||
resurrectRequest.SpellID = m_spellInfo.Id;
|
||||
|
||||
//packet.ReadBit("UseTimer"); /// @todo: 6.x Has to be implemented
|
||||
//packet.ReadBit("UseTimer"); // @todo: 6.x Has to be implemented
|
||||
resurrectRequest.Sickness = !m_caster.IsTypeId(TypeId.Player); // "you'll be afflicted with resurrection sickness"
|
||||
|
||||
resurrectRequest.Name = sentName;
|
||||
|
||||
@@ -972,12 +972,5 @@ namespace Game.Spells
|
||||
public DateTime RechargeStart;
|
||||
public DateTime RechargeEnd;
|
||||
}
|
||||
|
||||
class CooldownDurations
|
||||
{
|
||||
public int Cooldown = -1;
|
||||
public uint CategoryId = 0;
|
||||
public int CategoryCooldown = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,8 +658,8 @@ namespace Game.Entities
|
||||
SpellInfo first = GetSpellInfo(pair.Key);
|
||||
SpellInfo next = GetSpellInfo(pair.Value);
|
||||
|
||||
if (first == null || next != null)
|
||||
continue;
|
||||
if (!mSpellChains.ContainsKey(pair.Key))
|
||||
mSpellChains[pair.Key] = new SpellChainNode();
|
||||
|
||||
mSpellChains[pair.Key].first = first;
|
||||
mSpellChains[pair.Key].prev = null;
|
||||
@@ -668,6 +668,9 @@ namespace Game.Entities
|
||||
mSpellChains[pair.Key].rank = 1;
|
||||
mSpellInfoMap[pair.Key].ChainEntry = mSpellChains[pair.Key];
|
||||
|
||||
if (!mSpellChains.ContainsKey(pair.Value))
|
||||
mSpellChains[pair.Value] = new SpellChainNode();
|
||||
|
||||
mSpellChains[pair.Value].first = first;
|
||||
mSpellChains[pair.Value].prev = first;
|
||||
mSpellChains[pair.Value].next = null;
|
||||
@@ -684,8 +687,14 @@ namespace Game.Entities
|
||||
if (last == null)
|
||||
break;
|
||||
|
||||
if (!mSpellChains.ContainsKey(nextPair.Key))
|
||||
mSpellChains[nextPair.Key] = new SpellChainNode();
|
||||
|
||||
mSpellChains[nextPair.Key].next = last;
|
||||
|
||||
if (!mSpellChains.ContainsKey(nextPair.Value))
|
||||
mSpellChains[nextPair.Value] = new SpellChainNode();
|
||||
|
||||
mSpellChains[nextPair.Value].first = first;
|
||||
mSpellChains[nextPair.Value].prev = prev;
|
||||
mSpellChains[nextPair.Value].next = null;
|
||||
@@ -2433,7 +2442,7 @@ namespace Game.Entities
|
||||
break;
|
||||
case 56606: // Ride Jokkum
|
||||
case 61791: // Ride Vehicle (Yogg-Saron)
|
||||
/// @todo: remove this when basepoints of all Ride Vehicle auras are calculated correctly
|
||||
// @todo: remove this when basepoints of all Ride Vehicle auras are calculated correctly
|
||||
spellInfo.GetEffect(0).BasePoints = 1;
|
||||
break;
|
||||
case 59630: // Black Magic
|
||||
|
||||
@@ -314,7 +314,7 @@ namespace Game
|
||||
// TIMING_CHECK
|
||||
{
|
||||
byte result = buff.ReadUInt8();
|
||||
/// @todo test it.
|
||||
// @todo test it.
|
||||
if (result == 0x00)
|
||||
{
|
||||
Log.outWarn(LogFilter.Warden, "{0} failed timing check. Action: {1}", _session.GetPlayerInfo(), Penalty());
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace Game
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Weather statistics:
|
||||
// Weather statistics:
|
||||
// 30% - no change
|
||||
// 30% - weather gets better (if not fine) or change weather type
|
||||
// 30% - weather worsens (if not fine)
|
||||
@@ -178,7 +178,7 @@ namespace Game
|
||||
|
||||
if (m_type != WeatherType.Fine)
|
||||
{
|
||||
/// Radical change:
|
||||
// Radical change:
|
||||
// if light . heavy
|
||||
// if medium . change weather type
|
||||
// if heavy . 50% light, 50% change weather type
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace Scripts.EasternKingdoms.Karazhan
|
||||
|
||||
switch (m_uiOperaEvent)
|
||||
{
|
||||
/// @todo Set Object visibilities for Opera based on performance
|
||||
// @todo Set Object visibilities for Opera based on performance
|
||||
case OperaEvents.Oz:
|
||||
break;
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Scripts.Kalimdor.ZoneAshenvale
|
||||
if (quest.Id == QuestIds.FreedomToRuul)
|
||||
{
|
||||
me.SetFaction(Misc.FactionQuest);
|
||||
base.Start(true, false, player.GetGUID());
|
||||
Start(true, false, player.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Scripts.Kalimdor.ZoneAshenvale
|
||||
{
|
||||
Talk(TextIds.SayMugStart1);
|
||||
me.SetFaction(Misc.FactionQuest);
|
||||
base.Start(true, false, player.GetGUID());
|
||||
Start(true, false, player.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.ElderNadox
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
// @todo: summoned by egg
|
||||
DoCast(me, SpellIds.SummonSwarmers);
|
||||
if (RandomHelper.URand(1, 3) == 3) // 33% chance of dialog
|
||||
Talk(TextIds.SayEggSac);
|
||||
@@ -147,7 +147,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.ElderNadox
|
||||
|
||||
if (!GuardianSummoned && me.HealthBelowPct(50))
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
// @todo: summoned by egg
|
||||
Talk(TextIds.EmoteHatches, me);
|
||||
DoCast(me, SpellIds.SummonSwarmGuard);
|
||||
GuardianSummoned = true;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user