aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server/Packets
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2020-04-14 15:58:11 +0400
committerGitHub <noreply@github.com>2020-04-14 13:58:11 +0200
commit37ff15489b844d5ded34fc08b22704157a31e093 (patch)
tree7d3d177473d7abf8bb53212d64bc0c48c85e4410 /src/server/game/Server/Packets
parent400e2913179e0ff47518558f89b687161031967a (diff)
Core/PacketIO: updated SMSG_ENVIRONMENTAL_DAMAGE_LOG (#24443)
(cherry picked from commit 7b446a28ccc8fe5a786c65c1f293e2df7f8da60c) # Conflicts: # src/server/game/Entities/Player/Player.cpp # src/server/game/Server/Packets/CombatLogPackets.cpp # src/server/game/Server/Packets/CombatLogPackets.h # src/server/game/Server/Protocol/Opcodes.cpp # src/server/game/Server/Protocol/Opcodes.h Co-authored-by: MitchesD <majklprofik@seznam.cz>
Diffstat (limited to 'src/server/game/Server/Packets')
-rw-r--r--src/server/game/Server/Packets/AllPackets.h1
-rw-r--r--src/server/game/Server/Packets/CombatLogPackets.cpp29
-rw-r--r--src/server/game/Server/Packets/CombatLogPackets.h44
3 files changed, 74 insertions, 0 deletions
diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h
index 0a5e574a8c2..3fdad4e577f 100644
--- a/src/server/game/Server/Packets/AllPackets.h
+++ b/src/server/game/Server/Packets/AllPackets.h
@@ -20,6 +20,7 @@
#include "CharacterPackets.h"
#include "ChatPackets.h"
+#include "CombatLogPackets.h"
#include "CombatPackets.h"
#include "GuildPackets.h"
#include "NPCPackets.h"
diff --git a/src/server/game/Server/Packets/CombatLogPackets.cpp b/src/server/game/Server/Packets/CombatLogPackets.cpp
new file mode 100644
index 00000000000..a138d4aa251
--- /dev/null
+++ b/src/server/game/Server/Packets/CombatLogPackets.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CombatLogPackets.h"
+
+WorldPacket const* WorldPackets::CombatLog::EnvironmentalDamageLog::Write()
+{
+ _worldPacket << Victim;
+ _worldPacket << uint8(Type);
+ _worldPacket << uint32(Amount);
+ _worldPacket << uint32(Resisted);
+ _worldPacket << uint32(Absorbed);
+
+ return &_worldPacket;
+}
diff --git a/src/server/game/Server/Packets/CombatLogPackets.h b/src/server/game/Server/Packets/CombatLogPackets.h
new file mode 100644
index 00000000000..e08745d5277
--- /dev/null
+++ b/src/server/game/Server/Packets/CombatLogPackets.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CombatLogPackets_h__
+#define CombatLogPackets_h__
+
+#include "Packet.h"
+#include "Player.h"
+
+namespace WorldPackets
+{
+ namespace CombatLog
+ {
+ class EnvironmentalDamageLog final : public ServerPacket
+ {
+ public:
+ EnvironmentalDamageLog() : ServerPacket(SMSG_ENVIRONMENTAL_DAMAGE_LOG, 21) { }
+
+ WorldPacket const* Write() override;
+
+ ObjectGuid Victim;
+ EnviromentalDamage Type = DAMAGE_EXHAUSTED;
+ uint32 Amount = 0;
+ uint32 Resisted = 0;
+ uint32 Absorbed = 0;
+ };
+ }
+}
+
+#endif // CombatLogPackets_h__