35 data <<
uint8(!nameData);
141 std::string realmName = found ? iter->second :
"";
144 data <<
uint8(!found);
164 recvPacket >> realmId;
176 data <<
uint32(time(NULL));
177 data <<
uint32(
sWorld->GetNextDailyQuestsResetTime() - time(NULL));
196 std::string Name, SubName;
210 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", info->
Name.c_str(), entry);
212 data.
WriteBits(SubName.length() ? SubName.length() + 1 : 0, 11);
216 for (
int i = 0; i < 8; i++)
256 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
259 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (ENTRY: %u)", entry);
281 size_t pos = data.
wpos();
287 std::string IconName;
288 std::string CastBarCaption;
304 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->
name.c_str(), entry);
311 data << CastBarCaption;
315 data << float(info->
size);
325 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
329 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
331 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
339 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_CORPSE_QUERY");
347 for (
int i = 0; i < 5; i++)
357 uint32 corpseMapId = mapId;
360 if (mapId !=
_player->GetMapId())
365 if (corpseMapEntry->IsInstance() && corpseMapEntry->entrance_map >= 0)
368 if (
Map const* entranceMap =
sMapMgr->CreateBaseMap(corpseMapEntry->entrance_map))
370 mapId = corpseMapEntry->entrance_map;
371 x = corpseMapEntry->entrance_x;
372 y = corpseMapEntry->entrance_y;
379 _player->SendCorpseReclaimDelay();
391 data <<
uint32(corpseMapId);
395 data <<
int32(mapId);
409 SF_LOG_ERROR(
"network",
"WORLD: CMSG_NPC_TEXT_QUERY ID '%u', %lu", textID,
uint64(guid));
419 for (
uint8 i = 0; i < 7; i++)
424 for (
uint8 i = 0; i < 7; i++)
427 buf << std::string(
"Help help! I'm being repressed!");
432 for (
uint8 i = 0; i < 7; i++)
436 for (
uint8 i = 0; i < 7; i++)
452 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_NPC_TEXT_UPDATE");
458 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_PAGE_TEXT_QUERY");
501 pageID = pageText ? pageText->
NextPage : 0;
505 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
511 SF_LOG_DEBUG(
"network",
"WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
514 recvData.
ReadGuidMask(corpseGuid, 7, 6, 3, 0, 4, 1, 5, 2);
527 std::map<uint32, std::vector<uint32>> quests;
528 for (
int i = 0; i < 50; ++i)
536 auto creatures =
sObjectMgr->GetCreatureQuestInvolvedRelationReverseBounds(questId);
537 for (
auto it = creatures.first; it != creatures.second; ++it)
538 quests[questId].push_back(it->second);
540 auto gos =
sObjectMgr->GetGOQuestInvolvedRelationReverseBounds(questId);
541 for (
auto it = gos.first; it != gos.second; ++it)
542 quests[questId].push_back(it->second | 0x80000000);
552 for (
auto it = quests.begin(); it != quests.end(); ++it)
557 for (
auto it = quests.begin(); it != quests.end(); ++it)
559 data <<
uint32(it->first);
560 for (
const auto& entry : it->second)
582 for (
uint32 i = 0; i < count; ++i)
587 bool questOk =
false;
592 questOk =
_player->GetQuestSlotQuestId(questSlot) == questId;
602 for (QuestPOIVector::const_iterator itr = POI->begin(); itr != POI->end(); ++itr)
606 poiData <<
uint32(itr->FloorId);
608 for (std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
610 poiData <<
int32(itr2->x);
611 poiData <<
int32(itr2->y);
614 poiData <<
int32(itr->ObjectiveIndex);
615 poiData <<
uint32(itr->Id);
618 poiData <<
uint32(itr->MapId);
619 poiData <<
uint32(itr->points.size());
620 poiData <<
uint32(itr->AreaId);
622 poiData <<
uint32(itr->Unk4);
623 poiData <<
uint32(itr->Unk3);
626 poiData <<
uint32(questId);
627 poiData <<
uint32(POI->size());
631 poiData <<
uint32(questId);
639 poiData <<
uint32(questId);
#define MAX_CREATURE_QUEST_ITEMS
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
#define MAX_GAMEOBJECT_QUEST_ITEMS
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
uint32 GUID_LOPART(uint64 x)
std::vector< QuestPOI > QuestPOIVector
#define MAX_QUEST_LOG_SIZE
#define MAX_GAMEOBJECT_DATA
#define MAX_DECLINED_NAME_CASES
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
bool WriteBit(uint32 bit)
void put(size_t pos, T value)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
void WriteString(std::string const &str)
uint32 ReadBits(size_t bits)
void ReadGuidBytes(ObjectGuid &guid, Offsets... offsets)
void ReadGuidMask(ObjectGuid &guid, Offsets... offsets)
void WriteBits(T value, size_t bits)
void WriteByteSeq(uint8 b)
static Player * FindPlayer(uint64)
static void GetLocaleString(const StringVector &data, int loc_idx, std::string &value)
DeclinedName const * GetDeclinedNames() const
Corpse * GetCorpse() const
void HandleCorpseMapPositionQuery(WorldPacket &recvPacket)
void HandleQuestNPCQuery(WorldPacket &recvData)
LocaleConstant GetSessionDbLocaleIndex() const
void SendNameQueryOpcode(ObjectGuid guid)
void HandleNameQueryOpcode(WorldPacket &recvPacket)
Player * GetPlayer() const
void HandleCreatureQueryOpcode(WorldPacket &recvPacket)
Only static data is sent in this packet !!!
uint32 GetVirtualRealmID() const
void HandleGameObjectQueryOpcode(WorldPacket &recvPacket)
Only static data is sent in this packet !!!
void HandleCorpseQueryOpcode(WorldPacket &recvPacket)
void HandleNpcTextQueryOpcode(WorldPacket &recvPacket)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
uint32 GetAccountId() const
void HandleRealmNameQueryOpcode(WorldPacket &recvPacket)
void HandlePageTextQueryOpcode(WorldPacket &recvPacket)
Only static data is sent in this packet !!!
void HandleQueryTimeOpcode(WorldPacket &recvPacket)
void SendQueryTimeResponse()
void HandleQuestPOIQuery(WorldPacket &recvData)
void SendRealmNameQueryOpcode(uint32 realmId)
@ SMSG_REALM_NAME_QUERY_RESPONSE
@ SMSG_CREATURE_QUERY_RESPONSE
@ SMSG_PAGE_TEXT_QUERY_RESPONSE
@ SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE
@ SMSG_QUERY_PLAYER_NAME_RESPONSE
@ SMSG_QUEST_NPC_QUERY_RESPONSE
@ SMSG_GAMEOBJECT_QUERY_RESPONSE
@ SMSG_QUERY_TIME_RESPONSE
@ SMSG_QUEST_POI_QUERY_RESPONSE
RealmNameMap realmNameStore
uint32 KillCredit[MAX_KILL_CREDIT]
uint32 questItems[MAX_CREATURE_QUEST_ITEMS]
std::string name[MAX_DECLINED_NAME_CASES]
uint32 questItems[MAX_GAMEOBJECT_QUEST_ITEMS]
uint32 data[MAX_GAMEOBJECT_DATA]
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@076042223047135343272115231235004103107103052206 raw
std::string castBarCaption
GossipTextOption Options[MAX_GOSSIP_TEXT_OPTIONS]
float GetPositionZ() const
float GetPositionX() const
float GetPositionY() const