Core/Packets: converted SMSG_QUEST_GIVER_REQUEST_ITEMS to packet class

This commit is contained in:
Ovahlord committed 2019-12-18 05:54:53 +01:00
1 parent 9d480bed23
commit 39c20cd8be
5 files changed
+148 -42

No files matched your search

@@ -0,0 +1,53 @@
/*
* Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
*
* 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 "QuestPackets.h"
#include "Errors.h"
WorldPacket const* WorldPackets::Quest::QuestGiverRequestItems::Write()
{
_worldPacket << QuestGiverGUID;
_worldPacket << uint32(QuestID);
_worldPacket << QuestTitle;
_worldPacket << CompletionText;
_worldPacket << uint32(CompEmoteDelay);
_worldPacket << uint32(CompEmoteType);
_worldPacket << uint32(AutoLaunched);
_worldPacket << uint32(QuestFlags);
_worldPacket << uint32(SuggestPartyMembers);
_worldPacket << uint32(MoneyToGet);
_worldPacket << uint32(Collect.size());
for (QuestObjectiveCollect const& obj : Collect)
{
_worldPacket << uint32(obj.ObjectID);
_worldPacket << uint32(obj.Amount);
_worldPacket << uint32(obj.DisplayID);
}
_worldPacket << uint32(Currency.size());
for (QuestCurrency const& cur : Currency)
{
_worldPacket << uint32(cur.CurrencyID);
_worldPacket << uint32(cur.Amount);
}
_worldPacket << uint32(StatusFlags);
return &_worldPacket;
}