Admin - Dataloader updates

-Npc Lib added
-Admin Dataloader updated to load NPC names into a cached array.
-Spinner Updated to a loading button.
This commit is contained in:
Lee
2021-03-09 23:38:23 +00:00
parent 7ce005341e
commit 31f0050f4e
6 changed files with 81 additions and 6 deletions

View File

@@ -63,6 +63,16 @@ class DataLoader
self::$startTime = microtime(true);
require LIBS . 'npc.php';
if(NPCs::loadFromXML()) {
success(self::$locale['step_database_loaded_npcs'] . self::getLoadedTime());
}
else {
error(self::$locale['step_database_error_npcs']);
}
self::$startTime = microtime(true);
require LIBS . 'spells.php';
if(Spells::loadFromXML()) {
success(self::$locale['step_database_loaded_spells'] . self::getLoadedTime());
@@ -100,4 +110,4 @@ class DataLoader
$endTime = round(microtime(true) - self::$startTime, 3);
return ' (' . str_replace('$TIME$', $endTime, self::$locale['loaded_in_ms']) . ')';
}
}
}