From b4b262d0d6f66b1d84ef76f6c977768d013db2f1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Dec 2014 18:53:31 +0300 Subject: Add garbage into pets chat commands to avoid broken antispam system in tmwa. --- src/net/tmwa/pethandler.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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(emoteId), mRandCounter), GENERAL_CHANNEL); + chatHandler->talk(strprintf("\302\202\302e%dz%d%g%d", + static_cast(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(type)), GENERAL_CHANNEL); + chatHandler->talk(strprintf("\302\202\302d%dg%d", + static_cast(type), tick_time), GENERAL_CHANNEL); } } // namespace TmwAthena -- cgit v1.2.3-70-g09d2