mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-13 07:54:39 +02:00
Fixed a bunch of bugs Jorge found. Readded tutorial quests back.
This commit is contained in:
parent
c240096eb8
commit
bbbab356af
10 changed files with 104 additions and 23 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue