diff options
| author | OmniTroid <davidskoland@gmail.com> | 2017-03-26 01:00:48 +0100 |
|---|---|---|
| committer | OmniTroid <davidskoland@gmail.com> | 2017-03-26 01:00:48 +0100 |
| commit | 1bc1ec6d4005ab46314c20c680aca4157d5c2244 (patch) | |
| tree | 642f014be7343b0324f46a31a0b70327bbf4a670 | |
| parent | 50f61bbd5c60622c75bfc6c82fdb3c672659acac (diff) | |
added get_emote_mod function
| -rw-r--r-- | aoapplication.h | 1 | ||||
| -rw-r--r-- | text_file_functions.cpp | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/aoapplication.h b/aoapplication.h index 9fa9bb2a..0dc15e92 100644 --- a/aoapplication.h +++ b/aoapplication.h @@ -127,6 +127,7 @@ public: QString get_sfx_name(QString p_char, int p_emote); int get_sfx_delay(QString p_char, int p_emote); int get_emote_mod(QString p_char, int p_emote); + int get_desk_mod(QString p_char, int p_emote); QString get_gender(QString p_char); private: diff --git a/text_file_functions.cpp b/text_file_functions.cpp index 82e76a8f..5d809c30 100644 --- a/text_file_functions.cpp +++ b/text_file_functions.cpp @@ -452,6 +452,19 @@ int AOApplication::get_emote_mod(QString p_char, int p_emote) else return result_contents.at(3).toInt(); } +int AOApplication::get_desk_mod(QString p_char, int p_emote) +{ + QString f_result = read_char_ini(p_char, QString::number(p_emote + 1), "[Emotions]", "[SoundN]"); + + QStringList result_contents = f_result.split("#"); + + if (result_contents.size() < 5) + { + return -1; + } + else return result_contents.at(4).toInt(); +} + QString AOApplication::get_sfx_name(QString p_char, int p_emote) { QString f_result = read_char_ini(p_char, QString::number(p_emote + 1), "[SoundN]", "[SoundT]"); |
