diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_fr> | 2010-06-01 01:20:56 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_fr> | 2010-06-01 01:31:32 +0200 |
commit | 64776c1b4c6ccdd3e46897a59c201dd749de9dff (patch) | |
tree | 45ea4c97b4acc9d1dd9819408659aa1e5a3a336b /src/net | |
parent | 34e7725106500af8f4ed4f148e60005b9738c04a (diff) | |
download | mana-64776c1b4c6ccdd3e46897a59c201dd749de9dff.tar.gz mana-64776c1b4c6ccdd3e46897a59c201dd749de9dff.tar.bz2 mana-64776c1b4c6ccdd3e46897a59c201dd749de9dff.tar.xz mana-64776c1b4c6ccdd3e46897a59c201dd749de9dff.zip |
Made the MP bar be shown only if the protocol is using it.
Reviewed-by: Jaxad0127.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/gamehandler.h | 5 | ||||
-rw-r--r-- | src/net/manaserv/gamehandler.h | 6 | ||||
-rw-r--r-- | src/net/tmwa/gamehandler.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/net/gamehandler.h b/src/net/gamehandler.h index 774de16c..8d29a55b 100644 --- a/src/net/gamehandler.h +++ b/src/net/gamehandler.h @@ -49,6 +49,11 @@ class GameHandler virtual bool removeDeadBeings() const = 0; + /** + * Tells whether the protocol is using the MP statu bar + */ + virtual bool canUseMagicBar() const = 0; + virtual ~GameHandler() {} }; diff --git a/src/net/manaserv/gamehandler.h b/src/net/manaserv/gamehandler.h index dde1748f..912b308e 100644 --- a/src/net/manaserv/gamehandler.h +++ b/src/net/manaserv/gamehandler.h @@ -53,12 +53,16 @@ class GameHandler : public MessageHandler, public Net::GameHandler void quit() { quit(false); } void ping(int tick); - + bool removeDeadBeings() const { return false; } void clear(); void gameLoading(); + + /** The ManaServ protocol doesn't use the Mp Main status bar. */ + bool canUseMagicBar() const { return false; } + }; } // namespace ManaServ diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h index ca8d27e6..101e7972 100644 --- a/src/net/tmwa/gamehandler.h +++ b/src/net/tmwa/gamehandler.h @@ -60,6 +60,9 @@ class GameHandler : public MessageHandler, public Net::GameHandler void setMap(const std::string map); + /** The tmwa protocol is making use of the Mp Main status bar. */ + bool canUseMagicBar() const { return true; } + private: std::string mMap; int mCharID; /// < Saved for map-server switching |