47 TC_LOG_INFO(
"network",
"Error in CMSG_QUESTGIVER_STATUS_QUERY, called for non-existing questgiver ({})", guid.
ToString());
85 TC_LOG_DEBUG(
"network",
"WORLD: HandleQuestgiverHelloOpcode - {} not found or you can't interact with him.",
112 recvData >> guid >> questId >> startCheat;
114 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST {}, quest = {}, startCheat = {}", guid.
ToString(), questId, startCheat);
122 auto CLOSE_GOSSIP_CLEAR_SHARING_INFO = ([
this]()
131 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
139 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
144 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
152 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
160 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
167 if (!
GetPlayer()->CanTakeQuest(quest,
true))
169 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
191 for (
GroupReference* itr = group->GetFirstMember(); itr !=
nullptr; itr = itr->next())
193 Player* player = itr->GetSource();
213 if (quest->GetSrcSpell() > 0)
220 CLOSE_GOSSIP_CLEAR_SHARING_INFO();
228 recvData >> guid >> questId >> unk1;
229 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = {}, quest = {}, unk1 = {}", guid.
ToString(), questId, unk1);
247 if (quest->IsAutoComplete())
266 recvData >> guid >> questId >> reward;
274 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = {}, quest = {}, reward = {}", guid.
ToString(), questId, reward);
291 TC_LOG_ERROR(
"entities.player.cheat",
"Error in QUEST_STATUS_COMPLETE: player {} {} tried to complete quest {}, but is not allowed to do so (possible packet-hacking or high latency)",
357 recvData >> guid >> questId;
359 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = {}, quest = {}", guid.
ToString(), questId);
381 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_CANCEL");
389 recvData >> slot1 >> slot2;
394 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = {}, slot 2 = {}", slot1, slot2);
404 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = {}", slot);
457 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = {}", questId);
481 if (quest->GetSrcSpell() > 0)
494 recvData >> guid >> questId;
496 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = {}, quest = {}", guid.
ToString(), questId);
525 TC_LOG_ERROR(
"entities.player.cheat",
"Possible hacking attempt: Player {} [{}] tried to complete quest [entry: {}] without being in possession of the quest!",
531 bg->HandleQuestComplete(questId,
_player);
551 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
557 recvPacket >> questId;
562 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_PUSHQUESTTOPARTY questId = {}", questId);
579 Player* receiver = itr->GetSource();
581 if (!receiver || receiver == sender)
648 recvPacket >> guid >> questId >> msg;
650 TC_LOG_DEBUG(
"network",
"WORLD: Received MSG_QUEST_PUSH_RESULT");
667 TC_LOG_DEBUG(
"network",
"WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
677 data <<
uint32(rew_count);
680 for (RewardedQuestSet::const_iterator itr = rewQuests.begin(); itr != rewQuests.end(); ++itr)
@ CHAR_UPD_QUEST_TRACK_ABANDON_TIME
@ ACHIEVEMENT_TIMED_TYPE_QUEST
@ ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
std::set< uint32 > RewardedQuestSet
@ QUEST_FLAGS_PARTY_ACCEPT
@ QUEST_FLAGS_AUTOCOMPLETE
#define MAX_QUEST_LOG_SIZE
@ QUEST_STATUS_INCOMPLETE
@ QUEST_PARTY_MSG_FINISH_QUEST
@ QUEST_PARTY_MSG_CANT_TAKE_QUEST
@ QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY
@ QUEST_PARTY_MSG_ACCEPT_QUEST
@ QUEST_PARTY_MSG_HAVE_QUEST
@ QUEST_PARTY_MSG_SHARING_QUEST
@ QUEST_PARTY_MSG_LOG_FULL
@ QUEST_PARTY_MSG_NOT_IN_PARTY
#define QUEST_REWARD_CHOICES_COUNT
@ QUEST_SPECIAL_FLAGS_TIMED
@ UNIT_NPC_FLAG_QUESTGIVER
virtual bool OnGossipHello(Player *)
virtual void OnQuestReward(Player *, Quest const *, uint32)
void SetHomePosition(float x, float y, float z, float o)
CreatureTemplate const * GetCreatureTemplate() const
CreatureMovementData const & GetMovementTemplate() const
virtual void OnQuestReward(Player *, Quest const *, uint32)
GameObjectAI * AI() const
GroupReference * GetFirstMember()
LowType GetCounter() const
std::string ToString() const
static Creature * ToCreature(Object *o)
static GameObject * ToGameObject(Object *o)
virtual bool hasQuest(uint32) const
static ObjectGuid GetGUID(Object const *o)
virtual bool hasInvolvedQuest(uint32) const
static Player * ToPlayer(Object *o)
bool CanInteractWithQuestGiver(Object *questGiver) const
void RewardQuest(Quest const *quest, uint32 reward, Object *questGiver, bool announce=true)
bool HasPvPForcingQuest() const
bool IsInSameRaidWith(Player const *p) const
RewardedQuestSet const & getRewardedQuests() const
void UpdatePvPState(bool onlyFFA=false)
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, WorldObject *ref=nullptr)
bool CanCompleteQuest(uint32 quest_id)
void SendPreparedGossip(WorldObject *source)
bool CanSeeStartQuest(Quest const *quest) const
QuestGiverStatus GetQuestDialogStatus(Object *questGiver)
bool SatisfyQuestDay(Quest const *qInfo, bool msg) const
bool CanRewardQuest(Quest const *quest, bool msg)
bool CanAddQuest(Quest const *quest, bool msg) const
void CompleteQuest(uint32 quest_id)
bool SatisfyQuestLog(bool msg) const
void SendQuestConfirmAccept(Quest const *quest, Player *pReceiver) const
uint32 GetQuestSlotQuestId(uint16 slot) const
void SwapQuestSlot(uint16 slot1, uint16 slot2)
bool CanShareQuest(uint32 questId) const
Creature * GetNPCIfCanInteractWith(ObjectGuid const &guid, NPCFlags npcFlags) const
Quest const * GetNextQuest(Object const *questGiver, Quest const *quest) const
Battleground * GetBattleground() const
void SetQuestSlot(uint16 slot, uint32 quest_id, uint32 timer=0)
bool IsActiveQuest(uint32 quest_id) const
void AddQuestAndCheckCompletion(Quest const *quest, Object *questGiver)
void SetQuestSharingInfo(ObjectGuid guid, uint32 id)
void ClearQuestSharingInfo()
bool CanTakeQuest(Quest const *quest, bool msg) const
void SendPushToPartyResponse(Player const *player, QuestShareMessages msg) const
bool TakeQuestSourceItem(uint32 questId, bool msg)
void RemoveActiveQuest(uint32 questId, bool update=true)
QuestStatus GetQuestStatus(uint32 quest_id) const
bool CanCompleteRepeatableQuest(Quest const *quest)
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void AbandonQuest(uint32 quest_id)
size_t GetRewardedQuestCount() const
ObjectGuid GetPlayerSharingQuest() const
void RemoveTimedQuest(uint32 questId)
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
void SendQuestGiverStatusMultiple()
PlayerMenu * PlayerTalkClass
void setUInt32(uint8 index, uint32 value)
bool HasFlag(uint32 flag) const
uint32 GetReqItemsCount() const
bool IsRepeatable() const
bool IsAutoComplete() const
bool IsAutoAccept() const
bool IsDailyOrWeekly() const
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void PauseMovement(uint32 timer=0, uint8 slot=0, bool forced=true)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
bool IsHostileTo(WorldObject const *target) const
std::string const & GetName() const
bool IsInMap(WorldObject const *obj) const
void HandleQuestQueryOpcode(WorldPackets::Quest::QueryQuestInfo &query)
void HandleQueryQuestsCompleted(WorldPacket &recvData)
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
void HandleQuestConfirmAccept(WorldPacket &recvData)
void HandleQuestLogRemoveQuest(WorldPacket &recvData)
void HandleQuestgiverQuestAutoLaunch(WorldPacket &recvPacket)
void HandleQuestgiverAcceptQuestOpcode(WorldPacket &recvPacket)
Player * GetPlayer() const
void HandleQuestgiverStatusQueryOpcode(WorldPacket &recvPacket)
void HandleQuestgiverCompleteQuest(WorldPacket &recvData)
void HandleQuestgiverHelloOpcode(WorldPacket &recvPacket)
void HandleQuestgiverRequestRewardOpcode(WorldPacket &recvPacket)
void HandleQuestLogSwapQuest(WorldPacket &recvData)
void HandleQuestPushResult(WorldPacket &recvPacket)
void HandleQuestgiverQueryQuestOpcode(WorldPacket &recvPacket)
void HandleQuestgiverChooseRewardOpcode(WorldPacket &recvPacket)
void HandlePushQuestToParty(WorldPacket &recvPacket)
void HandleQuestgiverCancel(WorldPacket &recvData)
void HandleQuestgiverStatusMultipleQuery(WorldPacket &recvPacket)
@ SMSG_QUERY_QUESTS_COMPLETED_RESPONSE
@ CONFIG_QUEST_ENABLE_QUEST_TRACKER
TC_GAME_API Object * GetObjectByTypeMask(WorldObject const &, ObjectGuid const &, uint32 typemask)
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
uint32 GetInteractionPauseTimer() const
void GetPosition(float &x, float &y) const