mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10656] Rename quest function HasFlag to HasQuestFlag
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
a38f97f71c
commit
1210c6d978
7 changed files with 37 additions and 37 deletions
|
|
@ -635,7 +635,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||||
case ACTION_T_QUEST_EVENT:
|
case ACTION_T_QUEST_EVENT:
|
||||||
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event.questId))
|
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event.questId))
|
||||||
{
|
{
|
||||||
if (!qid->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!qid->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -677,7 +677,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||||
case ACTION_T_QUEST_EVENT_ALL:
|
case ACTION_T_QUEST_EVENT_ALL:
|
||||||
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event_all.questId))
|
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event_all.questId))
|
||||||
{
|
{
|
||||||
if (!qid->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!qid->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, ObjectGuid npcG
|
||||||
data << uint32(pQuest->GetSuggestedPlayers());
|
data << uint32(pQuest->GetSuggestedPlayers());
|
||||||
data << uint8(0); // IsFinished? value is sent back to server in quest accept packet
|
data << uint8(0); // IsFinished? value is sent back to server in quest accept packet
|
||||||
|
|
||||||
if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
if (pQuest->HasQuestFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
||||||
{
|
{
|
||||||
data << uint32(0); // Rewarded chosen items hidden
|
data << uint32(0); // Rewarded chosen items hidden
|
||||||
data << uint32(0); // Rewarded items hidden
|
data << uint32(0); // Rewarded items hidden
|
||||||
|
|
@ -618,7 +618,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
||||||
data << uint32(pQuest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0
|
data << uint32(pQuest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0
|
||||||
data << uint32(pQuest->GetRewXPId()); // column index in QuestXP.dbc (row based on quest level)
|
data << uint32(pQuest->GetRewXPId()); // column index in QuestXP.dbc (row based on quest level)
|
||||||
|
|
||||||
if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
if (pQuest->HasQuestFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
||||||
data << uint32(0); // Hide money rewarded
|
data << uint32(0); // Hide money rewarded
|
||||||
else
|
else
|
||||||
data << uint32(pQuest->GetRewOrReqMoney()); // reward money (below max lvl)
|
data << uint32(pQuest->GetRewOrReqMoney()); // reward money (below max lvl)
|
||||||
|
|
@ -641,7 +641,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
||||||
|
|
||||||
int iI;
|
int iI;
|
||||||
|
|
||||||
if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
if (pQuest->HasQuestFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
||||||
{
|
{
|
||||||
for (iI = 0; iI < QUEST_REWARDS_COUNT; ++iI)
|
for (iI = 0; iI < QUEST_REWARDS_COUNT; ++iI)
|
||||||
data << uint32(0) << uint32(0);
|
data << uint32(0) << uint32(0);
|
||||||
|
|
|
||||||
|
|
@ -3962,7 +3962,7 @@ void ObjectMgr::LoadQuests()
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
if (!qinfo->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!qinfo->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and ReqCreatureOrGOId%d = 0, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT. Quest flags or ReqCreatureOrGOId%d must be fixed, quest modified to enable objective.",spellInfo->Id,qinfo->QuestId,j+1,j+1);
|
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and ReqCreatureOrGOId%d = 0, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT. Quest flags or ReqCreatureOrGOId%d must be fixed, quest modified to enable objective.",spellInfo->Id,qinfo->QuestId,j+1,j+1);
|
||||||
|
|
||||||
|
|
@ -4228,7 +4228,7 @@ void ObjectMgr::LoadQuests()
|
||||||
if (!quest)
|
if (!quest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!quest->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!quest->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u , but quest does not have SpecialFlags QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT (2) set. Quest SpecialFlags should be corrected to enable this objective.", spellInfo->Id, quest_id);
|
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u , but quest does not have SpecialFlags QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT (2) set. Quest SpecialFlags should be corrected to enable this objective.", spellInfo->Id, quest_id);
|
||||||
|
|
||||||
|
|
@ -4517,7 +4517,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quest->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!quest->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.", tablename, tmp.questExplored.questId, tmp.id);
|
sLog.outErrorDb("Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.", tablename, tmp.questExplored.questId, tmp.id);
|
||||||
|
|
||||||
|
|
@ -5424,7 +5424,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quest->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
if (!quest->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.",trigger_ID,quest_ID);
|
sLog.outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.",trigger_ID,quest_ID);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13324,7 +13324,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// only used for "flag" quests and not real in-game quests
|
// only used for "flag" quests and not real in-game quests
|
||||||
if (qInfo->HasFlag(QUEST_FLAGS_AUTO_REWARDED))
|
if (qInfo->HasQuestFlag(QUEST_FLAGS_AUTO_REWARDED))
|
||||||
{
|
{
|
||||||
// a few checks, not all "satisfy" is needed
|
// a few checks, not all "satisfy" is needed
|
||||||
if (SatisfyQuestPreviousQuest(qInfo, false) && SatisfyQuestLevel(qInfo, false) &&
|
if (SatisfyQuestPreviousQuest(qInfo, false) && SatisfyQuestLevel(qInfo, false) &&
|
||||||
|
|
@ -13344,7 +13344,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
||||||
// incomplete quest have status data
|
// incomplete quest have status data
|
||||||
QuestStatusData const& q_status = q_itr->second;
|
QuestStatusData const& q_status = q_itr->second;
|
||||||
|
|
||||||
if (qInfo->HasFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -13353,7 +13353,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qInfo->HasFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO))
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -13365,10 +13365,10 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qInfo->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT) && !q_status.m_explored)
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT) && !q_status.m_explored)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (qInfo->HasFlag(QUEST_MANGOS_FLAGS_TIMED) && q_status.m_timer == 0)
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED) && q_status.m_timer == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (qInfo->GetRewOrReqMoney() < 0)
|
if (qInfo->GetRewOrReqMoney() < 0)
|
||||||
|
|
@ -13392,7 +13392,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const *pQuest) const
|
||||||
if (!CanTakeQuest(pQuest, false))
|
if (!CanTakeQuest(pQuest, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (pQuest->HasFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||||
if (pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i], pQuest->ReqItemCount[i]))
|
if (pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i], pQuest->ReqItemCount[i]))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -13418,7 +13418,7 @@ bool Player::CanRewardQuest(Quest const *pQuest, bool msg) const
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// prevent receive reward with quest items in bank
|
// prevent receive reward with quest items in bank
|
||||||
if (pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ))
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -13501,13 +13501,13 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
||||||
questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
|
questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
|
||||||
questStatusData.m_explored = false;
|
questStatusData.m_explored = false;
|
||||||
|
|
||||||
if ( pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||||
questStatusData.m_itemcount[i] = 0;
|
questStatusData.m_itemcount[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pQuest->HasFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO) )
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
questStatusData.m_creatureOrGOcount[i] = 0;
|
questStatusData.m_creatureOrGOcount[i] = 0;
|
||||||
|
|
@ -13522,7 +13522,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
||||||
GetReputationMgr().SetVisible(factionEntry);
|
GetReputationMgr().SetVisible(factionEntry);
|
||||||
|
|
||||||
uint32 qtime = 0;
|
uint32 qtime = 0;
|
||||||
if( pQuest->HasFlag( QUEST_MANGOS_FLAGS_TIMED ) )
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||||
{
|
{
|
||||||
uint32 limittime = pQuest->GetLimitTime();
|
uint32 limittime = pQuest->GetLimitTime();
|
||||||
|
|
||||||
|
|
@ -13574,7 +13574,7 @@ void Player::CompleteQuest(uint32 quest_id)
|
||||||
|
|
||||||
if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
|
if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
|
||||||
{
|
{
|
||||||
if (qInfo->HasFlag(QUEST_FLAGS_AUTO_REWARDED))
|
if (qInfo->HasQuestFlag(QUEST_FLAGS_AUTO_REWARDED))
|
||||||
RewardQuest(qInfo, 0, this, false);
|
RewardQuest(qInfo, 0, this, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13765,7 +13765,7 @@ void Player::FailQuest(uint32 questId)
|
||||||
SetQuestSlotState(log_slot, QUEST_STATE_FAIL);
|
SetQuestSlotState(log_slot, QUEST_STATE_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pQuest->HasFlag(QUEST_MANGOS_FLAGS_TIMED))
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||||
{
|
{
|
||||||
QuestStatusData& q_status = mQuestStatus[questId];
|
QuestStatusData& q_status = mQuestStatus[questId];
|
||||||
|
|
||||||
|
|
@ -13995,7 +13995,7 @@ bool Player::SatisfyQuestStatus(Quest const* qInfo, bool msg) const
|
||||||
|
|
||||||
bool Player::SatisfyQuestTimed(Quest const* qInfo, bool msg) const
|
bool Player::SatisfyQuestTimed(Quest const* qInfo, bool msg) const
|
||||||
{
|
{
|
||||||
if (!m_timedquests.empty() && qInfo->HasFlag(QUEST_MANGOS_FLAGS_TIMED))
|
if (!m_timedquests.empty() && qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||||
{
|
{
|
||||||
if (msg)
|
if (msg)
|
||||||
SendCanTakeQuestResponse(INVALIDREASON_QUEST_ONLY_ONE_TIMED);
|
SendCanTakeQuestResponse(INVALIDREASON_QUEST_ONLY_ONE_TIMED);
|
||||||
|
|
@ -14251,7 +14251,7 @@ QuestStatus Player::GetQuestStatus( uint32 quest_id ) const
|
||||||
bool Player::CanShareQuest(uint32 quest_id) const
|
bool Player::CanShareQuest(uint32 quest_id) const
|
||||||
{
|
{
|
||||||
if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
|
if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
|
||||||
if (qInfo->HasFlag(QUEST_FLAGS_SHARABLE))
|
if (qInfo->HasQuestFlag(QUEST_FLAGS_SHARABLE))
|
||||||
return IsCurrentQuest(quest_id);
|
return IsCurrentQuest(quest_id);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -14288,7 +14288,7 @@ uint32 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
|
||||||
|
|
||||||
void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& questStatusData )
|
void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& questStatusData )
|
||||||
{
|
{
|
||||||
if ( pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
{
|
{
|
||||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -14369,7 +14369,7 @@ void Player::ItemAddedQuestCheck( uint32 entry, uint32 count )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
||||||
if( !qInfo || !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
if (!qInfo || !qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
||||||
|
|
@ -14406,7 +14406,7 @@ void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
|
||||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
||||||
if ( !qInfo )
|
if ( !qInfo )
|
||||||
continue;
|
continue;
|
||||||
if( !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
if (!qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
||||||
|
|
@ -14464,7 +14464,7 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
|
||||||
QuestStatusData& q_status = mQuestStatus[questid];
|
QuestStatusData& q_status = mQuestStatus[questid];
|
||||||
if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||||
{
|
{
|
||||||
if (qInfo->HasFlag( QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
||||||
{
|
{
|
||||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||||
{
|
{
|
||||||
|
|
@ -14518,10 +14518,10 @@ void Player::CastedCreatureOrGO( uint32 entry, ObjectGuid guid, uint32 spell_id,
|
||||||
if (!qInfo)
|
if (!qInfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!original_caster && !qInfo->HasFlag(QUEST_FLAGS_SHARABLE))
|
if (!original_caster && !qInfo->HasQuestFlag(QUEST_FLAGS_SHARABLE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!qInfo->HasFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
if (!qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QuestStatusData& q_status = mQuestStatus[questid];
|
QuestStatusData& q_status = mQuestStatus[questid];
|
||||||
|
|
@ -14593,7 +14593,7 @@ void Player::TalkedToCreature( uint32 entry, ObjectGuid guid )
|
||||||
|
|
||||||
if ( q_status.m_status == QUEST_STATUS_INCOMPLETE )
|
if ( q_status.m_status == QUEST_STATUS_INCOMPLETE )
|
||||||
{
|
{
|
||||||
if( qInfo->HasFlag( QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO ) )
|
if (qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO))
|
||||||
{
|
{
|
||||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||||
{
|
{
|
||||||
|
|
@ -16159,7 +16159,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
||||||
|
|
||||||
time_t quest_time = time_t(fields[4].GetUInt64());
|
time_t quest_time = time_t(fields[4].GetUInt64());
|
||||||
|
|
||||||
if( pQuest->HasFlag( QUEST_MANGOS_FLAGS_TIMED ) && !GetQuestRewardStatus(quest_id) && questStatusData.m_status != QUEST_STATUS_NONE )
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED) && !GetQuestRewardStatus(quest_id) && questStatusData.m_status != QUEST_STATUS_NONE)
|
||||||
{
|
{
|
||||||
AddTimedQuest( quest_id );
|
AddTimedQuest( quest_id );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ class Quest
|
||||||
Quest(Field * questRecord);
|
Quest(Field * questRecord);
|
||||||
uint32 XPValue( Player *pPlayer ) const;
|
uint32 XPValue( Player *pPlayer ) const;
|
||||||
|
|
||||||
bool HasFlag( uint32 flag ) const { return ( QuestFlags & flag ) != 0; }
|
bool HasQuestFlag(uint32 flag) const { return (QuestFlags & flag) != 0; }
|
||||||
void SetFlag( uint32 flag ) { QuestFlags |= flag; }
|
void SetFlag( uint32 flag ) { QuestFlags |= flag; }
|
||||||
|
|
||||||
// table data accessors:
|
// table data accessors:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
_player->AddQuest( qInfo, pObject );
|
_player->AddQuest( qInfo, pObject );
|
||||||
|
|
||||||
if (qInfo->HasFlag(QUEST_FLAGS_PARTY_ACCEPT))
|
if (qInfo->HasQuestFlag(QUEST_FLAGS_PARTY_ACCEPT))
|
||||||
{
|
{
|
||||||
if (Group* pGroup = _player->GetGroup())
|
if (Group* pGroup = _player->GetGroup())
|
||||||
{
|
{
|
||||||
|
|
@ -382,7 +382,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
|
||||||
|
|
||||||
if (const Quest *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
if (const Quest *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||||
{
|
{
|
||||||
if (pQuest->HasFlag(QUEST_MANGOS_FLAGS_TIMED))
|
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||||
_player->RemoveTimedQuest(quest);
|
_player->RemoveTimedQuest(quest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -404,7 +404,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||||
|
|
||||||
if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
|
if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||||
{
|
{
|
||||||
if (!pQuest->HasFlag(QUEST_FLAGS_PARTY_ACCEPT))
|
if (!pQuest->HasQuestFlag(QUEST_FLAGS_PARTY_ACCEPT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player* pOriginalPlayer = ObjectAccessor::FindPlayer(_player->GetDivider());
|
Player* pOriginalPlayer = ObjectAccessor::FindPlayer(_player->GetDivider());
|
||||||
|
|
@ -619,7 +619,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
||||||
}
|
}
|
||||||
else if (pPlayer->getLevel() <= pPlayer->GetQuestLevelForPlayer(pQuest) + sWorld.getConfig(CONFIG_UINT32_QUEST_LOW_LEVEL_HIDE_DIFF))
|
else if (pPlayer->getLevel() <= pPlayer->GetQuestLevelForPlayer(pQuest) + sWorld.getConfig(CONFIG_UINT32_QUEST_LOW_LEVEL_HIDE_DIFF))
|
||||||
{
|
{
|
||||||
if (pQuest->HasFlag(QUEST_FLAGS_DAILY) || pQuest->HasFlag(QUEST_FLAGS_WEEKLY))
|
if (pQuest->HasQuestFlag(QUEST_FLAGS_DAILY) || pQuest->HasQuestFlag(QUEST_FLAGS_WEEKLY))
|
||||||
dialogStatusNew = DIALOG_STATUS_AVAILABLE_REP;
|
dialogStatusNew = DIALOG_STATUS_AVAILABLE_REP;
|
||||||
else
|
else
|
||||||
dialogStatusNew = DIALOG_STATUS_AVAILABLE;
|
dialogStatusNew = DIALOG_STATUS_AVAILABLE;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10655"
|
#define REVISION_NR "10656"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue