mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Fixed a bunch of bugs Jorge found. Readded tutorial quests back.
This commit is contained in:
@@ -123,7 +123,7 @@ namespace Meteor.Map.Actors.QuestNS
|
||||
|
||||
public void UpdateENPCs()
|
||||
{
|
||||
if (data.Dirty)
|
||||
if (data != null && data.Dirty)
|
||||
{
|
||||
if (questState != null)
|
||||
questState.UpdateState();
|
||||
@@ -186,7 +186,7 @@ namespace Meteor.Map.Actors.QuestNS
|
||||
{
|
||||
List<LuaParam> returned = LuaEngine.GetInstance().CallLuaFunctionForReturn(caller, this, "IsQuestENPC", true, npc, this);
|
||||
bool scriptReturned = returned != null && returned.Count != 0 && returned[0].typeID == 3;
|
||||
return scriptReturned || questState.HasENpc(npc.GetActorClassId());
|
||||
return scriptReturned || (questState?.HasENpc(npc.GetActorClassId()) ?? false);
|
||||
}
|
||||
|
||||
public void StartSequence(ushort sequence)
|
||||
|
@@ -72,7 +72,7 @@ namespace Meteor.Map.Actors.QuestNS
|
||||
|
||||
public void UpdateQuestCompleted(Quest quest)
|
||||
{
|
||||
CompletedQuestsBitfield.Set(quest.Id - SCENARIO_START);
|
||||
CompletedQuestsBitfield.Set(quest.GetQuestId() - SCENARIO_START);
|
||||
QuestGameData[] updated = Server.GetQuestGamedataByPrerequisite(quest.GetQuestId());
|
||||
foreach (var questData in updated)
|
||||
PrereqBitfield.Set(questData.Id - SCENARIO_START);
|
||||
|
Reference in New Issue
Block a user