mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(Core/Hooks): added collection of hooks to extends AC (#3047)
This collection of hooks comes from the Maelstrom project. It allows to release modules such as : - 3v3-soloqueue - 1v1 arena - pvestats and many others
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "ConditionMgr.h"
|
||||
#include "DBCStores.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@@ -2487,7 +2488,14 @@ SpellInfo const* SpellInfo::GetAuraRankForLevel(uint8 level) const
|
||||
if (!needRankSelection)
|
||||
return this;
|
||||
|
||||
for (SpellInfo const* nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
|
||||
SpellInfo const* nextSpellInfo = nullptr;
|
||||
|
||||
sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
|
||||
|
||||
if (nextSpellInfo != nullptr)
|
||||
return nextSpellInfo;
|
||||
|
||||
for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
|
||||
{
|
||||
// if found appropriate level
|
||||
if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
|
||||
|
||||
Reference in New Issue
Block a user