summaryrefslogtreecommitdiff
path: root/src/game-server/being.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-05-18 13:32:34 +0200
committerYohann Ferreira <yohann_ferreira_at_orange_fr_>2013-02-01 21:33:43 +0100
commit02602a6a7bb92fbe19b7a015f5c6764ab658c469 (patch)
treec7f53a585671036174b76f046e48e8f872846b50 /src/game-server/being.cpp
parent5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a (diff)
downloadmanaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.gz
manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.bz2
manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.tar.xz
manaserv-02602a6a7bb92fbe19b7a015f5c6764ab658c469.zip
Added emote support.
Diffstat (limited to 'src/game-server/being.cpp')
-rw-r--r--src/game-server/being.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp
index 0e240870..d7df2df9 100644
--- a/src/game-server/being.cpp
+++ b/src/game-server/being.cpp
@@ -41,7 +41,8 @@ Being::Being(EntityType type):
mTarget(NULL),
mGender(GENDER_UNSPECIFIED),
mCurrentAttack(0),
- mDirection(DOWN)
+ mDirection(DOWN),
+ mEmoteId(0)
{
const AttributeManager::AttributeScope &attr = attributeManager->getAttributeScope(BeingScope);
LOG_DEBUG("Being creation: initialisation of " << attr.size() << " attributes.");
@@ -73,6 +74,14 @@ Being::Being(EntityType type):
#endif
}
+void Being::triggerEmote(int id)
+{
+ mEmoteId = id;
+
+ if (id > -1)
+ raiseUpdateFlags(UPDATEFLAG_EMOTE);
+}
+
int Being::damage(Actor * /* source */, const Damage &damage)
{
if (mAction == DEAD)