mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 11:26:35 +00:00
[Quest API] Let HasQuestSub check encounters (#2435)
This fixes an edge case where trading would not detect the npc had a quest handler if it was registered inside a Lua encounter.
This commit is contained in:
@@ -67,10 +67,10 @@ public:
|
||||
void ReloadQuests(bool reset_timers = true);
|
||||
void RemoveEncounter(const std::string name);
|
||||
|
||||
bool HasQuestSub(uint32 npcid, QuestEventID evt);
|
||||
bool PlayerHasQuestSub(QuestEventID evt);
|
||||
bool SpellHasQuestSub(uint32 spell_id, QuestEventID evt);
|
||||
bool ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID evt);
|
||||
bool HasQuestSub(uint32 npcid, QuestEventID evt, bool check_encounters = false);
|
||||
bool PlayerHasQuestSub(QuestEventID evt, bool check_encounters = false);
|
||||
bool SpellHasQuestSub(uint32 spell_id, QuestEventID evt, bool check_encounters = false);
|
||||
bool ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID evt, bool check_encounters = false);
|
||||
|
||||
int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
@@ -109,8 +109,13 @@ public:
|
||||
private:
|
||||
bool HasQuestSubLocal(uint32 npcid, QuestEventID evt);
|
||||
bool HasQuestSubGlobal(QuestEventID evt);
|
||||
bool NPCHasEncounterSub(uint32 npc_id, QuestEventID evt);
|
||||
bool PlayerHasQuestSubLocal(QuestEventID evt);
|
||||
bool PlayerHasQuestSubGlobal(QuestEventID evt);
|
||||
bool PlayerHasEncounterSub(QuestEventID evt);
|
||||
bool SpellHasEncounterSub(uint32 spell_id, QuestEventID evt);
|
||||
bool ItemHasEncounterSub(EQ::ItemInstance* item, QuestEventID evt);
|
||||
bool HasEncounterSub(QuestEventID evt, const std::string& package_name);
|
||||
|
||||
int EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
|
||||
Reference in New Issue
Block a user