summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index ca5d7fd1a..8413916fe 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2666,11 +2666,21 @@ void Being::setGM(const bool gm)
void Being::talkTo() const
{
+ if (!npcHandler)
+ return;
+
if (!PacketLimiter::limitPackets(PacketType::PACKET_NPC_TALK))
+ {
+ // using workaround...
+ if (playerHandler &&
+ PacketLimiter::limitPackets(PacketType::PACKET_ATTACK))
+ {
+ playerHandler->attack(mId, Keep_false);
+ }
return;
+ }
- if (npcHandler)
- npcHandler->talk(mId);
+ npcHandler->talk(mId);
}
void Being::draw(Graphics *const graphics,