Updated acts/quests, ActI/72095/32 updates, added reference to Spectre
This commit is contained in:
parent
ebd1a7c855
commit
4580658f6f
@ -1,6 +1,8 @@
|
|||||||
//Blizzless Project 2022
|
using System;
|
||||||
//Blizzless Project 2022
|
using System.Linq;
|
||||||
using System;
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Spectre.Console;
|
||||||
|
|
||||||
namespace DiIiS_NA.Core.Logging
|
namespace DiIiS_NA.Core.Logging
|
||||||
{
|
{
|
||||||
|
|||||||
@ -40,6 +40,10 @@ namespace DiIiS_NA.Core.Logging
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Debug,
|
Debug,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// The messages meant for method call tracing.
|
||||||
|
/// </summary>
|
||||||
|
MethodTrace,
|
||||||
|
/// <summary>
|
||||||
/// The messages meant for tracing purposes.
|
/// The messages meant for tracing purposes.
|
||||||
/// Trace messages are rarer than debug messages and should be used for more precise tracing.
|
/// Trace messages are rarer than debug messages and should be used for more precise tracing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -100,6 +104,13 @@ namespace DiIiS_NA.Core.Logging
|
|||||||
/// <param name="args">Additional arguments.</param>
|
/// <param name="args">Additional arguments.</param>
|
||||||
public void Trace(string message, params object[] args) => Log(Level.Trace, message, args);
|
public void Trace(string message, params object[] args) => Log(Level.Trace, message, args);
|
||||||
|
|
||||||
|
/// <param name="message">The log message.</param>
|
||||||
|
public void MethodTrace(string message) => Log(Level.MethodTrace, message, null);
|
||||||
|
|
||||||
|
/// <param name="message">The log message.</param>
|
||||||
|
/// <param name="args">Additional arguments.</param>
|
||||||
|
public void MethodTrace(string message, params object[] args) => Log(Level.MethodTrace, message, args);
|
||||||
|
|
||||||
/// <param name="message">The log message.</param>
|
/// <param name="message">The log message.</param>
|
||||||
public void Debug(string message) => Log(Level.Debug, message, null);
|
public void Debug(string message) => Log(Level.Debug, message, null);
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ namespace DiIiS_NA.GameServer.CommandManager
|
|||||||
if (!ExtractCommandAndParameters(line, out command, out parameters))
|
if (!ExtractCommandAndParameters(line, out command, out parameters))
|
||||||
{
|
{
|
||||||
output = "Unknown command: " + line;
|
output = "Unknown command: " + line;
|
||||||
Logger.Info(output);
|
Logger.Error(output);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,10 +76,15 @@ namespace DiIiS_NA.GameServer.CommandManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (found == false)
|
if (found == false)
|
||||||
output = string.Format("Unknown command: {0} {1}", command, parameters);
|
{
|
||||||
|
Logger.Error("Unknown command: " + command);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (output != string.Empty)
|
if (output != string.Empty)
|
||||||
Logger.Info(output);
|
Logger.Success(output);
|
||||||
|
else
|
||||||
|
Logger.Success("Command executed successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,8 @@ using Gibbed.IO;
|
|||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
using DiIiS_NA.Core.Storage;
|
using DiIiS_NA.Core.Storage;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
|
using DiIiS_NA.Core.Helpers.Math;
|
||||||
|
|
||||||
namespace DiIiS_NA.GameServer.Core.Types.Math
|
namespace DiIiS_NA.GameServer.Core.Types.Math
|
||||||
{
|
{
|
||||||
@ -110,9 +112,9 @@ namespace DiIiS_NA.GameServer.Core.Types.Math
|
|||||||
/// <returns>the distance squared between the vectors</returns>
|
/// <returns>the distance squared between the vectors</returns>
|
||||||
public float DistanceSquared(ref Vector3D point)
|
public float DistanceSquared(ref Vector3D point)
|
||||||
{
|
{
|
||||||
float x = point.X - X;
|
float x = point.X - X,
|
||||||
float y = point.Y - Y;
|
y = point.Y - Y,
|
||||||
float z = point.Z - Z;
|
z = point.Z - Z;
|
||||||
|
|
||||||
return ((x * x) + (y * y)) + (z * z);
|
return ((x * x) + (y * y)) + (z * z);
|
||||||
}
|
}
|
||||||
@ -178,29 +180,17 @@ namespace DiIiS_NA.GameServer.Core.Types.Math
|
|||||||
var v = o as Vector3D;
|
var v = o as Vector3D;
|
||||||
if (v != null)
|
if (v != null)
|
||||||
{
|
{
|
||||||
return X == v.X
|
return System.Math.Abs(X - v.X) < 0.0001
|
||||||
&& Y == v.Y
|
&& System.Math.Abs(Y - v.Y) < 0.0001
|
||||||
&& Z == v.Z;
|
&& System.Math.Abs(Z - v.Z) < 0.0001;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override string ToString() => $"X:{X:F4}, Y:{Y:F4} Z:{Z:F4}";
|
||||||
{
|
|
||||||
return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
public bool IsNear(Vector3D other, float distance) => DistanceSquared(ref other) < distance * distance;
|
||||||
{
|
|
||||||
return string.Format("x:{0} y:{1} z:{2}", X, Y, Z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector3D Around2D(float f)
|
public bool IsNearSquared(Vector3D other, float distanceSquared) => DistanceSquared(ref other) < distanceSquared;
|
||||||
{
|
|
||||||
var angle = (float)(System.Math.PI * 2 * f);
|
|
||||||
var x = (float)(System.Math.Cos(angle) * X - System.Math.Sin(angle) * Y);
|
|
||||||
var y = (float)(System.Math.Sin(angle) * X + System.Math.Cos(angle) * Y);
|
|
||||||
return new Vector3D(x, y, Z);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -552,7 +552,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem
|
|||||||
{
|
{
|
||||||
if (Game.QuestProgress.QuestTriggers.Count == 1)
|
if (Game.QuestProgress.QuestTriggers.Count == 1)
|
||||||
{
|
{
|
||||||
Logger.Trace("AutoSetQuestMarker()");
|
Logger.MethodTrace($"AutoSetQuestMarker() - {Game.QuestProgress.QuestTriggers.Count} triggers found");
|
||||||
var trigger = Game.QuestProgress.QuestTriggers.First();
|
var trigger = Game.QuestProgress.QuestTriggers.First();
|
||||||
if (trigger.Value.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor)
|
if (trigger.Value.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor)
|
||||||
foreach (var world in Game.Worlds)
|
foreach (var world in Game.Worlds)
|
||||||
|
|||||||
@ -555,8 +555,6 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
|
|||||||
StartConversation(tristramWorld, 72498);
|
StartConversation(tristramWorld, 72498);
|
||||||
});
|
});
|
||||||
//StartConversation(this.Game.GetWorld(71150), 72496);
|
//StartConversation(this.Game.GetWorld(71150), 72496);
|
||||||
// we check if Leah is spawned in New Tristram
|
|
||||||
|
|
||||||
var leah = tristramWorld.GetActorBySNO(ActorSno._leah, true);
|
var leah = tristramWorld.GetActorBySNO(ActorSno._leah, true);
|
||||||
if (leah == null)
|
if (leah == null)
|
||||||
{
|
{
|
||||||
@ -567,6 +565,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
|
|||||||
leah.SetVisible(true);
|
leah.SetVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetActorVisible(tristramWorld, ActorSno._leah, true);
|
||||||
ListenConversation(198617, new Advance());
|
ListenConversation(198617, new Advance());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
user.block.title