summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 524256dd4..7f6c2e731 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1513,6 +1513,15 @@ bool ChatWindow::resortChatLog(std::string line,
localPetEmote(nick, static_cast<uint8_t>(
atoi(line.c_str())));
}
+ else if (line.find(": \302\202\302m") != std::string::npos)
+ {
+ const std::string nick = line.substr(0, idx2 - 1);
+ line = line.substr(idx2 + 6);
+ int x = 0;
+ int y = 0;
+ if (parse2Int(line, x, y))
+ localPetMove(nick, x, y);
+ }
// ignore other special message formats.
return false;
}
@@ -1670,6 +1679,22 @@ void ChatWindow::localPetEmote(const std::string &nick, const uint8_t emoteId)
}
}
+void ChatWindow::localPetMove(const std::string &nick,
+ const int x, const int y)
+{
+ Being *const being = actorManager->findBeingByName(
+ nick, ActorType::Player);
+ if (being)
+ {
+ Being *const pet = being->getFirstPet();
+ if (pet)
+ {
+ pet->setDestination(x, y);
+ pet->disablePetAi();
+ }
+ }
+}
+
void ChatWindow::initTradeFilter()
{
const std::string tradeListName = settings.serverConfigDir