From befcee0b12005706f29650cfbef425fc3b8a77b0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 6 Feb 2014 19:02:06 +0300 Subject: In crazy moves A add support for all emotes. --- src/resources/db/emotedb.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/resources/db/emotedb.cpp') 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(mEmoteInfos.size()); +} + +int EmoteDB::getIdByIndex(const int index) +{ + if (index < 0 || index >= static_cast(mEmoteInfos.size())) + return 0; + EmoteInfos::const_iterator it = mEmoteInfos.begin(); + for (int f = 0; f < index; f ++) + ++ it; + return (*it).first; +} -- cgit v1.2.3-60-g2f50