summaryrefslogtreecommitdiff
path: root/src/resources/db/emotedb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-06 19:02:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-06 19:02:06 +0300
commitbefcee0b12005706f29650cfbef425fc3b8a77b0 (patch)
tree494bf82ec509a80a534d895cffad07f50af7fea4 /src/resources/db/emotedb.cpp
parentf4ccfe30c324365123c50bb56cd4b8166bd1f494 (diff)
downloadplus-befcee0b12005706f29650cfbef425fc3b8a77b0.tar.gz
plus-befcee0b12005706f29650cfbef425fc3b8a77b0.tar.bz2
plus-befcee0b12005706f29650cfbef425fc3b8a77b0.tar.xz
plus-befcee0b12005706f29650cfbef425fc3b8a77b0.zip
In crazy moves A add support for all emotes.
Diffstat (limited to 'src/resources/db/emotedb.cpp')
-rw-r--r--src/resources/db/emotedb.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp
index 97ea95aa0..943628978 100644
--- a/src/resources/db/emotedb.cpp
+++ b/src/resources/db/emotedb.cpp
@@ -295,3 +295,18 @@ const int &EmoteDB::getLast()
{
return mLastEmote;
}
+
+int EmoteDB::size()
+{
+ return static_cast<signed int>(mEmoteInfos.size());
+}
+
+int EmoteDB::getIdByIndex(const int index)
+{
+ if (index < 0 || index >= static_cast<signed int>(mEmoteInfos.size()))
+ return 0;
+ EmoteInfos::const_iterator it = mEmoteInfos.begin();
+ for (int f = 0; f < index; f ++)
+ ++ it;
+ return (*it).first;
+}