Core/Quests: Added support for 10/25 man only raid quests
This commit is contained in:
1 parent
6b7716a7e7
commit
75e7cf7eb5
4 files changed
+27
-18
No files matched your search
@@ -16036,7 +16036,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
|
||||
continue;
|
||||
// just if !ingroup || !noraidgroup || raidgroup
|
||||
QuestStatusData& q_status = m_QuestStatus[questid];
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty())))
|
||||
{
|
||||
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
|
||||
{
|
||||
@@ -16091,7 +16091,7 @@ void Player::KilledPlayerCredit()
|
||||
continue;
|
||||
// just if !ingroup || !noraidgroup || raidgroup
|
||||
QuestStatusData& q_status = m_QuestStatus[questid];
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty())))
|
||||
{
|
||||
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
|
||||
{
|
||||
@@ -16359,7 +16359,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
||||
continue;
|
||||
|
||||
// hide quest if player is in raid-group and quest is no raid quest
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid(GetMap()->GetDifficulty()))
|
||||
if (!InBattleground()) //there are two ways.. we can make every bg-quest a raidquest, or add this code here.. i don't know if this can be exploited by other quests, but i think all other quests depend on a specific area.. but keep this in mind, if something strange happens later
|
||||
continue;
|
||||
|
||||
@@ -22767,7 +22767,7 @@ bool Player::HasQuestForGO(int32 GOId) const
|
||||
if (!qinfo)
|
||||
continue;
|
||||
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid(GetMap()->GetDifficulty()))
|
||||
continue;
|
||||
|
||||
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||
|
||||
@@ -461,16 +461,8 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
||||
if (!pOriginalPlayer)
|
||||
return;
|
||||
|
||||
if (quest->IsRaidQuest())
|
||||
{
|
||||
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_player->IsInSameGroupWith(pOriginalPlayer))
|
||||
return;
|
||||
}
|
||||
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
||||
return;
|
||||
|
||||
if (_player->CanAddQuest(quest, true))
|
||||
_player->AddQuest(quest, NULL); // NULL, this prevent DB script from duplicate running
|
||||
|
||||
@@ -219,9 +219,26 @@ bool Quest::IsAutoComplete() const
|
||||
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE));
|
||||
}
|
||||
|
||||
bool Quest::IsAllowedInRaid() const
|
||||
bool Quest::IsRaidQuest(Difficulty difficulty) const
|
||||
{
|
||||
if (IsRaidQuest())
|
||||
switch (Type)
|
||||
{
|
||||
case QUEST_TYPE_RAID:
|
||||
return true;
|
||||
case QUEST_TYPE_RAID_10:
|
||||
return !(difficulty & RAID_DIFFICULTY_MASK_25MAN);
|
||||
case QUEST_TYPE_RAID_25:
|
||||
return difficulty & RAID_DIFFICULTY_MASK_25MAN;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Quest::IsAllowedInRaid(Difficulty difficulty) const
|
||||
{
|
||||
if (IsRaidQuest(difficulty))
|
||||
return true;
|
||||
|
||||
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);
|
||||
|
||||
@@ -254,8 +254,8 @@ class Quest
|
||||
bool IsMonthly() const { return Flags & QUEST_TRINITY_FLAGS_MONTHLY; }
|
||||
bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
|
||||
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
|
||||
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
|
||||
bool IsAllowedInRaid() const;
|
||||
bool IsRaidQuest(Difficulty difficulty) const;
|
||||
bool IsAllowedInRaid(Difficulty difficulty) const;
|
||||
bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }
|
||||
uint32 CalculateHonorGain(uint8 level) const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user