mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
One fix to QuestParserCollection for global npc quests, HasSub is not working at all right with it. Need to check it out later tonight
This commit is contained in:
parent
23b2b599a7
commit
c6d8895b70
@ -15,6 +15,7 @@ extern Zone* zone;
|
|||||||
QuestParserCollection::QuestParserCollection() {
|
QuestParserCollection::QuestParserCollection() {
|
||||||
_player_quest_status = QuestUnloaded;
|
_player_quest_status = QuestUnloaded;
|
||||||
_global_player_quest_status = QuestUnloaded;
|
_global_player_quest_status = QuestUnloaded;
|
||||||
|
_global_npc_quest_status = QuestUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
QuestParserCollection::~QuestParserCollection() {
|
QuestParserCollection::~QuestParserCollection() {
|
||||||
@ -57,6 +58,7 @@ bool QuestParserCollection::HasQuestSub(uint32 npcid, const char *subname) {
|
|||||||
return qi->HasGlobalQuestSub(subname);
|
return qi->HasGlobalQuestSub(subname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iter != _npc_quest_status.end()) {
|
if(iter != _npc_quest_status.end()) {
|
||||||
//loaded or failed to load
|
//loaded or failed to load
|
||||||
if(iter->second != QuestFailedToLoad) {
|
if(iter->second != QuestFailedToLoad) {
|
||||||
@ -169,16 +171,15 @@ void QuestParserCollection::EventNPC(QuestEventID evt, NPC* npc, Mob *init, std:
|
|||||||
|
|
||||||
// K, lets also parse templates/global_npc.pl
|
// K, lets also parse templates/global_npc.pl
|
||||||
if(_global_npc_quest_status != QuestUnloaded) {
|
if(_global_npc_quest_status != QuestUnloaded) {
|
||||||
|
std::map<uint32, QuestInterface*>::iterator qiter = _interfaces.find(_global_npc_quest_status);
|
||||||
|
qiter->second->EventGlobalNPC(evt, npc, init, data, extra_data);
|
||||||
|
} else {
|
||||||
QuestInterface *qi = GetQIByGlobalNPCQuest();
|
QuestInterface *qi = GetQIByGlobalNPCQuest();
|
||||||
if(qi) {
|
if(qi) {
|
||||||
_global_npc_quest_status = qi->GetIdentifier();
|
_global_npc_quest_status = qi->GetIdentifier();
|
||||||
qi->EventGlobalNPC(evt, npc, init, data, extra_data);
|
qi->EventGlobalNPC(evt, npc, init, data, extra_data);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if(_global_npc_quest_status != QuestFailedToLoad) {
|
_global_npc_quest_status = QuestFailedToLoad;
|
||||||
std::map<uint32, QuestInterface*>::iterator iter = _interfaces.find(_global_npc_quest_status);
|
|
||||||
if(iter != _interfaces.end())
|
|
||||||
iter->second->EventGlobalNPC(evt, npc, init, data, extra_data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user