Fixed #102 - Logging into a Act/Quest/Step doesn't work on Act I
This commit is contained in:
parent
3e7a4f033d
commit
ebd1a7c855
@ -10,6 +10,7 @@ using DiIiS_NA.GameServer.MessageSystem;
|
|||||||
using Gibbed.IO;
|
using Gibbed.IO;
|
||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
using DiIiS_NA.Core.Storage;
|
using DiIiS_NA.Core.Storage;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace DiIiS_NA.GameServer.Core.Types.Math
|
namespace DiIiS_NA.GameServer.Core.Types.Math
|
||||||
{
|
{
|
||||||
@ -193,5 +194,13 @@ namespace DiIiS_NA.GameServer.Core.Types.Math
|
|||||||
{
|
{
|
||||||
return string.Format("x:{0} y:{1} z:{2}", X, Y, Z);
|
return string.Format("x:{0} y:{1} z:{2}", X, Y, Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector3D Around2D(float f)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -941,14 +941,24 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem
|
|||||||
CurrentQuest = QuestsOrder[0];
|
CurrentQuest = QuestsOrder[0];
|
||||||
CurrentStep = -1;
|
CurrentStep = -1;
|
||||||
|
|
||||||
if (CurrentAct is 3000 or 0)
|
if (CurrentAct is 3000)
|
||||||
{
|
{
|
||||||
QuestManager.Quests[CurrentQuest].Steps[-1].OnAdvance.Invoke();
|
QuestManager.Quests[CurrentQuest].Steps[-1].OnAdvance.Invoke();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(currQuest == QuestsOrder[0] && step == -1))
|
if (!(currQuest == QuestsOrder[0] && step == -1))
|
||||||
|
{
|
||||||
|
if (currQuest == -1 && step == -1)
|
||||||
|
{
|
||||||
|
currQuest = CurrentQuest;
|
||||||
|
QuestManager.Quests[currQuest].Steps[-1].OnAdvance.Invoke();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QuestManager.AdvanceTo(currQuest, step);
|
QuestManager.AdvanceTo(currQuest, step);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (CurrentQuest == QuestsOrder[0] && CurrentStep == -1)
|
if (CurrentQuest == QuestsOrder[0] && CurrentStep == -1)
|
||||||
QuestManager.Quests[CurrentQuest].Steps[-1].OnAdvance.Invoke();
|
QuestManager.Quests[CurrentQuest].Steps[-1].OnAdvance.Invoke();
|
||||||
|
|||||||
@ -412,6 +412,18 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem
|
|||||||
if (cycle > 200) break;
|
if (cycle > 200) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void AdvanceToFirstStep(int snoQuest)
|
||||||
|
{
|
||||||
|
var quest = Quests[snoQuest].Steps.OrderBy(s => s.Key).FirstOrDefault();
|
||||||
|
if (quest.Value != null)
|
||||||
|
{
|
||||||
|
AdvanceTo(snoQuest, quest.Key == -1 ? quest.Value.NextStep : quest.Key);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.Error("AdvanceToNext: quest {0} not found", snoQuest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public float QuestTimerEstimate = 0f;
|
public float QuestTimerEstimate = 0f;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
user.block.title