Crossfire Server, Trunk
|
#include <Treasures.h>
Protected Member Functions | |
virtual void | replace (treasurelist *existing, treasurelist *update) override |
Protected Member Functions inherited from AssetsCollection< treasurelist > | |
virtual void | added (treasurelist *) |
Additional Inherited Members | |
Public Member Functions inherited from AssetsCollection< treasurelist > | |
void | clear () |
size_t | count () const |
treasurelist * | define (const std::string &name, treasurelist *asset) |
void | each (std::function< void(treasurelist *)> op) |
treasurelist * | find (const std::string &name) |
treasurelist * | first (std::function< bool(const treasurelist *)> op) |
treasurelist * | get (const std::string &name) |
std::vector< std::string > | keys () const |
treasurelist * | next (treasurelist *current) |
const std::set< std::string > & | undefined () const |
virtual | ~AssetsCollection () |
Protected Attributes inherited from AssetsCollection< treasurelist > | |
std::unordered_map< std::string, treasurelist * > | m_assets |
std::set< std::string > | m_undefined |
Definition at line 21 of file Treasures.h.
|
overrideprotectedvirtual |
Replace an asset by an updated version.
existing | asset to be updated. |
update | new version of the asset, which must be destroyed. |
Implements AssetsCollection< treasurelist >.
Definition at line 31 of file Treasures.cpp.
References asset_destroy(), treasurelist::items, treasurelist::total_chance, and treasure_free().