feat(Core/SpellMgr): Worldserver option for ICC buff (#2320)
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1570139487119757170');
|
||||||
|
|
||||||
|
DELETE FROM `spell_area` WHERE `area` = 4812 AND `quest_start` = 0 AND `aura_spell` = 0 AND (`racemask` = 690 OR `racemask` = 1101) AND `gender` = 2;
|
||||||
@@ -2621,6 +2621,28 @@ void SpellMgr::LoadSpellAreas()
|
|||||||
++count;
|
++count;
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
|
|
||||||
|
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE) > 0)
|
||||||
|
{
|
||||||
|
sLog->outString(">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
|
||||||
|
SpellArea spellAreaICCBuffHorde = { sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE),ICC_AREA,0,0,0,ICC_RACEMASK_HORDE,Gender(2),64,11,1 };
|
||||||
|
SpellArea const* saICCBuffHorde = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE), spellAreaICCBuffHorde))->second;
|
||||||
|
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffHorde));
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sLog->outString(">> ICC buff Horde: disabled");
|
||||||
|
|
||||||
|
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE) > 0)
|
||||||
|
{
|
||||||
|
sLog->outString(">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
|
||||||
|
SpellArea spellAreaICCBuffAlliance = { sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE),ICC_AREA,0,0,0,ICC_RACEMASK_ALLIANCE,Gender(2),64,11,1 };
|
||||||
|
SpellArea const* saICCBuffAlliance = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE), spellAreaICCBuffAlliance))->second;
|
||||||
|
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffAlliance));
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sLog->outString(">> ICC buff Alliance: disabled");
|
||||||
|
|
||||||
sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||||
sLog->outString();
|
sLog->outString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -491,6 +491,13 @@ class PetAura
|
|||||||
};
|
};
|
||||||
typedef std::map<uint32, PetAura> SpellPetAuraMap;
|
typedef std::map<uint32, PetAura> SpellPetAuraMap;
|
||||||
|
|
||||||
|
enum ICCBuff
|
||||||
|
{
|
||||||
|
ICC_AREA = 4812,
|
||||||
|
ICC_RACEMASK_HORDE = 690,
|
||||||
|
ICC_RACEMASK_ALLIANCE = 1101
|
||||||
|
};
|
||||||
|
|
||||||
struct SpellArea
|
struct SpellArea
|
||||||
{
|
{
|
||||||
uint32 spellId;
|
uint32 spellId;
|
||||||
|
|||||||
@@ -1328,7 +1328,11 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_int_configs[CONFIG_AFK_PREVENT_LOGOUT] = sConfigMgr->GetIntDefault("PreventAFKLogout", 0);
|
m_int_configs[CONFIG_AFK_PREVENT_LOGOUT] = sConfigMgr->GetIntDefault("PreventAFKLogout", 0);
|
||||||
|
|
||||||
// Preload all grids of all non-instanced maps
|
// Preload all grids of all non-instanced maps
|
||||||
m_bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] = sConfigMgr->GetIntDefault("PreloadAllNonInstancedMapGrids", false);
|
m_bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] = sConfigMgr->GetBoolDefault("PreloadAllNonInstancedMapGrids", false);
|
||||||
|
|
||||||
|
// ICC buff override
|
||||||
|
m_int_configs[CONFIG_ICC_BUFF_HORDE] = sConfigMgr->GetIntDefault("ICC.Buff.Horde", 73822);
|
||||||
|
m_int_configs[CONFIG_ICC_BUFF_ALLIANCE] = sConfigMgr->GetIntDefault("ICC.Buff.Alliance", 73828);
|
||||||
|
|
||||||
// call ScriptMgr if we're reloading the configuration
|
// call ScriptMgr if we're reloading the configuration
|
||||||
sScriptMgr->OnAfterConfigLoad(reload);
|
sScriptMgr->OnAfterConfigLoad(reload);
|
||||||
|
|||||||
@@ -342,6 +342,8 @@ enum WorldIntConfigs
|
|||||||
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,
|
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,
|
||||||
CONFIG_INSTANT_TAXI,
|
CONFIG_INSTANT_TAXI,
|
||||||
CONFIG_AFK_PREVENT_LOGOUT,
|
CONFIG_AFK_PREVENT_LOGOUT,
|
||||||
|
CONFIG_ICC_BUFF_HORDE,
|
||||||
|
CONFIG_ICC_BUFF_ALLIANCE,
|
||||||
INT_CONFIG_VALUE_COUNT
|
INT_CONFIG_VALUE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3280,5 +3280,29 @@ Calculate.Gameoject.Zone.Area.Data = 0
|
|||||||
|
|
||||||
LFG.Location.All = 0
|
LFG.Location.All = 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# ICC Buff
|
||||||
|
# Description: Specify ICC buff
|
||||||
|
# (It is necessary to restart the server after changing the values!)
|
||||||
|
# Default: ICC.Buff.Horde = 73822
|
||||||
|
# ICC.Buff.Alliance = 73828
|
||||||
|
#
|
||||||
|
# Spell IDs for the auras:
|
||||||
|
# 73816 - 5% buff Horde
|
||||||
|
# 73818 - 10% buff Horde
|
||||||
|
# 73819 - 15% buff Horde
|
||||||
|
# 73820 - 20% buff Horde
|
||||||
|
# 73821 - 25% buff Horde
|
||||||
|
# 73822 - 30% buff Horde
|
||||||
|
# 73762 - 5% buff Alliance
|
||||||
|
# 73824 - 10% buff Alliance
|
||||||
|
# 73825 - 15% buff Alliance
|
||||||
|
# 73826 - 20% buff Alliance
|
||||||
|
# 73827 - 25% buff Alliance
|
||||||
|
# 73828 - 30% buff Alliance
|
||||||
|
|
||||||
|
ICC.Buff.Horde = 73822
|
||||||
|
ICC.Buff.Alliance = 73828
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user