From f4a53f7ee6fb5482f8193353c35be54b40533d6f Mon Sep 17 00:00:00 2001 From: Lars Müller <34514239+appgurueu@users.noreply.github.com> Date: Sat, 11 Jun 2022 20:00:40 +0200 Subject: No damage effects on hp_max change (#11846) --- src/network/clientpackethandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/network') diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 78ace6a81..5fee908a3 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -570,6 +570,10 @@ void Client::handleCommand_HP(NetworkPacket *pkt) u16 hp; *pkt >> hp; + bool damage_effect = true; + try { + *pkt >> damage_effect; + } catch (PacketError &e) {}; player->hp = hp; @@ -581,6 +585,7 @@ void Client::handleCommand_HP(NetworkPacket *pkt) ClientEvent *event = new ClientEvent(); event->type = CE_PLAYER_DAMAGE; event->player_damage.amount = oldhp - hp; + event->player_damage.effect = damage_effect; m_client_event_queue.push(event); } } -- cgit v1.2.3