Crossfire Server, Trunk
Treasures Class Reference

#include <Treasures.h>

+ Inheritance diagram for Treasures:
+ Collaboration diagram for Treasures:

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
 
treasurelistdefine (const std::string &name, treasurelist *asset)
 
void each (std::function< void(treasurelist *)> op)
 
treasurelistfind (const std::string &name)
 
treasurelistfirst (std::function< bool(const treasurelist *)> op)
 
treasurelistget (const std::string &name)
 
std::vector< std::string > keys () const
 
treasurelistnext (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
 

Detailed Description

Definition at line 21 of file Treasures.h.

Member Function Documentation

◆ replace()

void Treasures::replace ( treasurelist existing,
treasurelist update 
)
overrideprotectedvirtual

Replace an asset by an updated version.

Parameters
existingasset to be updated.
updatenew 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().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: