Files
TCPlayerbotCore/src/server/game/Handlers/QueryHandler.cpp
T

485 lines
16 KiB
C++
Raw Normal View History

/*
2012-01-01 00:32:13 +01:00
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* 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/>.
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#include "Common.h"
#include "Language.h"
#include "DatabaseEnv.h"
2008-10-02 16:23:55 -05:00
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Opcodes.h"
#include "Log.h"
#include "World.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "UpdateMask.h"
#include "NPCHandler.h"
#include "Pet.h"
#include "MapManager.h"
2009-10-17 15:51:44 -07:00
void WorldSession::SendNameQueryOpcode(uint64 guid)
2008-10-02 16:23:55 -05:00
{
Player* player = NULL;
const CharacterNameData* nameData = sWorld->GetCharacterNameData(GUID_LOPART(guid));
if (nameData)
player = ObjectAccessor::FindPlayer(guid);
2008-10-02 16:23:55 -05:00
// guess size
2010-04-07 22:59:46 +02:00
WorldPacket data(SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10));
data.appendPackGUID(guid);
2009-06-11 00:45:59 -05:00
data << uint8(0); // added in 3.1
if (nameData)
2008-10-02 16:23:55 -05:00
{
data << nameData->m_name; // played name
data << uint8(0); // realm name for cross realm BG usage
data << uint8(nameData->m_race);
data << uint8(nameData->m_gender);
data << uint8(nameData->m_class);
2008-10-02 16:23:55 -05:00
}
else
{
data << std::string(GetTrinityString(LANG_NON_EXIST_CHARACTER));
data << uint32(0);
}
if (player)
{
if (DeclinedName const* names = player->GetDeclinedNames())
{
data << uint8(1); // is declined
for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
data << names->name[i];
}
else
data << uint8(0); // is not declined
}
else //TODO: decline names may also need to be stored in char name data
data << uint8(0);
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
SendPacket(&data);
}
2009-10-17 15:51:44 -07:00
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
2008-10-02 16:23:55 -05:00
{
uint64 guid;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
recv_data >> guid;
2009-10-17 15:51:44 -07:00
2011-09-30 11:02:17 -05:00
// This is disable by default to prevent lots of console spam
2011-09-30 10:57:02 -05:00
// sLog->outString("HandleNameQueryOpcode %u", guid);
SendNameQueryOpcode(guid);
2008-10-02 16:23:55 -05:00
}
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recv_data*/)
2008-10-02 16:23:55 -05:00
{
SendQueryTimeResponse();
}
void WorldSession::SendQueryTimeResponse()
{
WorldPacket data(SMSG_QUERY_TIME_RESPONSE, 4+4);
data << uint32(time(NULL));
data << uint32(sWorld->GetNextDailyQuestsResetTime() - time(NULL));
SendPacket(&data);
2008-10-02 16:23:55 -05:00
}
2009-10-17 15:51:44 -07:00
/// Only _static_ data is sent in this packet !!!
2010-04-07 22:59:46 +02:00
void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
2008-10-02 16:23:55 -05:00
{
uint32 entry;
recv_data >> entry;
2009-12-17 12:13:33 +01:00
uint64 guid;
recv_data >> guid;
2009-10-17 15:51:44 -07:00
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry);
2008-10-02 16:23:55 -05:00
if (ci)
{
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
std::string Name, SubName;
Name = ci->Name;
SubName = ci->SubName;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
if (CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(entry))
2008-10-02 16:23:55 -05:00
{
ObjectMgr::GetLocaleString(cl->Name, loc_idx, Name);
ObjectMgr::GetLocaleString(cl->SubName, loc_idx, SubName);
2008-10-02 16:23:55 -05:00
}
}
2011-04-28 23:38:16 +02:00
sLog->outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
2008-10-02 16:23:55 -05:00
// guess size
2010-04-07 22:59:46 +02:00
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 100);
data << uint32(entry); // creature entry
2008-10-02 16:23:55 -05:00
data << Name;
for (int i = 0; i < 7; i++)
data << uint8(0); // name2, ..., name8
2008-10-02 16:23:55 -05:00
data << SubName;
data << ci->IconName; // "Directions" for guard, string for Icons 2.3.0
2009-05-31 15:56:51 -05:00
data << uint32(ci->type_flags); // flags
data << uint32(ci->type_flags2); // unknown meaning
2009-05-31 15:56:51 -05:00
data << uint32(ci->type); // CreatureType.dbc
data << uint32(ci->family); // CreatureFamily.dbc
data << uint32(ci->rank); // Creature Rank (elite, boss, etc)
data << uint32(ci->KillCredit[0]); // new in 3.1, kill credit
data << uint32(ci->KillCredit[1]); // new in 3.1, kill credit
data << uint32(ci->Modelid1); // Modelid1
data << uint32(ci->Modelid2); // Modelid2
data << uint32(ci->Modelid3); // Modelid3
data << uint32(ci->Modelid4); // Modelid4
data << float(ci->ModHealth); // dmg/hp modifier
data << float(ci->ModMana); // dmg/mana modifier
data << uint8(ci->RacialLeader);
2010-09-28 08:21:51 +03:00
for (uint32 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
data << uint32(ci->questItems[i]); // itemId[6], quest drop
2009-06-11 00:45:59 -05:00
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
data << uint32(ci->expansionUnknown); // unknown meaning
2010-04-07 22:59:46 +02:00
SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
2008-10-02 16:23:55 -05:00
}
else
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
GUID_LOPART(guid), entry);
2010-04-07 22:59:46 +02:00
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4);
2008-10-02 16:23:55 -05:00
data << uint32(entry | 0x80000000);
2010-04-07 22:59:46 +02:00
SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
2008-10-02 16:23:55 -05:00
}
}
2009-10-17 15:51:44 -07:00
/// Only _static_ data is sent in this packet !!!
2010-04-07 22:59:46 +02:00
void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
2008-10-02 16:23:55 -05:00
{
2011-04-28 22:54:30 +02:00
uint32 entry;
recv_data >> entry;
2009-12-17 12:13:33 +01:00
uint64 guid;
recv_data >> guid;
2009-10-17 15:51:44 -07:00
const GameObjectTemplate* info = sObjectMgr->GetGameObjectTemplate(entry);
2010-04-07 19:14:10 +02:00
if (info)
2008-10-02 16:23:55 -05:00
{
std::string Name;
std::string IconName;
2008-10-02 16:23:55 -05:00
std::string CastBarCaption;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
Name = info->name;
IconName = info->IconName;
2008-10-02 16:23:55 -05:00
CastBarCaption = info->castBarCaption;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
if (GameObjectLocale const* gl = sObjectMgr->GetGameObjectLocale(entry))
2008-10-02 16:23:55 -05:00
{
ObjectMgr::GetLocaleString(gl->Name, loc_idx, Name);
ObjectMgr::GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
2008-10-02 16:23:55 -05:00
}
}
2011-04-29 19:59:40 +02:00
sLog->outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
2010-04-07 22:59:46 +02:00
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
2011-04-28 22:54:30 +02:00
data << uint32(entry);
data << uint32(info->type);
data << uint32(info->displayId);
2008-10-02 16:23:55 -05:00
data << Name;
data << uint8(0) << uint8(0) << uint8(0); // name2, name3, name4
data << IconName; // 2.0.3, string. Icon name to use instead of default icon for go's (ex: "Attack" makes sword)
2008-10-02 16:23:55 -05:00
data << CastBarCaption; // 2.0.3, string. Text will appear in Cast Bar when using GO (ex: "Collecting")
2009-06-11 00:45:59 -05:00
data << info->unk1; // 2.0.3, string
data.append(info->raw.data, MAX_GAMEOBJECT_DATA);
data << float(info->size); // go size
2010-09-28 08:21:51 +03:00
for (uint32 i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
data << uint32(info->questItems[i]); // itemId[6], quest drop
data << int32(info->unkInt32); // 4.x, unknown
2010-04-07 22:59:46 +02:00
SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
2008-10-02 16:23:55 -05:00
}
else
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
2011-04-28 22:54:30 +02:00
GUID_LOPART(guid), entry);
2010-04-07 22:59:46 +02:00
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 4);
2011-04-28 22:54:30 +02:00
data << uint32(entry | 0x80000000);
2010-04-07 22:59:46 +02:00
SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
2008-10-02 16:23:55 -05:00
}
}
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
{
sLog->outDetail("WORLD: Received MSG_CORPSE_QUERY");
2009-10-17 15:51:44 -07:00
Corpse* corpse = GetPlayer()->GetCorpse();
2009-10-17 15:51:44 -07:00
2010-04-07 19:14:10 +02:00
if (!corpse)
{
WorldPacket data(MSG_CORPSE_QUERY, 1);
data << uint8(0); // corpse not found
SendPacket(&data);
return;
}
2009-10-17 15:51:44 -07:00
2010-05-01 22:25:14 +02:00
uint32 mapid = corpse->GetMapId();
float x = corpse->GetPositionX();
float y = corpse->GetPositionY();
float z = corpse->GetPositionZ();
2010-05-01 22:25:14 +02:00
uint32 corpsemapid = mapid;
2009-10-17 15:51:44 -07:00
// if corpse at different map
2010-04-07 19:14:10 +02:00
if (mapid != _player->GetMapId())
2008-10-02 16:23:55 -05:00
{
// search entrance map for proper show entrance
2010-04-07 19:14:10 +02:00
if (MapEntry const* corpseMapEntry = sMapStore.LookupEntry(mapid))
{
2010-04-07 19:14:10 +02:00
if (corpseMapEntry->IsDungeon() && corpseMapEntry->entrance_map >= 0)
{
// if corpse map have entrance
if (Map const* entranceMap = sMapMgr->CreateBaseMap(corpseMapEntry->entrance_map))
{
mapid = corpseMapEntry->entrance_map;
x = corpseMapEntry->entrance_x;
y = corpseMapEntry->entrance_y;
z = entranceMap->GetHeight(GetPlayer()->GetPhaseMask(), x, y, MAX_HEIGHT);
}
}
}
2008-10-02 16:23:55 -05:00
}
2009-10-17 15:51:44 -07:00
2009-10-29 18:17:17 +01:00
WorldPacket data(MSG_CORPSE_QUERY, 1+(6*4));
data << uint8(1); // corpse found
data << int32(mapid);
data << float(x);
data << float(y);
data << float(z);
data << int32(corpsemapid);
data << uint32(0); // unknown
2008-10-02 16:23:55 -05:00
SendPacket(&data);
}
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
2008-10-02 16:23:55 -05:00
{
uint32 textID;
uint64 guid;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
recv_data >> textID;
sLog->outDetail("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
recv_data >> guid;
GetPlayer()->SetSelection(guid);
2009-10-17 15:51:44 -07:00
GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
2008-10-02 16:23:55 -05:00
data << textID;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
if (!pGossip)
{
2010-09-28 08:21:51 +03:00
for (uint32 i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
2008-10-02 16:23:55 -05:00
{
data << float(0);
data << "Greetings $N";
data << "Greetings $N";
data << uint32(0);
data << uint32(0);
data << uint32(0);
data << uint32(0);
data << uint32(0);
data << uint32(0);
data << uint32(0);
}
}
else
{
2010-09-28 08:21:51 +03:00
std::string Text_0[MAX_LOCALES], Text_1[MAX_LOCALES];
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
2008-10-02 16:23:55 -05:00
{
Text_0[i]=pGossip->Options[i].Text_0;
Text_1[i]=pGossip->Options[i].Text_1;
}
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textID))
2008-10-02 16:23:55 -05:00
{
2010-09-28 08:21:51 +03:00
for (int i = 0; i < MAX_LOCALES; ++i)
2008-10-02 16:23:55 -05:00
{
ObjectMgr::GetLocaleString(nl->Text_0[i], loc_idx, Text_0[i]);
ObjectMgr::GetLocaleString(nl->Text_1[i], loc_idx, Text_1[i]);
2008-10-02 16:23:55 -05:00
}
}
}
2009-10-17 15:51:44 -07:00
2010-09-28 08:21:51 +03:00
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
2008-10-02 16:23:55 -05:00
{
data << pGossip->Options[i].Probability;
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
if (Text_0[i].empty())
2008-10-02 16:23:55 -05:00
data << Text_1[i];
else
data << Text_0[i];
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
if (Text_1[i].empty())
2008-10-02 16:23:55 -05:00
data << Text_0[i];
else
data << Text_1[i];
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
data << pGossip->Options[i].Language;
2009-10-17 15:51:44 -07:00
2010-09-28 08:21:51 +03:00
for (int j = 0; j < MAX_GOSSIP_TEXT_EMOTES; ++j)
{
data << pGossip->Options[i].Emotes[j]._Delay;
data << pGossip->Options[i].Emotes[j]._Emote;
}
2008-10-02 16:23:55 -05:00
}
}
2009-10-17 15:51:44 -07:00
2010-04-07 22:59:46 +02:00
SendPacket(&data);
2009-10-17 15:51:44 -07:00
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE");
2008-10-02 16:23:55 -05:00
}
2009-10-17 15:51:44 -07:00
/// Only _static_ data is sent in this packet !!!
2010-04-07 22:59:46 +02:00
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
2008-10-02 16:23:55 -05:00
{
sLog->outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
2009-10-17 15:51:44 -07:00
2009-12-17 12:13:33 +01:00
uint32 pageID;
2008-10-02 16:23:55 -05:00
recv_data >> pageID;
2009-12-17 12:13:33 +01:00
recv_data.read_skip<uint64>(); // guid
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
while (pageID)
{
2011-04-28 22:13:09 +02:00
PageText const* pageText = sObjectMgr->GetPageText(pageID);
2008-10-02 16:23:55 -05:00
// guess size
2010-04-07 22:59:46 +02:00
WorldPacket data(SMSG_PAGE_TEXT_QUERY_RESPONSE, 50);
2008-10-02 16:23:55 -05:00
data << pageID;
2009-10-17 15:51:44 -07:00
2011-04-28 22:13:09 +02:00
if (!pageText)
2008-10-02 16:23:55 -05:00
{
data << "Item page missing.";
data << uint32(0);
pageID = 0;
}
else
{
2011-04-28 22:13:09 +02:00
std::string Text = pageText->Text;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
2011-11-07 11:18:00 -06:00
if (PageTextLocale const* player = sObjectMgr->GetPageTextLocale(pageID))
ObjectMgr::GetLocaleString(player->Text, loc_idx, Text);
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
data << Text;
2011-04-28 22:13:09 +02:00
data << uint32(pageText->NextPage);
pageID = pageText->NextPage;
2008-10-02 16:23:55 -05:00
}
2010-04-07 22:59:46 +02:00
SendPacket(&data);
2009-10-17 15:51:44 -07:00
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
2008-10-02 16:23:55 -05:00
}
}
2009-02-17 20:07:49 -06:00
2010-04-07 22:59:46 +02:00
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
2009-12-17 12:13:33 +01:00
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
2009-12-17 12:13:33 +01:00
uint32 unk;
recv_data >> unk;
2009-12-17 12:13:33 +01:00
2010-03-06 14:28:11 +01:00
WorldPacket data(SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, 4+4+4+4);
data << float(0);
data << float(0);
data << float(0);
data << float(0);
2009-12-17 12:13:33 +01:00
SendPacket(&data);
}
2010-02-14 19:13:14 -07:00
void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
{
uint32 count;
recv_data >> count; // quest count, max=25
// 4.3 struct: count, byte, byte, byte, questIds[]
2010-04-07 18:09:10 +02:00
2010-04-07 19:14:10 +02:00
if (count >= MAX_QUEST_LOG_SIZE)
{
recv_data.rfinish();
2010-02-14 19:13:14 -07:00
return;
}
2010-04-07 18:09:10 +02:00
2010-02-14 19:13:14 -07:00
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
data << uint32(count); // count
2010-04-07 18:09:10 +02:00
2010-08-26 15:54:56 +06:00
for (uint32 i = 0; i < count; ++i)
2010-02-14 19:13:14 -07:00
{
uint32 questId;
recv_data >> questId; // quest id
2010-04-07 18:09:10 +02:00
2010-02-14 19:13:14 -07:00
bool questOk = false;
2010-04-07 18:09:10 +02:00
2010-02-14 19:13:14 -07:00
uint16 questSlot = _player->FindQuestSlot(questId);
2010-04-07 18:09:10 +02:00
2010-04-07 19:14:10 +02:00
if (questSlot != MAX_QUEST_LOG_SIZE)
2010-02-14 19:13:14 -07:00
questOk =_player->GetQuestSlotQuestId(questSlot) == questId;
2010-04-07 18:09:10 +02:00
2010-04-07 19:14:10 +02:00
if (questOk)
2010-02-14 19:13:14 -07:00
{
QuestPOIVector const* POI = sObjectMgr->GetQuestPOIVector(questId);
2010-04-07 18:09:10 +02:00
2010-04-07 19:14:10 +02:00
if (POI)
2010-02-14 19:13:14 -07:00
{
data << uint32(questId); // quest ID
data << uint32(POI->size()); // POI count
2010-04-07 19:12:44 +02:00
for (QuestPOIVector::const_iterator itr = POI->begin(); itr != POI->end(); ++itr)
2010-02-14 19:13:14 -07:00
{
data << uint32(itr->Id); // POI index
data << int32(itr->ObjectiveIndex); // objective index
data << uint32(itr->MapId); // mapid
data << uint32(itr->AreaId); // areaid
2010-02-14 19:13:14 -07:00
data << uint32(itr->Unk2); // unknown
data << uint32(itr->Unk3); // unknown
data << uint32(itr->Unk4); // unknown
data << uint32(itr->points.size()); // POI points count
2010-04-07 18:09:10 +02:00
2010-04-07 19:12:44 +02:00
for (std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
2010-02-14 19:13:14 -07:00
{
data << int32(itr2->x); // POI point x
data << int32(itr2->y); // POI point y
}
}
}
else
{
data << uint32(questId); // quest ID
data << uint32(0); // POI count
}
}
else
{
data << uint32(questId); // quest ID
data << uint32(0); // POI count
}
}
2010-04-07 18:09:10 +02:00
2010-02-14 19:13:14 -07:00
SendPacket(&data);
}