summaryrefslogtreecommitdiff
path: root/src/net/tmwa/pethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-28 18:53:31 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-28 18:53:31 +0300
commitb4b262d0d6f66b1d84ef76f6c977768d013db2f1 (patch)
tree32793f4348f109262c76b339450580165d97b5cc /src/net/tmwa/pethandler.cpp
parent4ab5dab0c1d79c4c9fbf7c594bdb915b63a950f7 (diff)
downloadplus-b4b262d0d6f66b1d84ef76f6c977768d013db2f1.tar.gz
plus-b4b262d0d6f66b1d84ef76f6c977768d013db2f1.tar.bz2
plus-b4b262d0d6f66b1d84ef76f6c977768d013db2f1.tar.xz
plus-b4b262d0d6f66b1d84ef76f6c977768d013db2f1.zip
Add garbage into pets chat commands to avoid broken antispam system in tmwa.
Diffstat (limited to 'src/net/tmwa/pethandler.cpp')
-rw-r--r--src/net/tmwa/pethandler.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp
index 982f3a861..917f3a162 100644
--- a/src/net/tmwa/pethandler.cpp
+++ b/src/net/tmwa/pethandler.cpp
@@ -25,6 +25,7 @@
#include "net/chathandler.h"
#include "utils/stringutils.h"
+#include "utils/timer.h"
#include "debug.h"
@@ -54,7 +55,8 @@ void PetHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
void PetHandler::move(const int petId A_UNUSED,
const int x, const int y) const
{
- chatHandler->talk(strprintf("\302\202\302m%d %d", x, y), GENERAL_CHANNEL);
+ chatHandler->talk(strprintf("\302\202\302m%d %dg%d",
+ x, y, tick_time), GENERAL_CHANNEL);
}
void PetHandler::spawn(const Being *const being A_UNUSED,
@@ -69,8 +71,8 @@ void PetHandler::emote(const uint8_t emoteId, const int petId A_UNUSED)
if (mRandCounter > 10000)
mRandCounter = 1000;
- chatHandler->talk(strprintf("\302\202\302e%dz%d",
- static_cast<int>(emoteId), mRandCounter), GENERAL_CHANNEL);
+ chatHandler->talk(strprintf("\302\202\302e%dz%d%g%d",
+ static_cast<int>(emoteId), mRandCounter, tick_time), GENERAL_CHANNEL);
}
void PetHandler::catchPet(const Being *const being A_UNUSED) const
@@ -107,8 +109,8 @@ void PetHandler::unequip() const
void PetHandler::setDirection(const BeingDirection::Type type) const
{
- chatHandler->talk(strprintf("\302\202\302d%d",
- static_cast<int>(type)), GENERAL_CHANNEL);
+ chatHandler->talk(strprintf("\302\202\302d%dg%d",
+ static_cast<int>(type), tick_time), GENERAL_CHANNEL);
}
} // namespace TmwAthena