Crossfire Server, Trunk
R21670
|
#include <CREMapInformationManager.h>
Signals | |
void | browsingMap (const QString &path) |
void | finished () |
Public Member Functions | |
QList< CREMapInformation * > | allMaps () |
bool | browseFinished () const |
void | cancel () |
void | clearCache () |
CREMapInformationManager (QObject *parent, MessageManager *messageManager, QuestManager *questManager, ScriptFileManager *scriptManager) | |
QList< CREMapInformation * > | getArchetypeUse (const archetype *arch) |
QList< CREMapInformation * > | getMapsForRegion (const QString ®ion) |
QList< CRERandomMap * > | randomMaps () |
void | start () |
virtual | ~CREMapInformationManager () |
Protected Member Functions | |
void | addArchetypeUse (const QString &name, CREMapInformation *map) |
void | browseMaps () |
void | checkEvent (const object *item, CREMapInformation *map, const object *env) |
void | checkInventory (const object *item, CREMapInformation *information, const object *env) |
CREMapInformation * | getOrCreateMapInformation (const QString &path) |
void | loadCache () |
void | process (const QString &path) |
void | storeCache () |
Protected Attributes | |
QMultiHash< QString, CREMapInformation * > | myArchetypeUse |
bool | myCancelled |
int | myCurrentMap |
QHash< QString, qint64 > | myExperience |
QHash< QString, CREMapInformation * > | myInformation |
QMutex | myLock |
MessageManager * | myMessageManager |
QuestManager * | myQuestManager |
ScriptFileManager * | myScriptManager |
QStringList | myToProcess |
QFuture< void > | myWorker |
Definition at line 16 of file CREMapInformationManager.h.
CREMapInformationManager::CREMapInformationManager | ( | QObject * | parent, |
MessageManager * | messageManager, | ||
QuestManager * | questManager, | ||
ScriptFileManager * | scriptManager | ||
) |
Definition at line 55 of file CREMapInformationManager.cpp.
References myMessageManager, myQuestManager, and myScriptManager.
|
virtual |
Definition at line 65 of file CREMapInformationManager.cpp.
References myInformation.
|
protected |
Definition at line 643 of file CREMapInformationManager.cpp.
References myArchetypeUse, and myLock.
Referenced by checkInventory(), loadCache(), and process().
QList< CREMapInformation * > CREMapInformationManager::allMaps | ( | ) |
Definition at line 350 of file CREMapInformationManager.cpp.
References myInformation, and myLock.
Referenced by CREMainWindow::onReportShops().
bool CREMapInformationManager::browseFinished | ( | ) | const |
Definition at line 70 of file CREMapInformationManager.cpp.
References myWorker.
|
protected |
Definition at line 291 of file CREMapInformationManager.cpp.
References archt::clone, create_pathname(), finished(), first_archetype, first_map_ext_path, first_map_path, loadCache(), MAX_BUF, myArchetypeUse, myCancelled, myCurrentMap, myExperience, myInformation, myToProcess, archt::name, archt::next, PLAYER, process(), snprintf, storeCache(), and obj::type.
Referenced by start().
|
signal |
void CREMapInformationManager::cancel | ( | ) |
Definition at line 344 of file CREMapInformationManager.cpp.
References myCancelled, and myWorker.
Referenced by CREMainWindow::closeEvent().
|
protected |
Definition at line 650 of file CREMapInformationManager.cpp.
References ScriptFile::addHook(), CREMapInformation::addMessage(), CREMapInformation::addQuest(), EVENT_CONNECTOR, EVENT_SAY, eventNames, QuestManager::findByCode(), MessageManager::findMessage(), ScriptFileManager::getFile(), Quest::maps(), MessageFile::maps(), myMessageManager, myQuestManager, myScriptManager, obj::name, NR_EVENTS, CREMapInformation::path, obj::slaying, obj::subtype, obj::title, obj::type, obj::x, and obj::y.
Referenced by checkInventory().
|
protected |
Definition at line 83 of file CREMapInformationManager.cpp.
References CREMapInformation::addArchetype(), addArchetypeUse(), checkEvent(), find_archetype(), FOR_INV_FINISH, FOR_INV_PREPARE, and archt::name.
Referenced by process().
void CREMapInformationManager::clearCache | ( | ) |
Definition at line 716 of file CREMapInformationManager.cpp.
References CRESettings::mapCacheDirectory(), myWorker, and settings.
Referenced by CREMainWindow::onClearCache().
|
signal |
QList< CREMapInformation * > CREMapInformationManager::getArchetypeUse | ( | const archetype * | arch | ) |
Definition at line 356 of file CREMapInformationManager.cpp.
References myArchetypeUse, myLock, and archt::name.
Referenced by CREArchetypePanel::setItem().
QList< CREMapInformation * > CREMapInformationManager::getMapsForRegion | ( | const QString & | region | ) |
Definition at line 703 of file CREMapInformationManager.cpp.
References myInformation, and CREMapInformation::region().
Referenced by CREResourcesWindow::fillMaps().
|
protected |
Definition at line 633 of file CREMapInformationManager.cpp.
References myInformation.
Referenced by process().
|
protected |
Definition at line 362 of file CREMapInformationManager.cpp.
References CREMapInformation::addAccessedFrom(), CREMapInformation::addArchetype(), addArchetypeUse(), CREMapInformation::addExitTo(), ScriptFile::addHook(), CREMapInformation::addMessage(), CREMapInformation::addQuest(), CREMapInformation::addRandomMap(), QuestManager::findByCode(), MessageManager::findMessage(), ScriptFileManager::getFile(), Quest::maps(), MessageFile::maps(), myInformation, myMessageManager, myQuestManager, myScriptManager, CREMapInformation::setBackgroundMusic(), CREMapInformation::setExperience(), CREMapInformation::setLevel(), CREMapInformation::setMapTime(), CREMapInformation::setName(), CREMapInformation::setPath(), CREMapInformation::setRegion(), CREMapInformation::setShopGreed(), CREMapInformation::setShopMax(), CREMapInformation::setShopMin(), CREMapInformation::setShopRace(), settings, and CREMapInformation::shopItems().
Referenced by browseMaps().
|
protected |
Definition at line 97 of file CREMapInformationManager.cpp.
References add_map(), add_region_link(), CREMapInformation::addAccessedFrom(), CREMapInformation::addArchetype(), addArchetypeUse(), CREMapInformation::addExitTo(), ScriptFile::addHook(), CREMapInformation::addRandomMap(), mapdef::background_music, browsingMap(), checkInventory(), create_pathname(), delete_map(), mapdef::difficulty, do_regions_link, EVENT_CONNECTOR, eventNames, EXIT, EXIT_PATH, CREMapInformation::exitsTo(), find_archetype(), FLAG_MONSTER, FOR_MAP_FINISH, FOR_MAP_PREPARE, get_map_info(), ScriptFileManager::getFile(), getOrCreateMapInformation(), mapdef::in_memory, shopitem::index, MAP_HEIGHT, MAP_IN_MEMORY, MAP_WIDTH, CREMapInformation::mapTime(), MAX_BUF, myCancelled, myExperience, myLock, myScriptManager, myToProcess, CREMapInformation::name, regiondef::name, shopitem::name, mapdef::name, archt::name, NR_EVENTS, mapdef::path, path_combine_and_normalize(), PLAYER_CHANGER, QUERY_FLAG, ready_map_name(), mapdef::region, ScriptFileManager::removeMap(), mapdef::reset_time, CREMapInformation::setBackgroundMusic(), CREMapInformation::setExperience(), CREMapInformation::setLevel(), CREMapInformation::setMapTime(), CREMapInformation::setName(), CREMapInformation::setRegion(), CREMapInformation::setShopGreed(), CREMapInformation::setShopMax(), CREMapInformation::setShopMin(), CREMapInformation::setShopRace(), mapdef::shopgreed, CREMapInformation::shopItems(), mapdef::shopitems, mapdef::shopmax, mapdef::shopmin, mapdef::shoprace, start(), shopitem::strength, TELEPORTER, and mapdef::tile_path.
Referenced by browseMaps().
QList< CRERandomMap * > CREMapInformationManager::randomMaps | ( | ) |
Definition at line 723 of file CREMapInformationManager.cpp.
References myInformation, and CREMapInformation::randomMaps().
Referenced by CREResourcesWindow::fillRandomMaps().
void CREMapInformationManager::start | ( | ) |
Definition at line 75 of file CREMapInformationManager.cpp.
References browseMaps(), and myWorker.
Referenced by CREMainWindow::CREMainWindow(), and process().
|
protected |
Definition at line 521 of file CREMapInformationManager.cpp.
References CREMapInformation::accessedFrom(), CREMapInformation::archetypes(), CREMapInformation::backgroundMusic(), HookInformation::eventName(), CREMapInformation::exitsTo(), CREMapInformation::experience, ScriptFile::hooks(), HookInformation::itemName(), CREMapInformation::level, HookInformation::map(), CRESettings::mapCacheDirectory(), CREMapInformation::mapTime(), CREMapInformation::messages(), myInformation, myScriptManager, CREMapInformation::name, CRERandomMap::parameters(), ScriptFile::path(), CREMapInformation::path, HookInformation::pluginName(), CREMapInformation::quests(), CREMapInformation::randomMaps(), CREMapInformation::region(), ScriptFileManager::scriptsForMap(), settings, CREMapInformation::shopGreed(), CREMapInformation::shopItems(), CREMapInformation::shopMax(), CREMapInformation::shopMin(), CREMapInformation::shopRace(), stringbuffer_finish(), write_map_parameters_to_string(), HookInformation::x(), CRERandomMap::x(), HookInformation::y(), and CRERandomMap::y().
Referenced by browseMaps().
|
protected |
Definition at line 43 of file CREMapInformationManager.h.
Referenced by addArchetypeUse(), browseMaps(), and getArchetypeUse().
|
protected |
Definition at line 47 of file CREMapInformationManager.h.
Referenced by browseMaps(), cancel(), and process().
|
protected |
Definition at line 45 of file CREMapInformationManager.h.
Referenced by browseMaps().
|
protected |
Definition at line 49 of file CREMapInformationManager.h.
Referenced by browseMaps(), and process().
|
protected |
Definition at line 42 of file CREMapInformationManager.h.
Referenced by allMaps(), browseMaps(), getMapsForRegion(), getOrCreateMapInformation(), loadCache(), randomMaps(), storeCache(), and ~CREMapInformationManager().
|
protected |
Definition at line 48 of file CREMapInformationManager.h.
Referenced by addArchetypeUse(), allMaps(), getArchetypeUse(), and process().
|
protected |
Definition at line 39 of file CREMapInformationManager.h.
Referenced by checkEvent(), CREMapInformationManager(), and loadCache().
|
protected |
Definition at line 40 of file CREMapInformationManager.h.
Referenced by checkEvent(), CREMapInformationManager(), and loadCache().
|
protected |
Definition at line 41 of file CREMapInformationManager.h.
Referenced by checkEvent(), CREMapInformationManager(), loadCache(), process(), and storeCache().
|
protected |
Definition at line 44 of file CREMapInformationManager.h.
Referenced by browseMaps(), and process().
|
protected |
Definition at line 46 of file CREMapInformationManager.h.
Referenced by browseFinished(), cancel(), clearCache(), and start().