mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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
|
|
@ -13324,7 +13324,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
|||
return false;
|
||||
|
||||
// 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
|
||||
if (SatisfyQuestPreviousQuest(qInfo, false) && SatisfyQuestLevel(qInfo, false) &&
|
||||
|
|
@ -13344,7 +13344,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const
|
|||
// incomplete quest have status data
|
||||
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)
|
||||
{
|
||||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -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;
|
||||
|
||||
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;
|
||||
|
||||
if (qInfo->GetRewOrReqMoney() < 0)
|
||||
|
|
@ -13392,7 +13392,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const *pQuest) const
|
|||
if (!CanTakeQuest(pQuest, 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)
|
||||
if (pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i], pQuest->ReqItemCount[i]))
|
||||
return false;
|
||||
|
|
@ -13418,7 +13418,7 @@ bool Player::CanRewardQuest(Quest const *pQuest, bool msg) const
|
|||
return false;
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -13501,13 +13501,13 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
|||
questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
|
||||
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)
|
||||
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)
|
||||
questStatusData.m_creatureOrGOcount[i] = 0;
|
||||
|
|
@ -13522,7 +13522,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
|||
GetReputationMgr().SetVisible(factionEntry);
|
||||
|
||||
uint32 qtime = 0;
|
||||
if( pQuest->HasFlag( QUEST_MANGOS_FLAGS_TIMED ) )
|
||||
if (pQuest->HasQuestFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||
{
|
||||
uint32 limittime = pQuest->GetLimitTime();
|
||||
|
||||
|
|
@ -13574,7 +13574,7 @@ void Player::CompleteQuest(uint32 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -13765,7 +13765,7 @@ void Player::FailQuest(uint32 questId)
|
|||
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];
|
||||
|
||||
|
|
@ -13995,7 +13995,7 @@ bool Player::SatisfyQuestStatus(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)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_QUEST_ONLY_ONE_TIMED);
|
||||
|
|
@ -14251,7 +14251,7 @@ QuestStatus Player::GetQuestStatus( uint32 quest_id ) const
|
|||
bool Player::CanShareQuest(uint32 quest_id) const
|
||||
{
|
||||
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 false;
|
||||
|
|
@ -14288,7 +14288,7 @@ uint32 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
@ -14369,7 +14369,7 @@ void Player::ItemAddedQuestCheck( uint32 entry, uint32 count )
|
|||
continue;
|
||||
|
||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
||||
if( !qInfo || !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
if (!qInfo || !qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||
continue;
|
||||
|
||||
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);
|
||||
if ( !qInfo )
|
||||
continue;
|
||||
if( !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
if (!qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_DELIVER))
|
||||
continue;
|
||||
|
||||
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];
|
||||
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)
|
||||
{
|
||||
|
|
@ -14518,10 +14518,10 @@ void Player::CastedCreatureOrGO( uint32 entry, ObjectGuid guid, uint32 spell_id,
|
|||
if (!qInfo)
|
||||
continue;
|
||||
|
||||
if (!original_caster && !qInfo->HasFlag(QUEST_FLAGS_SHARABLE))
|
||||
if (!original_caster && !qInfo->HasQuestFlag(QUEST_FLAGS_SHARABLE))
|
||||
continue;
|
||||
|
||||
if (!qInfo->HasFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
||||
if (!qInfo->HasQuestFlag(QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
||||
continue;
|
||||
|
||||
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( 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)
|
||||
{
|
||||
|
|
@ -16159,7 +16159,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
|||
|
||||
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 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue