From 8f393ff70e60172c632efc81694433568df2862b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 25 Dec 2014 15:58:24 +0000 Subject: Added a core::Level type, added a level attribute to core::Entity and core::Info, updated core::Player to use the new type. --- src/core/info.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/info.cc') diff --git a/src/core/info.cc b/src/core/info.cc index ad630a9..3d1b6cc 100644 --- a/src/core/info.cc +++ b/src/core/info.cc @@ -77,9 +77,10 @@ Info::Info(const InfoType *type, const char *label) : Label(label) info_id_counter++; info_id = info_id_counter; info_type = type; - info_registry.push_back(this); + info_registry.push_back(this); info_timestamp = 0; + info_level = 1; info_price = 0; info_volume = 0; } @@ -92,6 +93,7 @@ Info::Info(const unsigned int id) info_registry.push_back(this); info_timestamp = 1; + info_level = 1; info_price = 0; info_volume = 0; @@ -127,6 +129,11 @@ void Info::set_modelname(const char *modelname) info_modelname.assign(modelname); } +void Info::set_level(const Level level) +{ + info_level = level; +} + void Info::set_price(const long price) { info_price = price; -- cgit v1.2.3