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
This commit is contained in:
click
2010-04-17 17:59:19 +02:00
parent 6e0fa4b39e
commit cc2db574f1
4 changed files with 8 additions and 4 deletions
@@ -0,0 +1 @@
ALTER TABLE `quest_template` CHANGE COLUMN `QuestFlags` `QuestFlags` int(6) unsigned NOT NULL default '0';
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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();
+4 -1
View File
@@ -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);
}
}