mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Adding atrribute custom SPELL_ATTR0_CU_LIQUID_AURA
This commit is contained in:
@@ -992,6 +992,10 @@ bool Aura::CanBeSaved() const
|
||||
return false;
|
||||
}
|
||||
|
||||
// don't save liquid auras
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_LIQUID_AURA))
|
||||
return false;
|
||||
|
||||
// Can't be saved - aura handler relies on calculated amount and changes it
|
||||
if (HasEffectType(SPELL_AURA_CONVERT_RUNE))
|
||||
return false;
|
||||
@@ -1040,11 +1044,6 @@ bool Aura::CanBeSaved() const
|
||||
if (GetCastItemGUID() && IsPermanent())
|
||||
return false;
|
||||
|
||||
// don't save liquid auras
|
||||
for (LiquidTypeEntry const* liquid : sLiquidTypeStore)
|
||||
if (liquid->SpellId && liquid->SpellId == GetId())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ enum SpellCustomAttributes
|
||||
SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER = 0x00010000,
|
||||
SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET = 0x00020000,
|
||||
SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET = 0x00040000,
|
||||
SPELL_ATTR0_CU_LIQUID_AURA = 0x00400000,
|
||||
|
||||
SPELL_ATTR0_CU_NEGATIVE = SPELL_ATTR0_CU_NEGATIVE_EFF0 | SPELL_ATTR0_CU_NEGATIVE_EFF1 | SPELL_ATTR0_CU_NEGATIVE_EFF2
|
||||
};
|
||||
|
||||
@@ -2809,6 +2809,12 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
|
||||
spellInfo->_InitializeExplicitTargetMask();
|
||||
}
|
||||
|
||||
// add attribute custom to liquid auras
|
||||
for (LiquidTypeEntry const* liquid : sLiquidTypeStore)
|
||||
if (liquid->SpellId)
|
||||
if (spellInfo = _GetSpellInfo(liquid->SpellId))
|
||||
spellInfo->AttributesCu |= SPELL_ATTR0_CU_LIQUID_AURA;
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user