From b86bf40f617a480f8e78bbde2e9884dd9edd2ebe Mon Sep 17 00:00:00 2001 From: Intel Date: Wed, 19 Nov 2014 00:30:31 +0200 Subject: Core/Packets: Added the following packets: CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY SMSG_QUESTGIVER_STATUS_MULTIPLE CMSG_QUESTGIVER_STATUS_QUERY SMSG_QUESTGIVER_STATUS SMSG_AI_REACTION SMSG_ATTACKERSTATEUPDATE SMSG_ATTACKSTART SMSG_ATTACKSTOP SMSG_THREAT_UPDATE SMSG_HIGHEST_THREAT_UPDATE SMSG_SET_PROFICIENCY --- src/server/game/Entities/Creature/Creature.cpp | 9 +++++---- src/server/game/Entities/Creature/GossipDef.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/server/game/Entities/Creature') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 7fb3822c888..3765c54b42a 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -51,6 +51,7 @@ #include "WaypointMovementGenerator.h" #include "World.h" #include "WorldPacket.h" +#include "CombatPackets.h" #include "Transport.h" @@ -1826,12 +1827,12 @@ Player* Creature::SelectNearestPlayer(float distance) const void Creature::SendAIReaction(AiReaction reactionType) { - WorldPacket data(SMSG_AI_REACTION, 12); + WorldPackets::Combat::AIReaction packet; - data << GetGUID(); - data << uint32(reactionType); + packet.UnitGUID = GetGUID(); + packet.Reaction = reactionType; - ((WorldObject*)this)->SendMessageToSet(&data, true); + ((WorldObject*)this)->SendMessageToSet(packet.Write(), true); TC_LOG_DEBUG("network", "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); } diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 4d14ede70fe..c947d4f49da 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -23,6 +23,7 @@ #include "WorldPacket.h" #include "WorldSession.h" #include "Formulas.h" +#include "QuestPackets.h" GossipMenu::GossipMenu() { @@ -373,11 +374,11 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote const& eEmote, const std::string void PlayerMenu::SendQuestGiverStatus(uint32 questStatus, ObjectGuid npcGUID) const { - WorldPacket data(SMSG_QUESTGIVER_STATUS, 8 + 4); - data << npcGUID; - data << uint32(questStatus); + WorldPackets::Quest::QuestGiverStatus packet; + packet.QuestGiver.Guid = npcGUID; + packet.QuestGiver.Status = questStatus; - _session->SendPacket(&data); + _session->SendPacket(packet.Write()); TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC=%s, status=%u", npcGUID.ToString().c_str(), questStatus); } -- cgit v1.2.3