Finished Treasures of the Main and Legends Adrift. Fixed quests appearing in private areas (echos). Fixed other bugs. Implemented NPC Linkshells. Added more options to nudge command. Added nudgenpc command. Added testbnpckill command.

This commit is contained in:
Filip Maj 2022-03-11 02:17:46 -05:00
parent ebba56602c
commit 65ee91e49c
14 changed files with 864 additions and 38 deletions

View file

@ -1840,18 +1840,27 @@ namespace Meteor.Map.Actors
public Quest[] GetQuestsForNpc(Npc npc)
{
Quest[] quests = questStateManager.GetQuestsForNpc(npc);
Quest[] quests = questStateManager.GetQuestsForNpc(npc, CurrentArea.IsPrivate());
Array.Sort(quests, (q1, q2) => (q1.HasData() ? 1 : 0) - (q2.HasData() ? 1 : 0));
return quests;
}
public void HandleBNpcKill(uint bnpcClassId)
{
foreach (Quest quest in questScenario)
{
if (quest != null)
quest.OnKillBNpc(this, bnpcClassId);
}
}
public bool HandleNpcLs(uint id)
{
foreach (Quest quest in questScenario)
{
if (quest != null && quest.HasNpcLsMsgs(id))
{
quest.OnNpcLS(this);
quest.OnNpcLs(this);
return true;
}
}