You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed self-completing quests without NPCs
no, wait
Fixed self-completing quests without NPCs, and fixed some issues with the AUTOCOMPLETE quest flag
(cherry picked from commit f53045a)
if (!object || !object->hasInvolvedQuest(questId))
507
-
return;
508
506
509
-
// some kind of WPE protection
510
-
if (!_player->CanInteractWithQuestGiver(object))
507
+
if (!object)
511
508
return;
512
509
510
+
if (!quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE))
511
+
{
512
+
if (!object->hasInvolvedQuest(questId))
513
+
return;
514
+
515
+
// some kind of WPE protection
516
+
if (!_player->CanInteractWithQuestGiver(object))
517
+
return;
518
+
}
519
+
else
520
+
{
521
+
// Do not allow completing quests on other players.
522
+
if (guid != _player->GetGUID())
523
+
return;
524
+
}
525
+
513
526
if (!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE)
514
527
{
515
-
TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player {} {} tried to complete quest [entry: {}] without being in possession of the quest!",
TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player {} [{}] tried to complete quest [entry: {}] without being in possession of the quest!",
QUEST_FLAGS_AUTOCOMPLETE = 0x00010000, //Quests with this flag cause the client to automatically send CMSG_QUESTGIVER_COMPLETE_QUEST after accepting if the quest has any objectives and they are completed before accepting (none of 3.3.5a quests fit this criteria)
150
150
QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER = 0x00020000, // Displays usable item in quest tracker
151
151
QUEST_FLAGS_OBJ_TEXT = 0x00040000, // use Objective text as Complete text
152
152
QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future.
0 commit comments