summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 84b18774c..8a2f86421 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -62,6 +62,7 @@
#include "net/chathandler.h"
#include "net/inventoryhandler.h"
#include "net/net.h"
+#include "net/pethandler.h"
#include "net/playerhandler.h"
#include "resources/iteminfo.h"
@@ -2983,26 +2984,32 @@ void LocalPlayer::crazyMoveA()
pickUpItems();
}
// emote
- else if (mMoveProgram[mCrazyMoveState] == 'e')
+ else if (mMoveProgram[mCrazyMoveState] == 'e'
+ || mMoveProgram[mCrazyMoveState] == 'E')
{
mCrazyMoveState ++;
const signed char emo = mMoveProgram[mCrazyMoveState];
+ unsigned char emoteId = 0;
if (emo == '?')
{
srand(tick_time);
- emote(static_cast<unsigned char>(1 + (rand() % EmoteDB::size())));
+ emoteId = static_cast<unsigned char>(
+ 1 + (rand() % EmoteDB::size()));
}
else
{
- unsigned char emoteId = 0;
if (emo >= '0' && emo <= '9')
emoteId = static_cast<unsigned char>(emo - '0' + 1);
else if (emo >= 'a' && emo <= 'z')
emoteId = static_cast<unsigned char>(emo - 'a' + 11);
else if (emo >= 'A' && emo <= 'Z')
emoteId = static_cast<unsigned char>(emo - 'A' + 37);
- emote(emoteId);
+
}
+ if (mMoveProgram[mCrazyMoveState] == 'e')
+ emote(emoteId);
+ else
+ Net::getPetHandler()->emote(emoteId, 0);
mCrazyMoveState ++;
}