diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-05-18 13:32:34 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_ferreira_at_orange_fr_> | 2013-02-01 21:33:43 +0100 |
commit | 02602a6a7bb92fbe19b7a015f5c6764ab658c469 (patch) | |
tree | c7f53a585671036174b76f046e48e8f872846b50 /src/game-server/emotemanager.h | |
parent | 5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a (diff) | |
download | manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.gz manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.bz2 manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.xz manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.zip |
Added emote support.
Diffstat (limited to 'src/game-server/emotemanager.h')
-rw-r--r-- | src/game-server/emotemanager.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/game-server/emotemanager.h b/src/game-server/emotemanager.h new file mode 100644 index 00000000..42c71680 --- /dev/null +++ b/src/game-server/emotemanager.h @@ -0,0 +1,64 @@ +/* + * The Mana Server + * Copyright (C) 2011-2012 The Mana Developers + * + * This file is part of The Mana Server. + * + * The Mana Server is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana Server. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef EMOTEMANAGER_H +#define EMOTEMANAGER_H + +#include "utils/string.h" +#include "utils/xml.h" + +#include <vector> + +class EmoteManager +{ +public: + + EmoteManager(const std::string &emoteFile): + mEmoteFile(emoteFile) + { } + + ~EmoteManager() + { clear(); } + + /** + * Loads emote reference file. + */ + void initialize(); + + /** + * Tells whether the given id is a valid emote one. + */ + bool isIdAvailable(int id) const; + +private: + /** + * Clears up the emote list. + */ + void clear() + { mEmoteIds.clear(); } + + std::string mEmoteFile; + std::vector<int> mEmoteIds; +}; + +extern EmoteManager *emoteManager; + +#endif // EMOTEMANAGER_H |