mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 00:32:25 +00:00
Remove duplicates
This commit is contained in:
parent
9a75d348be
commit
6e34b0a9ae
@ -3018,20 +3018,6 @@ void handle_zone_enter(
|
|||||||
lua_setfield(L, -2, "other");
|
lua_setfield(L, -2, "other");
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_zone_enter(
|
|
||||||
QuestInterface *parse,
|
|
||||||
lua_State* L,
|
|
||||||
Zone* zone,
|
|
||||||
std::string data,
|
|
||||||
uint32 extra_data,
|
|
||||||
std::vector<std::any> *extra_pointers
|
|
||||||
) {
|
|
||||||
Lua_Client l_client(std::any_cast<Client*>(extra_pointers->at(0)));
|
|
||||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
|
||||||
l_client_o.push(L);
|
|
||||||
lua_setfield(L, -2, "other");
|
|
||||||
}
|
|
||||||
|
|
||||||
void handle_zone_loot(
|
void handle_zone_loot(
|
||||||
QuestInterface *parse,
|
QuestInterface *parse,
|
||||||
lua_State* L,
|
lua_State* L,
|
||||||
|
|||||||
@ -1630,81 +1630,6 @@ QuestInterface* QuestParserCollection::GetQIByGlobalZoneQuest(std::string& filen
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QuestInterface* QuestParserCollection::GetQIByZoneQuest(std::string& filename)
|
|
||||||
{
|
|
||||||
if (!zone || !zone->IsLoaded()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string& global_path = fmt::format(
|
|
||||||
"{}/{}",
|
|
||||||
path.GetQuestsPath(),
|
|
||||||
QUEST_GLOBAL_DIRECTORY
|
|
||||||
);
|
|
||||||
|
|
||||||
const std::string& zone_path = fmt::format(
|
|
||||||
"{}/{}",
|
|
||||||
path.GetQuestsPath(),
|
|
||||||
zone->GetShortName()
|
|
||||||
);
|
|
||||||
|
|
||||||
const std::string& zone_versioned_path = fmt::format(
|
|
||||||
"{}/{}/v{}",
|
|
||||||
path.GetQuestsPath(),
|
|
||||||
zone->GetShortName(),
|
|
||||||
zone->GetInstanceVersion()
|
|
||||||
);
|
|
||||||
|
|
||||||
std::vector<std::string> file_names = {
|
|
||||||
fmt::format("{}/zone", zone_versioned_path), // Local versioned by Instance Version ./quests/zone/v0/zone.ext
|
|
||||||
fmt::format("{}/zone_v{}", zone_path, zone->GetInstanceVersion()), // Local by Instance Version
|
|
||||||
fmt::format("{}/zone", zone_path), // Local
|
|
||||||
fmt::format("{}/zone", global_path) // Global
|
|
||||||
};
|
|
||||||
|
|
||||||
std::string file_name;
|
|
||||||
for (auto & file : file_names) {
|
|
||||||
for (auto* e: _load_precedence) {
|
|
||||||
file_name = fmt::format(
|
|
||||||
"{}.{}",
|
|
||||||
file,
|
|
||||||
_extensions.find(e->GetIdentifier())->second
|
|
||||||
);
|
|
||||||
|
|
||||||
if (File::Exists(file_name)) {
|
|
||||||
filename = file_name;
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
QuestInterface* QuestParserCollection::GetQIByGlobalZoneQuest(std::string& filename)
|
|
||||||
{
|
|
||||||
if (!zone) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string file_name;
|
|
||||||
for (auto* e: _load_precedence) {
|
|
||||||
file_name = fmt::format(
|
|
||||||
"{}/{}/global_zone.{}",
|
|
||||||
path.GetQuestsPath(),
|
|
||||||
QUEST_GLOBAL_DIRECTORY,
|
|
||||||
_extensions.find(e->GetIdentifier())->second
|
|
||||||
);
|
|
||||||
|
|
||||||
if (File::Exists(file_name)) {
|
|
||||||
filename = file_name;
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QuestParserCollection::GetErrors(std::list<std::string>& quest_errors)
|
void QuestParserCollection::GetErrors(std::list<std::string>& quest_errors)
|
||||||
{
|
{
|
||||||
quest_errors.clear();
|
quest_errors.clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user