Added support for all raid quest types
Added new config option to allow non-raid quest progression when in raid group code by Vladimir --HG-- branch : trunk
This commit is contained in:
@@ -15168,7 +15168,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
|
|||||||
continue;
|
continue;
|
||||||
// just if !ingroup || !noraidgroup || raidgroup
|
// just if !ingroup || !noraidgroup || raidgroup
|
||||||
QuestStatusData& q_status = mQuestStatus[questid];
|
QuestStatusData& q_status = mQuestStatus[questid];
|
||||||
if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->GetType() == QUEST_TYPE_RAID))
|
if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||||
{
|
{
|
||||||
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
|
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
|
||||||
{
|
{
|
||||||
@@ -15451,7 +15451,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// hide quest if player is in raid-group and quest is no raid quest
|
// hide quest if player is in raid-group and quest is no raid quest
|
||||||
if (GetGroup() && GetGroup()->isRaidGroup() && qinfo->GetType() != QUEST_TYPE_RAID)
|
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||||
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
|
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;
|
continue;
|
||||||
|
|
||||||
@@ -21397,7 +21397,7 @@ bool Player::HasQuestForGO(int32 GOId) const
|
|||||||
if (!qinfo)
|
if (!qinfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (GetGroup() && GetGroup()->isRaidGroup() && qinfo->GetType() != QUEST_TYPE_RAID)
|
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ uint32 Quest::XPValue(Player *pPlayer) const
|
|||||||
if (!xpentry)
|
if (!xpentry)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
|
int32 diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
|
||||||
if (diffFactor < 1)
|
if (diffFactor < 1)
|
||||||
diffFactor = 1;
|
diffFactor = 1;
|
||||||
else if (diffFactor > 10)
|
else if (diffFactor > 10)
|
||||||
@@ -204,3 +204,11 @@ int32 Quest::GetRewOrReqMoney() const
|
|||||||
|
|
||||||
return int32(RewOrReqMoney * sWorld.getRate(RATE_DROP_MONEY));
|
return int32(RewOrReqMoney * sWorld.getRate(RATE_DROP_MONEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Quest::IsAllowedInRaid() const
|
||||||
|
{
|
||||||
|
if (IsRaidQuest())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return sWorld.getConfig(CONFIG_QUEST_IGNORE_RAID);
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "Define.h"
|
#include "Define.h"
|
||||||
#include "DatabaseEnv.h"
|
#include "DatabaseEnv.h"
|
||||||
|
#include "SharedDefines.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -244,6 +245,8 @@ class Quest
|
|||||||
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
|
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
|
||||||
bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
|
bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
|
||||||
bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
|
bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
|
||||||
|
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
|
||||||
|
bool IsAllowedInRaid() const;
|
||||||
|
|
||||||
// multiple values
|
// multiple values
|
||||||
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
|
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
|||||||
if (!pOriginalPlayer)
|
if (!pOriginalPlayer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pQuest->GetType() == QUEST_TYPE_RAID)
|
if (pQuest->IsRaidQuest())
|
||||||
{
|
{
|
||||||
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1013,6 +1013,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.HighLevelHideDiff", 7);
|
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.HighLevelHideDiff", 7);
|
||||||
if (m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
|
if (m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
|
||||||
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = MAX_LEVEL;
|
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = MAX_LEVEL;
|
||||||
|
m_configs[CONFIG_QUEST_IGNORE_RAID] = sConfig.GetBoolDefault("Quests.IgnoreRaid", false);
|
||||||
|
|
||||||
m_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfig.GetIntDefault("BattleGround.Random.ResetHour", 6);
|
m_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfig.GetIntDefault("BattleGround.Random.ResetHour", 6);
|
||||||
if (m_configs[CONFIG_RANDOM_BG_RESET_HOUR] < 0 || m_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
|
if (m_configs[CONFIG_RANDOM_BG_RESET_HOUR] < 0 || m_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ enum WorldConfigs
|
|||||||
CONFIG_WORLD_BOSS_LEVEL_DIFF,
|
CONFIG_WORLD_BOSS_LEVEL_DIFF,
|
||||||
CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF,
|
CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF,
|
||||||
CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF,
|
CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF,
|
||||||
|
CONFIG_QUEST_IGNORE_RAID,
|
||||||
CONFIG_DETECT_POS_COLLISION,
|
CONFIG_DETECT_POS_COLLISION,
|
||||||
CONFIG_RESTRICTED_LFG_CHANNEL,
|
CONFIG_RESTRICTED_LFG_CHANNEL,
|
||||||
CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL,
|
CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL,
|
||||||
|
|||||||
@@ -811,6 +811,11 @@ ChatLogTimestamp = 0
|
|||||||
# Default: 7
|
# Default: 7
|
||||||
# -1 (show all available quests marks)
|
# -1 (show all available quests marks)
|
||||||
#
|
#
|
||||||
|
# Quests.IgnoreRaid
|
||||||
|
# Allow non-raid quests to be completed when in raid group
|
||||||
|
# Default: 0 (false)
|
||||||
|
# 1 (true)
|
||||||
|
#
|
||||||
# Guild.EventLogRecordsCount
|
# Guild.EventLogRecordsCount
|
||||||
# Count of guild event log records stored in guild_eventlog table
|
# Count of guild event log records stored in guild_eventlog table
|
||||||
# Increase to store more guild events in table, minimum is 100
|
# Increase to store more guild events in table, minimum is 100
|
||||||
@@ -928,6 +933,7 @@ Instance.ResetTimeHour = 4
|
|||||||
Instance.UnloadDelay = 1800000
|
Instance.UnloadDelay = 1800000
|
||||||
Quests.LowLevelHideDiff = 4
|
Quests.LowLevelHideDiff = 4
|
||||||
Quests.HighLevelHideDiff = 7
|
Quests.HighLevelHideDiff = 7
|
||||||
|
Quests.IgnoreRaid = 0
|
||||||
Guild.EventLogRecordsCount = 100
|
Guild.EventLogRecordsCount = 100
|
||||||
Guild.BankEventLogRecordsCount = 25
|
Guild.BankEventLogRecordsCount = 25
|
||||||
MaxPrimaryTradeSkill = 2
|
MaxPrimaryTradeSkill = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user