mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
feat(Core/SpellMgr): Worldserver option for ICC buff (#2320)
This commit is contained in:
@@ -2621,6 +2621,28 @@ void SpellMgr::LoadSpellAreas()
|
||||
++count;
|
||||
} 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();
|
||||
}
|
||||
|
||||
@@ -491,6 +491,13 @@ class PetAura
|
||||
};
|
||||
typedef std::map<uint32, PetAura> SpellPetAuraMap;
|
||||
|
||||
enum ICCBuff
|
||||
{
|
||||
ICC_AREA = 4812,
|
||||
ICC_RACEMASK_HORDE = 690,
|
||||
ICC_RACEMASK_ALLIANCE = 1101
|
||||
};
|
||||
|
||||
struct SpellArea
|
||||
{
|
||||
uint32 spellId;
|
||||
|
||||
Reference in New Issue
Block a user