bool QuestParserCollection::PlayerHasQuestSubGlobal(QuestEventID evt) { if(_global_player_quest_status == QuestUnloaded) { std::string filename; QuestInterface *qi = GetQIByGlobalPlayerQuest(filename); if(qi) { _global_player_quest_status = qi->GetIdentifier(); qi->LoadGlobalPlayerScript(filename); return qi->GlobalPlayerHasQuestSub(evt); } } else if(_global_player_quest_status != QuestFailedToLoad) { std::map<uint32, QuestInterface*>::iterator iter = _interfaces.find(_global_player_quest_status); return iter->second->GlobalPlayerHasQuestSub(evt); } return false; }
int QuestParserCollection::EventPlayerGlobal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<void*> *extra_pointers) { if(_global_player_quest_status == QuestUnloaded) { std::string filename; QuestInterface *qi = GetQIByGlobalPlayerQuest(filename); if(qi) { _global_player_quest_status = qi->GetIdentifier(); qi->LoadGlobalPlayerScript(filename); return qi->EventGlobalPlayer(evt, client, data, extra_data, extra_pointers); } } else { if(_global_player_quest_status != QuestFailedToLoad) { std::map<uint32, QuestInterface*>::iterator iter = _interfaces.find(_global_player_quest_status); return iter->second->EventGlobalPlayer(evt, client, data, extra_data, extra_pointers); } } return 0; }