diff options
| author | Stijn Buys <ingar@osirion.org> | 2013-11-10 17:13:41 +0000 | 
|---|---|---|
| committer | Stijn Buys <ingar@osirion.org> | 2013-11-10 17:13:41 +0000 | 
| commit | 5f0958c121a246d445507313984358ff8a6df3fa (patch) | |
| tree | 34f0b53f0e7de9bee09ad8bcafa4228654365ae5 /src/core/reputation.h | |
| parent | 82f0ac05f5da2d89c4a544ca22ff47e116e6dd97 (diff) | |
Adjust reputation on NPC kills,
refresh reputation window if required.
Diffstat (limited to 'src/core/reputation.h')
| -rw-r--r-- | src/core/reputation.h | 24 | 
1 files changed, 20 insertions, 4 deletions
| diff --git a/src/core/reputation.h b/src/core/reputation.h index d20a210..af6b426 100644 --- a/src/core/reputation.h +++ b/src/core/reputation.h @@ -87,15 +87,24 @@ public:  	void set_reputation(const Info *faction, const float reputation); -	inline void set_dirty(const bool dirty = true) -	{ -		reputation_dirty = dirty; -	} +	void set_dirty(const bool dirty = true); +	 +	void set_timestamp(const unsigned long timestamp);  	void clear();  	void assign(const Reputation &other); +	inline FactionReps::const_iterator factionreps_begin() const +	{ +		return reputation_factionreps.begin(); +	} +	 +	inline FactionReps::const_iterator factionreps_end() const +	{ +		return reputation_factionreps.end(); +	} +	  	inline FactionReps & factionreps()  	{  		return reputation_factionreps; @@ -106,6 +115,11 @@ public:  		return reputation_dirty;  	} +	inline const unsigned long timestamp() const +	{ +		return reputation_timestamp; +	} +	  	/* ---- deserializers -------------------------------------- */  	/// receive a server-to-client update from a stream @@ -120,6 +134,8 @@ private:  	FactionReps		reputation_factionreps;  	bool			reputation_dirty; +	 +	unsigned long		reputation_timestamp;  };  } // namespace core | 
