diff options
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 |