mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11799] Add HasAuraOfDifficulty to support difficulty spells for HasAura
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
6f156a2583
commit
8b7f3e5245
3 changed files with 12 additions and 1 deletions
|
|
@ -4849,6 +4849,16 @@ bool Unit::HasAura(uint32 spellId, SpellEffectIndex effIndex) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Unit::HasAuraOfDifficulty(uint32 spellId) const
|
||||||
|
{
|
||||||
|
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
||||||
|
if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon())
|
||||||
|
if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
||||||
|
spellId = spellDiffEntry->Id;
|
||||||
|
|
||||||
|
return m_spellAuraHolders.find(spellId) != m_spellAuraHolders.end();
|
||||||
|
}
|
||||||
|
|
||||||
void Unit::AddDynObject(DynamicObject* dynObj)
|
void Unit::AddDynObject(DynamicObject* dynObj)
|
||||||
{
|
{
|
||||||
m_dynObjGUIDs.push_back(dynObj->GetObjectGuid());
|
m_dynObjGUIDs.push_back(dynObj->GetObjectGuid());
|
||||||
|
|
|
||||||
|
|
@ -1421,6 +1421,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
{
|
{
|
||||||
return m_spellAuraHolders.find(spellId) != m_spellAuraHolders.end();
|
return m_spellAuraHolders.find(spellId) != m_spellAuraHolders.end();
|
||||||
}
|
}
|
||||||
|
bool HasAuraOfDifficulty(uint32 spellId) const;
|
||||||
|
|
||||||
bool virtual HasSpell(uint32 /*spellID*/) const { return false; }
|
bool virtual HasSpell(uint32 /*spellID*/) const { return false; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11798"
|
#define REVISION_NR "11799"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue