From 87abf44c507a7c9e9f6cf425bcf048c0f5aa4a16 Mon Sep 17 00:00:00 2001 From: Marcos <66353315+marcosvf132@users.noreply.github.com> Date: Wed, 26 Aug 2020 19:56:57 -0300 Subject: [PATCH 1/2] Update protocolgame.cpp --- src/protocolgame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index cc7bcf9a77..515151fa22 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -3638,9 +3638,14 @@ void ProtocolGame::AddCreature(NetworkMessage& msg, const Creature* creature, bo } } - if (creatureType == CREATURETYPE_PLAYER) { - msg.addByte(0); - } +if (creatureType == CREATURETYPE_PLAYER) { + const Player* otherCreature = creature->getPlayer(); + if (otherCreature) { + msg.addByte(otherCreature->getVocation()->getClientId()); + } else { + msg.addByte(0); + } + } msg.addByte(creature->getSpeechBubble()); msg.addByte(0xFF); // MARK_UNMARKED From 435c0280d5d6f3fd4b762da62e06d8ab79d1b700 Mon Sep 17 00:00:00 2001 From: Marcos <66353315+marcosvf132@users.noreply.github.com> Date: Wed, 26 Aug 2020 20:37:45 -0300 Subject: [PATCH 2/2] Fix tab --- src/protocolgame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index 515151fa22..0638e942f1 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -3638,7 +3638,7 @@ void ProtocolGame::AddCreature(NetworkMessage& msg, const Creature* creature, bo } } -if (creatureType == CREATURETYPE_PLAYER) { + if (creatureType == CREATURETYPE_PLAYER) { const Player* otherCreature = creature->getPlayer(); if (otherCreature) { msg.addByte(otherCreature->getVocation()->getClientId());