aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-04-17 17:59:19 +0200
committerclick <none@none>2010-04-17 17:59:19 +0200
commitcc2db574f119547060cb7c3482fb29ec408d28a8 (patch)
treed402b11d4b318efa83ef43e2aa6f0d3ecdef147c /src
parent6e0fa4b39e7f0bc5dcdaa503db25d5b154224a04 (diff)
Whack questgivers in the head with a bat to make them properly show ! or ? properly depending on the questtype they hand out
Patch by Liberate --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/QuestDef.cpp2
-rw-r--r--src/game/QuestHandler.cpp5
3 files changed, 7 insertions, 4 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 091d8f59428..62dc4789533 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -13752,7 +13752,7 @@ bool Player::CanCompleteQuest(uint32 quest_id)
return false;
// auto complete quest
- if (qInfo->IsAutoComplete() && CanTakeQuest(qInfo, false))
+ if ((qInfo->IsAutoComplete() || qInfo->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && CanTakeQuest(qInfo, false))
return true;
if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
@@ -13827,7 +13827,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const *pQuest)
bool Player::CanRewardQuest(Quest const *pQuest, bool msg)
{
// not auto complete quest and not completed quest (only cheating case, then ignore without message)
- if (!pQuest->IsAutoComplete() && GetQuestStatus(pQuest->GetQuestId()) != QUEST_STATUS_COMPLETE)
+ if (!pQuest->IsAutoComplete() && !(pQuest->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && GetQuestStatus(pQuest->GetQuestId()) != QUEST_STATUS_COMPLETE)
return false;
// daily quest can't be rewarded (25 daily quest already completed)
diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp
index 525ed05dd25..e41dbfed425 100644
--- a/src/game/QuestDef.cpp
+++ b/src/game/QuestDef.cpp
@@ -44,7 +44,7 @@ Quest::Quest(Field * questRecord)
RequiredMaxRepValue = questRecord[17].GetInt32();
SuggestedPlayers = questRecord[18].GetUInt32();
LimitTime = questRecord[19].GetUInt32();
- QuestFlags = questRecord[20].GetUInt16();
+ QuestFlags = questRecord[20].GetUInt32();
uint32 SpecialFlags = questRecord[21].GetUInt16();
CharTitleId = questRecord[22].GetUInt32();
PlayersSlain = questRecord[23].GetUInt32();
diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp
index c7632cf10f0..a4d1e0dede2 100644
--- a/src/game/QuestHandler.cpp
+++ b/src/game/QuestHandler.cpp
@@ -246,7 +246,10 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
Quest const* pQuest = objmgr.GetQuestTemplate(quest);
if (pQuest)
{
- _player->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, pObject->GetGUID(), true);
+ if (pQuest->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE)
+ _player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, pObject->GetGUID(), _player->CanCompleteQuest(pQuest->GetQuestId()), true);
+ else
+ _player->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, pObject->GetGUID(), true);
}
}