mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 06:00:10 -04:00
Core/Spells: Named and implemented most of SpellAttr8
This commit is contained in:
@@ -2479,7 +2479,9 @@ void WorldObject::ModSpellDurationTime(SpellInfo const* spellInfo, int32& durati
|
||||
if (!spellInfo || duration < 0)
|
||||
return;
|
||||
|
||||
if (spellInfo->IsChanneled() && !spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC))
|
||||
if (spellInfo->IsChanneled()
|
||||
&& !spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC)
|
||||
&& !spellInfo->HasAttribute(SPELL_ATTR8_MELEE_HASTE_AFFECTS_PERIODIC))
|
||||
return;
|
||||
|
||||
// called from caster
|
||||
@@ -3103,7 +3105,10 @@ bool WorldObject::IsValidAttackTarget(WorldObject const* target, SpellInfo const
|
||||
|
||||
// PvP case - can't attack when attacker or target are in sanctuary
|
||||
// however, 13850 client doesn't allow to attack when one of the unit's has sanctuary flag and is pvp
|
||||
if (unitTarget && unitTarget->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED) && unitOrOwner && unitOrOwner->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED) && (unitTarget->IsInSanctuary() || unitOrOwner->IsInSanctuary()))
|
||||
if (unitTarget && unitTarget->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED)
|
||||
&& unitOrOwner && unitOrOwner->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED)
|
||||
&& (unitTarget->IsInSanctuary() || unitOrOwner->IsInSanctuary())
|
||||
&& (!bySpell || bySpell->HasAttribute(SPELL_ATTR8_IGNORE_SANCTUARY)))
|
||||
return false;
|
||||
|
||||
// additional checks - only PvP case
|
||||
@@ -3210,7 +3215,7 @@ bool WorldObject::IsValidAssistTarget(WorldObject const* target, SpellInfo const
|
||||
return false;
|
||||
|
||||
// can't assist player out of sanctuary from sanctuary if has pvp enabled
|
||||
if (unitTarget->IsPvP())
|
||||
if (unitTarget->IsPvP() && (!bySpell || bySpell->HasAttribute(SPELL_ATTR8_IGNORE_SANCTUARY)))
|
||||
if (unit->IsInSanctuary() && !unitTarget->IsInSanctuary())
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user