summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/being.cpp5
-rw-r--r--src/resources/db/emotedb.cpp2
-rw-r--r--src/resources/emoteinfo.h4
3 files changed, 10 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 4e6c603d3..f85460c79 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -3072,6 +3072,11 @@ void Being::setEmote(const uint8_t emotion, const int emote_time)
else
mEmotionTime = emote_time;
}
+ const int effectId = info->effectId;
+ if (effectId >= 0)
+ {
+ effectManager->trigger(effectId, this);
+ }
}
}
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp
index 696d5a88a..a27547db0 100644
--- a/src/resources/db/emotedb.cpp
+++ b/src/resources/db/emotedb.cpp
@@ -109,6 +109,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName)
else
currentInfo = new EmoteInfo;
currentInfo->time = XML::getProperty(emoteNode, "time", 500);
+ currentInfo->effectId = XML::getProperty(emoteNode, "effect", -1);
for_each_xml_child_node(spriteNode, emoteNode)
{
@@ -182,6 +183,7 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName)
if (!currentInfo)
currentInfo = new EmoteInfo;
currentInfo->time = XML::getProperty(emoteNode, "time", 500);
+ currentInfo->effectId = XML::getProperty(emoteNode, "effect", -1);
for_each_xml_child_node(spriteNode, emoteNode)
{
diff --git a/src/resources/emoteinfo.h b/src/resources/emoteinfo.h
index 88902d0b9..44cf736a3 100644
--- a/src/resources/emoteinfo.h
+++ b/src/resources/emoteinfo.h
@@ -35,7 +35,8 @@ struct EmoteInfo final
EmoteInfo() :
sprites(),
particles(),
- time(400)
+ time(400),
+ effectId(-1)
{ }
A_DELETE_COPY(EmoteInfo)
@@ -43,6 +44,7 @@ struct EmoteInfo final
std::list<EmoteSprite*> sprites;
StringVect particles;
int time;
+ int effectId;
};
#endif // RESOURCES_EMOTEINFO_H