Crossfire Server, Trunk
|
#include <TreasureLoader.h>
Public Member Functions | |
virtual void | load (BufferReader *reader, const std::string &filename) override |
TreasureLoader (Treasures *treasures, Archetypes *archetypes, AssetsTracker *tracker) | |
virtual bool | willLoad (const std::string &filename) override |
Public Member Functions inherited from AssetLoader | |
virtual | ~AssetLoader () |
Private Member Functions | |
treasure * | loadTreasure (BufferReader *reader, const std::string &filename) |
Private Attributes | |
Archetypes * | m_archetypes |
AssetsTracker * | m_tracker |
Treasures * | m_treasures |
Definition at line 25 of file TreasureLoader.h.
TreasureLoader::TreasureLoader | ( | Treasures * | treasures, |
Archetypes * | archetypes, | ||
AssetsTracker * | tracker | ||
) |
Definition at line 23 of file TreasureLoader.cpp.
|
overridevirtual |
Load all treasures from a buffer.
reader | where to read from. |
filename | full path of the file for logging purposes. |
Implements AssetLoader.
Definition at line 111 of file TreasureLoader.cpp.
References add_string(), AssetsTracker::assetDefined(), buf, bufferreader_current_line(), bufferreader_next_line(), AssetsCollection< T, Key >::define(), npc_dialog::filename, treasurelist::items, llevError, loadTreasure(), LOG(), m_tracker, m_treasures, MAX_BUF, give::name, treasurelist::name, Floor::t, and treasurelist::total_chance.
|
inlineoverridevirtual |
Whether this instance will process or not the specified file.
filename | full file path. |
Implements AssetLoader.
Definition at line 29 of file TreasureLoader.h.
References Utils::endsWith(), and npc_dialog::filename.
|
private |
Definition at line 37 of file TreasureLoader.h.
Referenced by loadTreasure().
|
private |
Definition at line 38 of file TreasureLoader.h.
Referenced by load().
|
private |
Definition at line 36 of file TreasureLoader.h.
Referenced by load().