refactor(Core/Misc): Define & Rename Attributes (#5311)
This commit is contained in:
parent
0a571973d7
commit
5954d9c739
@ -690,7 +690,7 @@ bool PetAI::CanAttack(Unit* target, const SpellInfo* spellInfo)
|
||||
return me->GetCharmInfo()->IsCommandAttack();
|
||||
|
||||
// CC - mobs under crowd control can be attacked if owner commanded
|
||||
if (target->HasBreakableByDamageCrowdControlAura() && (!spellInfo || !spellInfo->HasAttribute(SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS)))
|
||||
if (target->HasBreakableByDamageCrowdControlAura() && (!spellInfo || !spellInfo->HasAttribute(SPELL_ATTR4_REACTIVE_DAMAGE_PROC)))
|
||||
return me->GetCharmInfo()->IsCommandAttack();
|
||||
|
||||
// Returning - pets ignore attacks only if owner clicked follow
|
||||
|
||||
@ -139,7 +139,7 @@ void UnitAI::DoCast(uint32 spellId)
|
||||
case AITARGET_ENEMY:
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_TARGET_PLAYERS);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER);
|
||||
//float range = GetSpellMaxRange(spellInfo, false);
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, spellInfo->GetMaxRange(false), playerOnly);
|
||||
break;
|
||||
@ -153,7 +153,7 @@ void UnitAI::DoCast(uint32 spellId)
|
||||
case AITARGET_DEBUFF:
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_TARGET_PLAYERS);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER);
|
||||
float range = spellInfo->GetMaxRange(false);
|
||||
|
||||
DefaultTargetSelector targetSelector(me, range, playerOnly, -(int32)spellId);
|
||||
@ -209,7 +209,7 @@ void UnitAI::FillAISpellInfo()
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_DEAD))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_ALLOW_CAST_WHILE_DEAD))
|
||||
AIInfo->condition = AICOND_DIE;
|
||||
else if (spellInfo->IsPassive() || spellInfo->GetDuration() == -1)
|
||||
AIInfo->condition = AICOND_AGGRO;
|
||||
|
||||
@ -194,7 +194,7 @@ namespace ArenaSpectator
|
||||
|
||||
bool ShouldSendAura(Aura* aura, uint8 effMask, ObjectGuid targetGUID, bool remove)
|
||||
{
|
||||
if (aura->GetSpellInfo()->SpellIconID == 1 || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR))
|
||||
if (aura->GetSpellInfo()->SpellIconID == 1 || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR1_NO_AURA_ICON))
|
||||
return false;
|
||||
|
||||
if (remove || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_AURA_CC) || aura->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_GENERIC)
|
||||
|
||||
@ -539,7 +539,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
if (!aura->IsPermanent()
|
||||
&& aura->GetDuration() <= 30 * IN_MILLISECONDS
|
||||
&& aurApp->IsPositive()
|
||||
// && (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)) Xinef: bullshit condition, ALL buffs should be removed
|
||||
// && (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES)) Xinef: bullshit condition, ALL buffs should be removed
|
||||
&& (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
|
||||
player->RemoveAura(iter);
|
||||
else
|
||||
|
||||
@ -307,7 +307,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
ChatLink::ValidateName(buffer, context);
|
||||
|
||||
// spells with that flag have a prefix of "$PROFESSION: "
|
||||
if (_spell->HasAttribute(SPELL_ATTR0_TRADESPELL))
|
||||
if (_spell->HasAttribute(SPELL_ATTR0_IS_TRADESKILL))
|
||||
{
|
||||
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(_spell->Id);
|
||||
if (bounds.first == bounds.second)
|
||||
|
||||
@ -115,7 +115,7 @@ namespace DisableMgr
|
||||
if (flags & SPELL_DISABLE_LOS)
|
||||
{
|
||||
SpellInfo* spellInfo = const_cast<SpellInfo*>(sSpellMgr->GetSpellInfo(entry));
|
||||
spellInfo->AttributesEx2 |= SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS;
|
||||
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -3085,8 +3085,9 @@ void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target)
|
||||
return;
|
||||
|
||||
_focusSpell = focusSpell;
|
||||
|
||||
SetGuidValue(UNIT_FIELD_TARGET, this == target ? ObjectGuid::Empty : target->GetGUID());
|
||||
if (focusSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST))
|
||||
if (focusSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AI_DOESNT_FACE_TARGET))
|
||||
AddUnitState(UNIT_STATE_ROTATING);
|
||||
|
||||
// Set serverside orientation if needed (needs to be after attribute check)
|
||||
@ -3118,7 +3119,7 @@ void Creature::ReleaseFocus(Spell const* focusSpell)
|
||||
else
|
||||
SetGuidValue(UNIT_FIELD_TARGET, ObjectGuid::Empty);
|
||||
|
||||
if (focusSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST))
|
||||
if (focusSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AI_DOESNT_FACE_TARGET))
|
||||
ClearUnitState(UNIT_STATE_ROTATING);
|
||||
}
|
||||
|
||||
|
||||
@ -1361,11 +1361,11 @@ void Pet::_SaveAuras(SQLTransaction& trans, bool logout)
|
||||
continue;
|
||||
|
||||
// pussywizard: don't save auras that cannot be cancelled (needed for ICC buff on pets/summons)
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_CANT_CANCEL))
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_AURA_CANCEL))
|
||||
continue;
|
||||
|
||||
// xinef: don't save hidden auras
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR))
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR1_NO_AURA_ICON))
|
||||
continue;
|
||||
|
||||
// Xinef: Dont save auras with model change
|
||||
|
||||
@ -3873,7 +3873,7 @@ void Player::_addTalentAurasAndSpells(uint32 spellId)
|
||||
if (spellInfo->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL && !sSpellMgr->IsAdditionalTalentSpell(spellInfo->Effects[i].TriggerSpell))
|
||||
_addSpell(spellInfo->Effects[i].TriggerSpell, SPEC_MASK_ALL, true);
|
||||
}
|
||||
else if (spellInfo->IsPassive() || (spellInfo->HasAttribute(SPELL_ATTR0_HIDDEN_CLIENTSIDE) && spellInfo->Stances))
|
||||
else if (spellInfo->IsPassive() || (spellInfo->HasAttribute(SPELL_ATTR0_DO_NOT_DISPLAY) && spellInfo->Stances))
|
||||
{
|
||||
if (IsNeedCastPassiveSpellAtLearn(spellInfo))
|
||||
CastSpell(this, spellId, true);
|
||||
@ -3960,7 +3960,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
|
||||
// xinef: send packet so client can properly recognize this new spell
|
||||
// xinef: ignore passive spells and spells with learn effect
|
||||
// xinef: send spells with no aura effects (ie dual wield)
|
||||
if (IsInWorld() && !isBeingLoaded() && temporary && (learnFromSkill || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)) || !spellInfo->HasAnyAura()) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL))
|
||||
if (IsInWorld() && !isBeingLoaded() && temporary && (learnFromSkill || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)) || !spellInfo->HasAnyAura()) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL))
|
||||
SendLearnPacket(spellInfo->Id, true);
|
||||
|
||||
// xinef: DO NOT allow to learn spell with effect learn spell!
|
||||
@ -4030,7 +4030,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
|
||||
//ABORT();
|
||||
}
|
||||
// pussywizard: cast passive spells (including all talents without SPELL_EFFECT_LEARN_SPELL) with additional checks
|
||||
else if (spellInfo->IsPassive() || (spellInfo->HasAttribute(SPELL_ATTR0_HIDDEN_CLIENTSIDE) && spellInfo->Stances))
|
||||
else if (spellInfo->IsPassive() || (spellInfo->HasAttribute(SPELL_ATTR0_DO_NOT_DISPLAY) && spellInfo->Stances))
|
||||
{
|
||||
if (IsNeedCastPassiveSpellAtLearn(spellInfo))
|
||||
CastSpell(this, spellId, true);
|
||||
@ -4134,7 +4134,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const
|
||||
// talent dependent passives activated at form apply have proper stance data
|
||||
ShapeshiftForm form = GetShapeshiftForm();
|
||||
return (!spellInfo->Stances || (form && (spellInfo->Stances & (1 << (form - 1)))) ||
|
||||
(!form && spellInfo->HasAttribute(SPELL_ATTR2_NOT_NEED_SHAPESHIFT)));
|
||||
(!form && spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED)));
|
||||
}
|
||||
|
||||
void Player::learnSpell(uint32 spellId)
|
||||
@ -4318,7 +4318,7 @@ void Player::removeSpell(uint32 spellId, uint8 removeSpecMask, bool onlyTemporar
|
||||
}
|
||||
|
||||
// pussywizard: remove from spell book (can't be replaced by previous rank, because such spells can't be unlearnt)
|
||||
if (!onlyTemporary || ((!spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)) || !spellInfo->HasAnyAura()) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL)))
|
||||
if (!onlyTemporary || ((!spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)) || !spellInfo->HasAnyAura()) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL)))
|
||||
{
|
||||
sScriptMgr->OnPlayerForgotSpell(this, spellId);
|
||||
SendLearnPacket(spellId, false);
|
||||
@ -4393,7 +4393,7 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
|
||||
if (!spellInfo) // xinef: impossibru...
|
||||
continue;
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_USABLE_IN_ARENA))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS))
|
||||
RemoveSpellCooldown(itr->first, true);
|
||||
else if (spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS && itr->second.end < infTime// xinef: dont remove active cooldowns - bugz
|
||||
&& itr->second.maxduration < 10 * MINUTE * IN_MILLISECONDS) // xinef: dont clear cooldowns that have maxduration > 10 minutes (eg item cooldowns with no spell.dbc cooldown info)
|
||||
@ -7073,7 +7073,7 @@ void Player::CheckAreaExploreAndOutdoor()
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
|
||||
RemoveAurasWithAttribute(SPELL_ATTR0_OUTDOORS_ONLY);
|
||||
RemoveAurasWithAttribute(SPELL_ATTR0_ONLY_OUTDOORS);
|
||||
|
||||
if (!sScriptMgr->CanAreaExploreAndOutdoor(this))
|
||||
return;
|
||||
@ -18842,7 +18842,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
|
||||
}
|
||||
|
||||
// negative effects should continue counting down after logout
|
||||
if (remaintime != -1 && ((!spellInfo->IsPositive() && spellInfo->Id != 15007) || spellInfo->HasAttribute(SPELL_ATTR4_FADES_WHILE_LOGGED_OUT))) // Xinef: resurrection sickness should not tick when logged off
|
||||
if (remaintime != -1 && ((!spellInfo->IsPositive() && spellInfo->Id != 15007) || spellInfo->HasAttribute(SPELL_ATTR4_AURA_EXPIRES_OFFLINE))) // Xinef: resurrection sickness should not tick when logged off
|
||||
{
|
||||
if (remaintime / IN_MILLISECONDS <= int32(timediff))
|
||||
continue;
|
||||
@ -22988,7 +22988,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
|
||||
if (rec > 0)
|
||||
ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, rec, spell);
|
||||
|
||||
if (catrec > 0 && !spellInfo->HasAttribute(SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS))
|
||||
if (catrec > 0 && !spellInfo->HasAttribute(SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS))
|
||||
ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, catrec, spell);
|
||||
|
||||
if (int32 cooldownMod = GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN))
|
||||
@ -23996,7 +23996,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
|
||||
continue;
|
||||
|
||||
// xinef: dont apply eqiup cooldown for spells with this attribute
|
||||
if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR0_CANT_USED_IN_COMBAT))
|
||||
if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL))
|
||||
continue;
|
||||
|
||||
AddSpellCooldown(spellData.SpellId, pItem->GetEntry(), 30 * IN_MILLISECONDS, true, true);
|
||||
@ -24586,8 +24586,8 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
|
||||
|
||||
bool Player::CanNoReagentCast(SpellInfo const* spellInfo) const
|
||||
{
|
||||
// don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR5_NO_REAGENT_WHILE_PREP) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION))
|
||||
// don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION))
|
||||
return true;
|
||||
|
||||
// Check no reagent use mask
|
||||
@ -25953,7 +25953,7 @@ bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) c
|
||||
{
|
||||
// continent checked in SpellInfo::CheckLocation at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING))
|
||||
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))
|
||||
{
|
||||
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
|
||||
{
|
||||
@ -27681,7 +27681,7 @@ void Player::PrepareCharmAISpells()
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
if (!spellInfo->SpellFamilyName || spellInfo->IsPassive() || spellInfo->NeedsComboPoints() || (spellInfo->Stances && !spellInfo->HasAttribute(SPELL_ATTR2_NOT_NEED_SHAPESHIFT)))
|
||||
if (!spellInfo->SpellFamilyName || spellInfo->IsPassive() || spellInfo->NeedsComboPoints() || (spellInfo->Stances && !spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED)))
|
||||
continue;
|
||||
|
||||
float cast = spellInfo->CalcCastTime() / 1000.0f;
|
||||
@ -27722,7 +27722,7 @@ void Player::PrepareCharmAISpells()
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (spellInfo->HasAttribute(SPELL_ATTR7_HAS_CHARGE_EFFECT))
|
||||
else if (spellInfo->HasAttribute(SPELL_ATTR7_ATTACK_ON_CHARGE_TO_UNIT))
|
||||
{
|
||||
m_charmAISpells[SPELL_T_CHARGE] = spellInfo->Id;
|
||||
break;
|
||||
|
||||
@ -435,7 +435,7 @@ enum PlayerFlags
|
||||
PLAYER_FLAGS_UNK20 = 0x00100000,
|
||||
PLAYER_FLAGS_UNK21 = 0x00200000,
|
||||
PLAYER_FLAGS_COMMENTATOR2 = 0x00400000,
|
||||
PLAYER_ALLOW_ONLY_ABILITY = 0x00800000, // used by bladestorm and killing spree, allowed only spells with SPELL_ATTR0_REQ_AMMO, SPELL_EFFECT_ATTACK, checked only for active player
|
||||
PLAYER_ALLOW_ONLY_ABILITY = 0x00800000, // used by bladestorm and killing spree, allowed only spells with SPELL_ATTR0_USES_RANGED_SLOT, SPELL_EFFECT_ATTACK, checked only for active player
|
||||
PLAYER_FLAGS_UNK24 = 0x01000000, // disabled all melee ability on tab include autoattack
|
||||
PLAYER_FLAGS_NO_XP_GAIN = 0x02000000,
|
||||
PLAYER_FLAGS_UNK26 = 0x04000000,
|
||||
|
||||
@ -755,7 +755,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
|
||||
if (spellProto)
|
||||
{
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS))
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_REACTIVE_DAMAGE_PROC))
|
||||
victim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, spellProto->Id);
|
||||
}
|
||||
else
|
||||
@ -972,7 +972,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
}
|
||||
}
|
||||
|
||||
if (damagetype != NODAMAGE && damage && (!spellProto || !(spellProto->HasAttribute(SPELL_ATTR3_TREAT_AS_PERIODIC) || spellProto->HasAttribute(SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE))))
|
||||
if (damagetype != NODAMAGE && damage && (!spellProto || !(spellProto->HasAttribute(SPELL_ATTR3_TREAT_AS_PERIODIC) || spellProto->HasAttribute(SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK))))
|
||||
{
|
||||
if (victim != attacker && victim->GetTypeId() == TYPEID_PLAYER) // does not support creature push_back
|
||||
{
|
||||
@ -1795,7 +1795,7 @@ void Unit::CalcAbsorbResist(Unit* attacker, Unit* victim, SpellSchoolMask school
|
||||
// Magic damage, check for resists
|
||||
// Ignore spells that cant be resisted
|
||||
// Xinef: holy resistance exists for npcs
|
||||
if (!(schoolMask & SPELL_SCHOOL_MASK_NORMAL) && (!(schoolMask & SPELL_SCHOOL_MASK_HOLY) || victim->GetTypeId() == TYPEID_UNIT) && (!spellInfo || (!spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL) && !spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_RESISTANCES))))
|
||||
if (!(schoolMask & SPELL_SCHOOL_MASK_NORMAL) && (!(schoolMask & SPELL_SCHOOL_MASK_HOLY) || victim->GetTypeId() == TYPEID_UNIT) && (!spellInfo || (!spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL) && !spellInfo->HasAttribute(SPELL_ATTR4_NO_CAST_LOG))))
|
||||
{
|
||||
float averageResist = Unit::GetEffectiveResistChance(attacker, schoolMask, victim, spellInfo);
|
||||
|
||||
@ -2069,7 +2069,7 @@ void Unit::CalcAbsorbResist(Unit* attacker, Unit* victim, SpellSchoolMask school
|
||||
|
||||
// Xinef: Single Target splits require LoS
|
||||
const SpellInfo* splitSpellInfo = (*itr)->GetSpellInfo();
|
||||
if (!splitSpellInfo->Effects[(*itr)->GetEffIndex()].IsAreaAuraEffect() && !splitSpellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS))
|
||||
if (!splitSpellInfo->Effects[(*itr)->GetEffIndex()].IsAreaAuraEffect() && !splitSpellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT))
|
||||
if (!caster->IsWithinLOSInMap(victim) || !caster->IsWithinDist(victim, splitSpellInfo->GetMaxRange(splitSpellInfo->IsPositive(), caster)))
|
||||
continue;
|
||||
|
||||
@ -2653,7 +2653,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
|
||||
bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType)
|
||||
{
|
||||
// These spells can't be blocked
|
||||
if (spellProto && spellProto->HasAttribute(SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK))
|
||||
if (spellProto && spellProto->HasAttribute(SPELL_ATTR0_NO_ACTIVE_DEFENSE))
|
||||
return false;
|
||||
|
||||
if (victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION) || victim->HasInArc(M_PI, this))
|
||||
@ -2706,9 +2706,9 @@ int32 Unit::GetMechanicResistChance(const SpellInfo* spell)
|
||||
// Melee based spells hit result calculations
|
||||
SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
{
|
||||
// Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will additionally fully ignore
|
||||
// Spells with SPELL_ATTR3_ALWAYS_HIT will additionally fully ignore
|
||||
// resist and deflect chances
|
||||
if (spell->HasAttribute(SPELL_ATTR3_IGNORE_HIT_RESULT))
|
||||
if (spell->HasAttribute(SPELL_ATTR3_ALWAYS_HIT))
|
||||
return SPELL_MISS_NONE;
|
||||
|
||||
WeaponAttackType attType = BASE_ATTACK;
|
||||
@ -2738,10 +2738,10 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
|
||||
bool canDodge = true;
|
||||
bool canParry = true;
|
||||
bool canBlock = spell->HasAttribute(SPELL_ATTR3_BLOCKABLE_SPELL) && !spell->HasAttribute(SPELL_ATTR0_CU_DIRECT_DAMAGE);
|
||||
bool canBlock = spell->HasAttribute(SPELL_ATTR3_COMPLETELY_BLOCKED) && !spell->HasAttribute(SPELL_ATTR0_CU_DIRECT_DAMAGE);
|
||||
|
||||
// Same spells cannot be parry/dodge
|
||||
if (spell->HasAttribute(SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK))
|
||||
if (spell->HasAttribute(SPELL_ATTR0_NO_ACTIVE_DEFENSE))
|
||||
return SPELL_MISS_NONE;
|
||||
|
||||
// Chance resist mechanic
|
||||
@ -2886,10 +2886,10 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
if (IsVehicle())
|
||||
return SPELL_MISS_NONE;
|
||||
|
||||
// Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will additionally fully ignore
|
||||
// Spells with SPELL_ATTR3_ALWAYS_HIT will additionally fully ignore
|
||||
// resist and deflect chances
|
||||
// xinef: skip all calculations, proof: Toxic Tolerance quest
|
||||
if (spell->HasAttribute(SPELL_ATTR3_IGNORE_HIT_RESULT))
|
||||
if (spell->HasAttribute(SPELL_ATTR3_ALWAYS_HIT))
|
||||
return SPELL_MISS_NONE;
|
||||
|
||||
SpellSchoolMask schoolMask = spell->GetSchoolMask();
|
||||
@ -2914,9 +2914,9 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
// Increase from attacker SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT auras
|
||||
modHitChance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT, schoolMask);
|
||||
|
||||
// Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will ignore target's avoidance effects
|
||||
// Spells with SPELL_ATTR3_ALWAYS_HIT will ignore target's avoidance effects
|
||||
// xinef: imo it should completly ignore all calculations, eg: 14792. Hits 80 level players on blizz without any problems
|
||||
//if (!spell->HasAttribute(SPELL_ATTR3_IGNORE_HIT_RESULT))
|
||||
//if (!spell->HasAttribute(SPELL_ATTR3_ALWAYS_HIT))
|
||||
{
|
||||
// Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras
|
||||
modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask);
|
||||
@ -2957,7 +2957,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
tmp += resist_chance;
|
||||
|
||||
// Chance resist debuff
|
||||
if (!spell->IsPositive() && !spell->HasAttribute(SPELL_ATTR4_IGNORE_RESISTANCES))
|
||||
if (!spell->IsPositive() && !spell->HasAttribute(SPELL_ATTR4_NO_CAST_LOG))
|
||||
{
|
||||
bool bNegativeAura = true;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
@ -3530,7 +3530,7 @@ bool Unit::IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled, bool skipAu
|
||||
{
|
||||
if (!skipInstant || m_currentSpells[CURRENT_GENERIC_SPELL]->GetCastTime())
|
||||
{
|
||||
if (!isAutoshoot || !m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS))
|
||||
if (!isAutoshoot || !m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -3538,7 +3538,7 @@ bool Unit::IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled, bool skipAu
|
||||
if (!skipChanneled && m_currentSpells[CURRENT_CHANNELED_SPELL] &&
|
||||
(m_currentSpells[CURRENT_CHANNELED_SPELL]->getState() != SPELL_STATE_FINISHED))
|
||||
{
|
||||
if (!isAutoshoot || !m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS))
|
||||
if (!isAutoshoot || !m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS))
|
||||
return true;
|
||||
}
|
||||
// autorepeat spells may be finished or delayed, but they are still considered cast
|
||||
@ -3582,7 +3582,7 @@ bool Unit::CanMoveDuringChannel() const
|
||||
{
|
||||
if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||
if (spell->getState() != SPELL_STATE_FINISHED)
|
||||
return spell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) && spell->IsChannelActive();
|
||||
return spell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL) && spell->IsChannelActive();
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -4526,7 +4526,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId
|
||||
// Call OnDispel hook on AuraScript
|
||||
aura->CallScriptDispel(&dispelInfo);
|
||||
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES))
|
||||
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_REMOVES_CHARGES))
|
||||
aura->ModCharges(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
else
|
||||
aura->ModStackAmount(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
@ -4607,7 +4607,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, ObjectGuid casterGUID, U
|
||||
}
|
||||
}
|
||||
|
||||
bool stealCharge = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
bool stealCharge = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_REMOVES_CHARGES);
|
||||
// Cast duration to unsigned to prevent permanent aura's such as Righteous Fury being permanently added to caster
|
||||
uint32 dur = std::min(2u * MINUTE * IN_MILLISECONDS, uint32(aura->GetDuration()));
|
||||
|
||||
@ -4901,10 +4901,10 @@ void Unit::RemoveArenaAuras()
|
||||
RemoveAppliedAuras([](AuraApplication const* aurApp)
|
||||
{
|
||||
Aura const* aura = aurApp->GetBase();
|
||||
return (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_DONT_REMOVE_IN_ARENA) // don't remove stances, shadowform, pally/hunter auras
|
||||
return (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_ALLOW_ENETRING_ARENA) // don't remove stances, shadowform, pally/hunter auras
|
||||
&& !aura->IsPassive() // don't remove passive auras
|
||||
&& (aurApp->IsPositive() || !aura->GetSpellInfo()->HasAttribute(SPELL_ATTR3_DEATH_PERSISTENT))) || // not negative death persistent auras
|
||||
aura->GetSpellInfo()->HasAttribute(SPELL_ATTR5_REMOVE_ON_ARENA_ENTER); // special marker, always remove
|
||||
&& (aurApp->IsPositive() || !aura->GetSpellInfo()->HasAttribute(SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD))) || // not negative death persistent auras
|
||||
aura->GetSpellInfo()->HasAttribute(SPELL_ATTR5_REMOVE_ENTERING_ARENA); // special marker, always remove
|
||||
});
|
||||
}
|
||||
|
||||
@ -4915,7 +4915,7 @@ void Unit::RemoveAllAurasOnDeath()
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
Aura const* aura = iter->second->GetBase();
|
||||
if ((!aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_REACTIVATE_AT_RESURRECT)) && !aura->IsDeathPersistent())
|
||||
if ((!aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISABLE_AURA_WHILE_DEAD)) && !aura->IsDeathPersistent())
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEATH);
|
||||
else
|
||||
++iter;
|
||||
@ -4924,7 +4924,7 @@ void Unit::RemoveAllAurasOnDeath()
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
Aura* aura = iter->second;
|
||||
if ((!aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_REACTIVATE_AT_RESURRECT)) && !aura->IsDeathPersistent())
|
||||
if ((!aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISABLE_AURA_WHILE_DEAD)) && !aura->IsDeathPersistent())
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEATH);
|
||||
else
|
||||
++iter;
|
||||
@ -5191,7 +5191,7 @@ void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelCharges
|
||||
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
|
||||
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell
|
||||
// Polymorph instead of 1 / (5 + 1) -> 16%.
|
||||
bool dispel_charges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
bool dispel_charges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_REMOVES_CHARGES);
|
||||
uint8 charges = dispel_charges ? aura->GetCharges() : aura->GetStackAmount();
|
||||
if (charges > 0)
|
||||
dispelList.push_back(std::make_pair(aura, charges));
|
||||
@ -10509,7 +10509,7 @@ bool RedirectSpellEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
|
||||
{
|
||||
// Patch 1.2 notes: Spell Reflection no longer reflects abilities
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_ABILITY) || spellInfo->HasAttribute(SPELL_ATTR1_CANT_BE_REDIRECTED) || spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_IS_ABILITY) || spellInfo->HasAttribute(SPELL_ATTR1_NO_REDIRECTION) || spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
|
||||
return victim;
|
||||
|
||||
Unit::AuraEffectList const& magnetAuras = victim->GetAuraEffectsByType(SPELL_AURA_SPELL_MAGNET);
|
||||
@ -10757,7 +10757,7 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da
|
||||
return 1.0f;
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_NO_DONE_BONUS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
|
||||
return 1.0f;
|
||||
|
||||
// For totems get damage bonus from owner
|
||||
@ -10795,7 +10795,7 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da
|
||||
{
|
||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
|
||||
else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPED_ITEM) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
@ -11084,7 +11084,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
return pdamage;
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_NO_DONE_BONUS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
|
||||
return pdamage;
|
||||
|
||||
// For totems get damage bonus from owner
|
||||
@ -11113,7 +11113,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
DoneTotalMod *= ToCreature()->GetSpellDamageMod(ToCreature()->GetCreatureTemplate()->rank);
|
||||
|
||||
// Some spells don't benefit from pct done mods
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS))
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS))
|
||||
{
|
||||
uint32 creatureTypeMask = victim->GetCreatureTypeMask();
|
||||
// Add flat bonus from spell damage versus
|
||||
@ -11778,11 +11778,11 @@ float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, D
|
||||
return owner->SpellPctHealingModsDone(victim, spellProto, damagetype);
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_NO_DONE_BONUS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
|
||||
return 1.0f;
|
||||
|
||||
// xinef: Some spells don't benefit from done mods
|
||||
if (spellProto->HasAttribute(SPELL_ATTR6_LIMIT_PCT_HEALING_MODS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR6_IGNORE_HEALTH_MODIFIERS))
|
||||
return 1.0f;
|
||||
|
||||
// No bonus healing for potion spells
|
||||
@ -12087,7 +12087,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
}
|
||||
|
||||
// No positive taken bonus, custom attr
|
||||
if ((spellProto->HasAttribute(SPELL_ATTR6_LIMIT_PCT_HEALING_MODS) || spellProto->HasAttribute(SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS)) && TakenTotalMod > 1.0f)
|
||||
if ((spellProto->HasAttribute(SPELL_ATTR6_IGNORE_HEALTH_MODIFIERS) || spellProto->HasAttribute(SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS)) && TakenTotalMod > 1.0f)
|
||||
{
|
||||
TakenTotal = 0;
|
||||
TakenTotalMod = 1.0f;
|
||||
@ -12156,7 +12156,7 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
|
||||
|
||||
bool Unit::IsImmunedToDamage(SpellInfo const* spellInfo) const
|
||||
{
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
return false;
|
||||
|
||||
uint32 schoolMask = spellInfo->GetSchoolMask();
|
||||
@ -12182,7 +12182,7 @@ bool Unit::IsImmunedToSchool(SpellSchoolMask meleeSchoolMask) const
|
||||
|
||||
bool Unit::IsImmunedToSchool(SpellInfo const* spellInfo) const
|
||||
{
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
return false;
|
||||
|
||||
uint32 schoolMask = spellInfo->GetSchoolMask();
|
||||
@ -12229,7 +12229,7 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
return false;
|
||||
|
||||
if (spellInfo->Dispel)
|
||||
@ -12293,10 +12293,10 @@ bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) cons
|
||||
return false;
|
||||
|
||||
// xinef: pet scaling auras
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_IS_PET_SCALING))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_OWNER_POWER_SCALING))
|
||||
return false;
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) && !HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
return false;
|
||||
|
||||
//If m_immuneToEffect type contain this effect type, IMMUNE effect.
|
||||
@ -12319,7 +12319,7 @@ bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) cons
|
||||
SpellImmuneList const& list = m_spellImmune[IMMUNITY_STATE];
|
||||
for (SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
|
||||
if (itr->type == aura && (itr->spellId != 64848 || spellInfo->Effects[index].MiscValue == POWER_MANA))
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR3_IGNORE_HIT_RESULT))
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR3_ALWAYS_HIT))
|
||||
if (itr->blockType == SPELL_BLOCK_TYPE_ALL || spellInfo->IsPositive()) // xinef: added for pet scaling
|
||||
return true;
|
||||
|
||||
@ -12421,7 +12421,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
|
||||
{
|
||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
|
||||
else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPED_ITEM) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
@ -12522,7 +12522,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto)
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_NO_DONE_BONUS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
|
||||
{
|
||||
DoneFlatBenefit = 0;
|
||||
DoneTotalMod = 1.0f;
|
||||
@ -12701,7 +12701,7 @@ void Unit::ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type
|
||||
{
|
||||
ApplySpellImmune(spellProto->Id, IMMUNITY_DISPEL, type, apply);
|
||||
|
||||
if (apply && spellProto->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
|
||||
if (apply && spellProto->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
|
||||
{
|
||||
// Create dispel mask by dispel type
|
||||
uint32 dispelMask = SpellInfo::GetDispelMask(type);
|
||||
@ -13113,7 +13113,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
|
||||
|
||||
// can't attack invisible (ignore stealth for aoe spells) also if the area being looked at is from a spell use the dynamic object created instead of the casting unit.
|
||||
//Ignore stealth if target is player and unit in combat with same player
|
||||
if ((!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && (obj ? !obj->CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()) : !CanSeeOrDetect(target, (bySpell && bySpell->IsAffectingArea()) || (target->GetTypeId() == TYPEID_PLAYER && target->HasStealthAura() && target->IsInCombat() && IsInCombatWith(target)))))
|
||||
if ((!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT)) && (obj ? !obj->CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()) : !CanSeeOrDetect(target, (bySpell && bySpell->IsAffectingArea()) || (target->GetTypeId() == TYPEID_PLAYER && target->HasStealthAura() && target->IsInCombat() && IsInCombatWith(target)))))
|
||||
return false;
|
||||
|
||||
// can't attack dead
|
||||
@ -13231,7 +13231,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
|
||||
return false;
|
||||
|
||||
// can't assist invisible
|
||||
if ((!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
|
||||
if ((!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT)) && !CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
|
||||
return false;
|
||||
|
||||
// can't assist dead
|
||||
@ -13243,7 +13243,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
|
||||
&& target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
return false;
|
||||
|
||||
if (!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG))
|
||||
if (!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_CAN_ASSIST_IMMUNE_PC))
|
||||
{
|
||||
// xinef: do not allow to assist non attackable units
|
||||
if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
@ -13294,7 +13294,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
|
||||
// PvC case - player can assist creature only if has specific type flags
|
||||
// !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) &&
|
||||
else if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)
|
||||
&& (!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG))
|
||||
&& (!bySpell || !bySpell->HasAttribute(SPELL_ATTR6_CAN_ASSIST_IMMUNE_PC))
|
||||
&& !target->IsPvP())
|
||||
{
|
||||
if (Creature const* creatureTarget = target->ToCreature())
|
||||
@ -14104,7 +14104,7 @@ int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, in
|
||||
return duration;
|
||||
|
||||
// some auras are not affected by duration modifiers
|
||||
if (spellProto->HasAttribute(SPELL_ATTR7_IGNORE_DURATION_MODS))
|
||||
if (spellProto->HasAttribute(SPELL_ATTR7_NO_TARGET_DURATION_MOD))
|
||||
return duration;
|
||||
|
||||
// cut duration only of negative effects
|
||||
@ -14213,7 +14213,7 @@ void Unit::ModSpellCastTime(SpellInfo const* spellInfo, int32& castTime, Spell*
|
||||
switch (spellInfo->DmgClass)
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_NONE:
|
||||
if (spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION) // required double check
|
||||
if (spellInfo->AttributesEx5 & SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC) // required double check
|
||||
castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
else if (spellInfo->SpellVisual[0] == 3881 && HasAura(67556)) // cooking with Chef Hat.
|
||||
castTime = 500;
|
||||
@ -15391,7 +15391,7 @@ void createProcFlags(const SpellInfo* spellInfo, WeaponAttackType attackType, bo
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
// Auto attack
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR2_AUTO_REPEAT))
|
||||
{
|
||||
procAttacker = PROC_FLAG_DONE_RANGED_AUTO_ATTACK;
|
||||
procVictim = PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK;
|
||||
@ -15405,7 +15405,7 @@ void createProcFlags(const SpellInfo* spellInfo, WeaponAttackType attackType, bo
|
||||
default:
|
||||
if (spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON &&
|
||||
spellInfo->EquippedItemSubClassMask & (1 << ITEM_SUBCLASS_WEAPON_WAND)
|
||||
&& spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG)) // Wands auto attack
|
||||
&& spellInfo->HasAttribute(SPELL_ATTR2_AUTO_REPEAT)) // Wands auto attack
|
||||
{
|
||||
procAttacker = PROC_FLAG_DONE_RANGED_AUTO_ATTACK;
|
||||
procVictim = PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK;
|
||||
@ -15623,7 +15623,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
continue;
|
||||
|
||||
// Triggered spells not triggering additional spells
|
||||
//bool triggered = !spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ?
|
||||
//bool triggered = !spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_FROM_PROCS) ?
|
||||
// (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false;
|
||||
|
||||
bool hasTriggeredProc = false;
|
||||
@ -15732,7 +15732,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
eventInfo.SetProcCooldown(cooldown);
|
||||
|
||||
// Note: must SetCantProc(false) before return
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_DISABLE_PROC))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_INSTANT_TARGET_PROCS))
|
||||
SetCantProc(true);
|
||||
|
||||
bool handled = i->aura->CallScriptProcHandlers(aurApp, eventInfo);
|
||||
@ -15849,7 +15849,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
// xinef: check channeled spells which are affected by haste also
|
||||
if (procSpell && (procSpell->SpellFamilyName || GetTypeId() != TYPEID_PLAYER) &&
|
||||
(procSpell->CalcCastTime() > 0 /*||
|
||||
(procSpell->IsChanneled() && procSpell->GetDuration() > 0 && (HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, procSpell) || procSpell->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION)))*/))
|
||||
(procSpell->IsChanneled() && procSpell->GetDuration() > 0 && (HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, procSpell) || procSpell->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC)))*/))
|
||||
takeCharges = true;
|
||||
break;
|
||||
case SPELL_AURA_REFLECT_SPELLS_SCHOOL:
|
||||
@ -15892,7 +15892,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
// Spell own direct damage at apply wont break the CC
|
||||
// Xinef: Or when the aura is at full duration (assume that such auras should be added at the end, skipping all damage procs etc.)
|
||||
if (procSpell)
|
||||
if ((!i->aura->IsPermanent() && i->aura->GetDuration() == i->aura->GetMaxDuration()) || procSpell->Id == triggeredByAura->GetId() || procSpell->HasAttribute(SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS))
|
||||
if ((!i->aura->IsPermanent() && i->aura->GetDuration() == i->aura->GetMaxDuration()) || procSpell->Id == triggeredByAura->GetId() || procSpell->HasAttribute(SPELL_ATTR4_REACTIVE_DAMAGE_PROC))
|
||||
break;
|
||||
|
||||
// chargeable mods are breaking on hit
|
||||
@ -15923,12 +15923,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
// Remove charge (aura can be removed by triggers)
|
||||
// xinef: take into account attribute6 of proc spell
|
||||
if (prepare && useCharges && takeCharges)
|
||||
if (!procSpell || isVictim || !procSpell->HasAttribute(SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES))
|
||||
if (!procSpell || isVictim || !procSpell->HasAttribute(SPELL_ATTR6_DO_NOT_CONSUME_RESOURCES))
|
||||
i->aura->DropCharge();
|
||||
|
||||
i->aura->CallScriptAfterProcHandlers(aurApp, eventInfo);
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_DISABLE_PROC))
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_INSTANT_TARGET_PROCS))
|
||||
SetCantProc(false);
|
||||
}
|
||||
|
||||
@ -16164,7 +16164,7 @@ void Unit::RestoreDisplayId()
|
||||
if (!handledAura)
|
||||
handledAura = (*i);
|
||||
// xinef: prefer negative/forced auras
|
||||
if ((*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) || !aurApp->IsPositive())
|
||||
if ((*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !aurApp->IsPositive())
|
||||
{
|
||||
handledAuraForced = (*i);
|
||||
break;
|
||||
@ -18072,7 +18072,7 @@ Aura* Unit::AddAura(uint32 spellId, Unit* target)
|
||||
if (!spellInfo)
|
||||
return nullptr;
|
||||
|
||||
if (!target->IsAlive() && !spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) && !spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_DEAD))
|
||||
if (!target->IsAlive() && !spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) && !spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_DEAD_TARGET))
|
||||
return nullptr;
|
||||
|
||||
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
|
||||
|
||||
@ -588,7 +588,7 @@ enum UnitFlags
|
||||
UNIT_FLAG_DISABLE_MOVE = 0x00000004,
|
||||
UNIT_FLAG_PLAYER_CONTROLLED = 0x00000008, // controlled by player, use _IMMUNE_TO_PC instead of _IMMUNE_TO_NPC
|
||||
UNIT_FLAG_RENAME = 0x00000010,
|
||||
UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP
|
||||
UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA
|
||||
UNIT_FLAG_UNK_6 = 0x00000040,
|
||||
UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PLAYER_CONTROLLED | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE
|
||||
UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
|
||||
@ -637,7 +637,7 @@ enum UnitFlags2
|
||||
UNIT_FLAG2_CANNOT_TURN = 0x00008000,
|
||||
UNIT_FLAG2_UNK2 = 0x00010000,
|
||||
UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // Plays special death animation upon death
|
||||
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // Allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
|
||||
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // Allows casting spells with AttributesEx7 & SPELL_ATTR7_DEBUG_SPELL
|
||||
};
|
||||
|
||||
/// Non Player Character flags
|
||||
@ -2102,7 +2102,7 @@ public:
|
||||
// delayed+channeled spells are always interrupted
|
||||
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid = 0, bool withInstant = true, bool bySelf = false);
|
||||
|
||||
// Check if our current channel spell has attribute SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING
|
||||
// Check if our current channel spell has attribute SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL
|
||||
[[nodiscard]] bool CanMoveDuringChannel() const;
|
||||
|
||||
[[nodiscard]] Spell* GetCurrentSpell(CurrentSpellTypes spellType) const { return m_currentSpells[spellType]; }
|
||||
|
||||
@ -414,7 +414,7 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
|
||||
{
|
||||
// xinef: allow dissmis dead pets
|
||||
SpellInfo const* spell = (flag == ACT_ENABLED || flag == ACT_PASSIVE) ? sSpellMgr->GetSpellInfo(spellid) : nullptr;
|
||||
if ((flag != ACT_COMMAND || spellid != COMMAND_ABANDON) && (!spell || !spell->HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_DEAD)))
|
||||
if ((flag != ACT_COMMAND || spellid != COMMAND_ABANDON) && (!spell || !spell->HasAttribute(SPELL_ATTR0_ALLOW_CAST_WHILE_DEAD)))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -479,8 +479,8 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
// not allow remove non positive spells and spells with attr SPELL_ATTR0_CANT_CANCEL
|
||||
if ((!spellInfo->IsPositive() || spellInfo->HasAttribute(SPELL_ATTR0_CANT_CANCEL) || spellInfo->IsPassive()) && spellId != 605)
|
||||
// not allow remove non positive spells and spells with attr SPELL_ATTR0_NO_AURA_CANCEL
|
||||
if ((!spellInfo->IsPositive() || spellInfo->HasAttribute(SPELL_ATTR0_NO_AURA_CANCEL) || spellInfo->IsPassive()) && spellId != 605)
|
||||
return;
|
||||
|
||||
// channeled spell case (it currently casted then)
|
||||
|
||||
@ -1925,7 +1925,7 @@ void LoadLootTemplates_Spell()
|
||||
{
|
||||
// not report about not trainable spells (optionally supported by DB)
|
||||
// ignore 61756 (Northrend Inscription Research (FAST QA VERSION) for example
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT) || spellInfo->HasAttribute(SPELL_ATTR0_TRADESPELL))
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED) || spellInfo->HasAttribute(SPELL_ATTR0_IS_TRADESKILL))
|
||||
{
|
||||
LootTemplates_Spell.ReportNonExistingId(spell_id, "Spell", spellInfo->Id);
|
||||
}
|
||||
|
||||
@ -273,290 +273,290 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] =
|
||||
|
||||
enum SpellAttr0
|
||||
{
|
||||
SPELL_ATTR0_UNK0 = 0x00000001, // TITLE Unknown attribute 0@Attr0
|
||||
SPELL_ATTR0_REQ_AMMO = 0x00000002, // TITLE Treat as ranged attack DESCRIPTION Use ammo, ranged attack range modifiers, ranged haste, etc.
|
||||
SPELL_ATTR0_ON_NEXT_SWING = 0x00000004, // TITLE On next melee (type 1) DESCRIPTION Both "on next swing" attributes have identical handling in server & client
|
||||
SPELL_ATTR0_IS_REPLENISHMENT = 0x00000008, // TITLE Replenishment (client only)
|
||||
SPELL_ATTR0_ABILITY = 0x00000010, // TITLE Treat as ability DESCRIPTION Cannot be reflected, not affected by cast speed modifiers, etc.
|
||||
SPELL_ATTR0_TRADESPELL = 0x00000020, // TITLE Trade skill recipe DESCRIPTION Displayed in recipe list, not affected by cast speed modifiers
|
||||
SPELL_ATTR0_PROC_FAILURE_BURNS_CHARGE = 0x00000001, // TITLE Unknown attribute 0@Attr0
|
||||
SPELL_ATTR0_USES_RANGED_SLOT = 0x00000002, // TITLE Treat as ranged attack DESCRIPTION Use ammo, ranged attack range modifiers, ranged haste, etc.
|
||||
SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE = 0x00000004, // TITLE On next melee (type 1) DESCRIPTION Both "on next swing" attributes have identical handling in server & client
|
||||
SPELL_ATTR0_DO_NOT_LOG_IMMUNE_MISSES = 0x00000008, // TITLE Replenishment (client only)
|
||||
SPELL_ATTR0_IS_ABILITY = 0x00000010, // TITLE Treat as ability DESCRIPTION Cannot be reflected, not affected by cast speed modifiers, etc.
|
||||
SPELL_ATTR0_IS_TRADESKILL = 0x00000020, // TITLE Trade skill recipe DESCRIPTION Displayed in recipe list, not affected by cast speed modifiers
|
||||
SPELL_ATTR0_PASSIVE = 0x00000040, // TITLE Passive spell DESCRIPTION Spell is automatically cast on self by core
|
||||
SPELL_ATTR0_HIDDEN_CLIENTSIDE = 0x00000080, // TITLE Hidden in UI (client only) DESCRIPTION Not visible in spellbook or aura bar
|
||||
SPELL_ATTR0_HIDE_IN_COMBAT_LOG = 0x00000100, // TITLE Hidden in combat log (client only) DESCRIPTION Spell will not appear in combat logs
|
||||
SPELL_ATTR0_TARGET_MAINHAND_ITEM = 0x00000200, // TITLE Auto-target mainhand item (client only) DESCRIPTION Client will automatically select main-hand item as cast target
|
||||
SPELL_ATTR0_ON_NEXT_SWING_2 = 0x00000400, // TITLE On next melee (type 2) DESCRIPTION Both "on next swing" attributes have identical handling in server & client
|
||||
SPELL_ATTR0_UNK11 = 0x00000800, // TITLE Unknown attribute 11@Attr0
|
||||
SPELL_ATTR0_DAYTIME_ONLY = 0x00001000, // TITLE Only usable during daytime (unused)
|
||||
SPELL_ATTR0_NIGHT_ONLY = 0x00002000, // TITLE Only usable during nighttime (unused)
|
||||
SPELL_ATTR0_INDOORS_ONLY = 0x00004000, // TITLE Only usable indoors
|
||||
SPELL_ATTR0_OUTDOORS_ONLY = 0x00008000, // TITLE Only usable outdoors
|
||||
SPELL_ATTR0_NOT_SHAPESHIFT = 0x00010000, // TITLE Not usable while shapeshifted
|
||||
SPELL_ATTR0_DO_NOT_DISPLAY = 0x00000080, // TITLE Hidden in UI (client only) DESCRIPTION Not visible in spellbook or aura bar (Spellbook, Aura Icon, Combat Log)
|
||||
SPELL_ATTR0_DO_NOT_LOG = 0x00000100, // TITLE Hidden in combat log (client only) DESCRIPTION Spell will not appear in combat logs
|
||||
SPELL_ATTR0_HELD_ITEM_ONLY = 0x00000200, // TITLE Auto-target mainhand item (client only) DESCRIPTION Client will automatically select main-hand item as cast target
|
||||
SPELL_ATTR0_ON_NEXT_SWING = 0x00000400, // TITLE On next melee (type 2) DESCRIPTION Both "on next swing" attributes have identical handling in server & client
|
||||
SPELL_ATTR0_WEARER_CASTS_PROC_TRIGGER = 0x00000800, // TITLE Unknown attribute 11@Attr0
|
||||
SPELL_ATTR0_SERVER_ONLY = 0x00001000, // TITLE Only usable during daytime (unused)
|
||||
SPELL_ATTR0_ALLOW_ITEM_SPELL_IN_PVP = 0x00002000, // TITLE Only usable during nighttime (unused)
|
||||
SPELL_ATTR0_ONLY_INDOORS = 0x00004000, // TITLE Only usable indoors
|
||||
SPELL_ATTR0_ONLY_OUTDOORS = 0x00008000, // TITLE Only usable outdoors
|
||||
SPELL_ATTR0_NOT_SHAPESHIFTED = 0x00010000, // TITLE Not usable while shapeshifted
|
||||
SPELL_ATTR0_ONLY_STEALTHED = 0x00020000, // TITLE Only usable in stealth
|
||||
SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE = 0x00040000, // TITLE Don't shealthe weapons (client only)
|
||||
SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION = 0x00080000, // TITLE Scale with caster level DESCRIPTION For non-player casts, scale impact and power cost with caster's level
|
||||
SPELL_ATTR0_STOP_ATTACK_TARGET = 0x00100000, // TITLE Stop attacking after cast DESCRIPTION After casting this, the current auto-attack will be interrupted
|
||||
SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK = 0x00200000, // TITLE Prevent physical avoidance DESCRIPTION Spell cannot be dodged, parried or blocked
|
||||
SPELL_ATTR0_CAST_TRACK_TARGET = 0x00400000, // TITLE Automatically face target during cast (client only)
|
||||
SPELL_ATTR0_CASTABLE_WHILE_DEAD = 0x00800000, // TITLE Can be cast while dead DESCRIPTION Spells without this flag cannot be cast by dead units in non-triggered contexts
|
||||
SPELL_ATTR0_CASTABLE_WHILE_MOUNTED = 0x01000000, // TITLE Can be cast while mounted
|
||||
SPELL_ATTR0_DISABLED_WHILE_ACTIVE = 0x02000000, // TITLE Cooldown starts on expiry DESCRIPTION Spell is unusable while already active, and cooldown does not begin until the effects have worn off
|
||||
SPELL_ATTR0_NEGATIVE_1 = 0x04000000, // TITLE Is negative spell DESCRIPTION Forces the spell to be treated as a negative spell
|
||||
SPELL_ATTR0_CASTABLE_WHILE_SITTING = 0x08000000, // TITLE Can be cast while sitting
|
||||
SPELL_ATTR0_CANT_USED_IN_COMBAT = 0x10000000, // TITLE Cannot be used in combat
|
||||
SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // TITLE Pierce invulnerability DESCRIPTION Allows spell to pierce invulnerability, unless the invulnerability spell also has this attribute
|
||||
SPELL_ATTR0_HEARTBEAT_RESIST_CHECK = 0x40000000, // TITLE Periodic resistance checks DESCRIPTION Periodically re-rolls against resistance to potentially expire aura early
|
||||
SPELL_ATTR0_CANT_CANCEL = 0x80000000 // TITLE Aura cannot be cancelled DESCRIPTION Prevents the player from voluntarily canceling a positive aura
|
||||
SPELL_ATTR0_DO_NOT_SHEATH = 0x00040000, // TITLE Don't shealthe weapons (client only)
|
||||
SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL = 0x00080000, // TITLE Scale with caster level DESCRIPTION For non-player casts, scale impact and power cost with caster's level
|
||||
SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT = 0x00100000, // TITLE Stop attacking after cast DESCRIPTION After casting this, the current auto-attack will be interrupted
|
||||
SPELL_ATTR0_NO_ACTIVE_DEFENSE = 0x00200000, // TITLE Prevent physical avoidance DESCRIPTION Spell cannot be dodged, parried or blocked
|
||||
SPELL_ATTR0_TRACK_TARGET_IN_CAST_PLAYER_ONLY = 0x00400000, // TITLE Automatically face target during cast (client only)
|
||||
SPELL_ATTR0_ALLOW_CAST_WHILE_DEAD = 0x00800000, // TITLE Can be cast while dead DESCRIPTION Spells without this flag cannot be cast by dead units in non-triggered contexts
|
||||
SPELL_ATTR0_ALLOW_WHILE_MOUNTED = 0x01000000, // TITLE Can be cast while mounted
|
||||
SPELL_ATTR0_COOLDOWN_ON_EVENT = 0x02000000, // TITLE Cooldown starts on expiry DESCRIPTION Spell is unusable while already active, and cooldown does not begin until the effects have worn off
|
||||
SPELL_ATTR0_AURA_IS_DEBUFF = 0x04000000, // TITLE Is negative spell DESCRIPTION Forces the spell to be treated as a negative spell
|
||||
SPELL_ATTR0_ALLOW_WHILE_SITTING = 0x08000000, // TITLE Can be cast while sitting
|
||||
SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL = 0x10000000, // TITLE Cannot be used in combat
|
||||
SPELL_ATTR0_NO_IMMUNITIES = 0x20000000, // TITLE Pierce invulnerability DESCRIPTION Allows spell to pierce invulnerability, unless the invulnerability spell also has this attribute
|
||||
SPELL_ATTR0_HEARTBEAT_RESIST = 0x40000000, // TITLE Periodic resistance checks DESCRIPTION Periodically re-rolls against resistance to potentially expire aura early
|
||||
SPELL_ATTR0_NO_AURA_CANCEL = 0x80000000 // TITLE Aura cannot be cancelled DESCRIPTION Prevents the player from voluntarily canceling a positive aura
|
||||
};
|
||||
|
||||
enum SpellAttr1
|
||||
{
|
||||
SPELL_ATTR1_DISMISS_PET = 0x00000001, // TITLE Dismiss Pet on cast DESCRIPTION Without this attribute, summoning spells will fail if caster already has a pet
|
||||
SPELL_ATTR1_DRAIN_ALL_POWER = 0x00000002, // TITLE Drain all power DESCRIPTION Ignores listed power cost and drains entire pool instead
|
||||
SPELL_ATTR1_CHANNELED_1 = 0x00000004, // TITLE Channeled (type 1) DESCRIPTION Both "channeled" attributes have identical handling in server & client
|
||||
SPELL_ATTR1_CANT_BE_REDIRECTED = 0x00000008, // TITLE Ignore redirection effects DESCRIPTION Spell will not be attracted by SPELL_MAGNET auras (Grounding Totem)
|
||||
SPELL_ATTR1_UNK4 = 0x00000010, // TITLE Unknown attribute 4@Attr1 DESCRIPTION stealth and whirlwind
|
||||
SPELL_ATTR1_NOT_BREAK_STEALTH = 0x00000020, // TITLE Does not break stealth
|
||||
SPELL_ATTR1_CHANNELED_2 = 0x00000040, // TITLE Channeled (type 2) DESCRIPTION Both "channeled" attributes have identical handling in server & client
|
||||
SPELL_ATTR1_CANT_BE_REFLECTED = 0x00000080, // TITLE Ignore reflection effects DESCRIPTION Spell will pierce through Spell Reflection and similar
|
||||
SPELL_ATTR1_CANT_TARGET_IN_COMBAT = 0x00000100, // TITLE Target cannot be in combat
|
||||
SPELL_ATTR1_MELEE_COMBAT_START = 0x00000200, // TITLE Starts auto-attack (client only) DESCRIPTION Caster will begin auto-attacking the target on cast
|
||||
SPELL_ATTR1_DISMISS_PET_FIRST = 0x00000001, // TITLE Dismiss Pet on cast DESCRIPTION Without this attribute, summoning spells will fail if caster already has a pet
|
||||
SPELL_ATTR1_USE_ALL_MANA = 0x00000002, // TITLE Drain all power DESCRIPTION Ignores listed power cost and drains entire pool instead
|
||||
SPELL_ATTR1_IS_CHANNELED = 0x00000004, // TITLE Channeled (type 1) DESCRIPTION Both "channeled" attributes have identical handling in server & client
|
||||
SPELL_ATTR1_NO_REDIRECTION = 0x00000008, // TITLE Ignore redirection effects DESCRIPTION Spell will not be attracted by SPELL_MAGNET auras (Grounding Totem)
|
||||
SPELL_ATTR1_NO_SKILL_INCREASE = 0x00000010, // TITLE Unknown attribute 4@Attr1 DESCRIPTION stealth and whirlwind
|
||||
SPELL_ATTR1_ALLOW_WHILE_STEALTHED = 0x00000020, // TITLE Does not break stealth
|
||||
SPELL_ATTR1_IS_SELF_CHANNELED = 0x00000040, // TITLE Channeled (type 2) DESCRIPTION Both "channeled" attributes have identical handling in server & client
|
||||
SPELL_ATTR1_NO_REFLECTION = 0x00000080, // TITLE Ignore reflection effects DESCRIPTION Spell will pierce through Spell Reflection and similar
|
||||
SPELL_ATTR1_ONLY_PEACEFUL_TARGETS = 0x00000100, // TITLE Target cannot be in combat
|
||||
SPELL_ATTR1_INITIATE_COMBAT = 0x00000200, // TITLE Enables Auto-Attack (client only) DESCRIPTION Caster will begin auto-attacking the target on cast
|
||||
SPELL_ATTR1_NO_THREAT = 0x00000400, // TITLE Does not generate threat DESCRIPTION Also does not cause target to engage
|
||||
SPELL_ATTR1_DONT_REFRESH_DURATION_ON_RECAST = 0x00000800, // TITLE Aura will not refresh its duration when recast
|
||||
SPELL_ATTR1_IS_PICKPOCKET = 0x00001000, // TITLE Pickpocket (client only)
|
||||
SPELL_ATTR1_FARSIGHT = 0x00002000, // TITLE Farsight aura (client only)
|
||||
SPELL_ATTR1_CHANNEL_TRACK_TARGET = 0x00004000, // TITLE Track target while channeling DESCRIPTION While channeling, adjust facing to face target
|
||||
SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY = 0x00008000, // TITLE Immunity cancels preapplied auras DESCRIPTION For immunity spells, cancel all auras that this spell would make you immune to when the spell is applied
|
||||
SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE = 0x00010000, // TITLE Unaffected by school immunities DESCRIPTION Will not pierce Divine Shield, Ice Block and other full invulnerabilities
|
||||
SPELL_ATTR1_UNAUTOCASTABLE_BY_PET = 0x00020000, // TITLE Cannot be autocast by pet
|
||||
SPELL_ATTR1_AURA_UNIQUE = 0x00000800, // TITLE Aura will not refresh its duration when recast
|
||||
SPELL_ATTR1_FAILURE_BREAKS_STEALTH = 0x00001000, // TITLE Pickpocket (client only)
|
||||
SPELL_ATTR1_TOGGLE_FAR_SIGHT = 0x00002000, // TITLE Farsight aura (client only)
|
||||
SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL = 0x00004000, // TITLE Track target while channeling DESCRIPTION While channeling, adjust facing to face target
|
||||
SPELL_ATTR1_IMMUNITY_PURGES_EFFECT = 0x00008000, // TITLE Immunity cancels preapplied auras DESCRIPTION For immunity spells, cancel all auras that this spell would make you immune to when the spell is applied
|
||||
SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS = 0x00010000, // TITLE Unaffected by school immunities DESCRIPTION Will not pierce Divine Shield, Ice Block and other full invulnerabilities
|
||||
SPELL_ATTR1_NO_AUTOCAST_AI = 0x00020000, // TITLE Cannot be autocast by pet DESCRIPTION (AI)
|
||||
SPELL_ATTR1_PREVENTS_ANIM = 0x00040000, // TITLE NYI, auras apply UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
|
||||
SPELL_ATTR1_CANT_TARGET_SELF = 0x00080000, // TITLE Cannot be self-cast
|
||||
SPELL_ATTR1_REQ_COMBO_POINTS1 = 0x00100000, // TITLE Requires combo points (type 1)
|
||||
SPELL_ATTR1_UNK21 = 0x00200000, // TITLE Unknown attribute 21@Attr1
|
||||
SPELL_ATTR1_REQ_COMBO_POINTS2 = 0x00400000, // TITLE Requires combo points (type 2)
|
||||
SPELL_ATTR1_UNK23 = 0x00800000, // TITLE Unknwon attribute 23@Attr1
|
||||
SPELL_ATTR1_IS_FISHING = 0x01000000, // TITLE Fishing (client only)
|
||||
SPELL_ATTR1_UNK25 = 0x02000000, // TITLE Unknown attribute 25@Attr1
|
||||
SPELL_ATTR1_UNK26 = 0x04000000, // TITLE Unknown attribute 26@Attr1 DESCRIPTION Related to [target=focus] and [target=mouseover] macros?
|
||||
SPELL_ATTR1_UNK27 = 0x08000000, // TITLE Unknown attribute 27@Attr1 DESCRIPTION Melee spell?
|
||||
SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR = 0x10000000, // TITLE Hide in aura bar (client only)
|
||||
SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME = 0x20000000, // TITLE Show spell name during channel (client only)
|
||||
SPELL_ATTR1_ENABLE_AT_DODGE = 0x40000000, // TITLE Enable at dodge
|
||||
SPELL_ATTR1_UNK31 = 0x80000000 // TITLE Unknown attribute 31@Attr1
|
||||
SPELL_ATTR1_EXCLUDE_CASTER = 0x00080000, // TITLE Cannot be self-cast
|
||||
SPELL_ATTR1_FINISHING_MOVE_DAMAGE = 0x00100000, // TITLE Requires combo points (type 1)
|
||||
SPELL_ATTR1_THREAT_ONLY_ON_MISS = 0x00200000, // TITLE Unknown attribute 21@Attr1
|
||||
SPELL_ATTR1_FINISHING_MOVE_DURATION = 0x00400000, // TITLE Requires combo points (type 2)
|
||||
SPELL_ATTR1_IGNORE_OWNERS_DEATH = 0x00800000, // TITLE Unknwon attribute 23@Attr1
|
||||
SPELL_ATTR1_SPECIAL_SKILLUP = 0x01000000, // TITLE Fishing (client only)
|
||||
SPELL_ATTR1_AURA_STAYS_AFTER_COMBAT = 0x02000000, // TITLE Unknown attribute 25@Attr1
|
||||
SPELL_ATTR1_REQUIRE_ALL_TARGETS = 0x04000000, // TITLE Unknown attribute 26@Attr1 DESCRIPTION Related to [target=focus] and [target=mouseover] macros?
|
||||
SPELL_ATTR1_DISCOUNT_POWER_ON_MISS = 0x08000000, // TITLE Unknown attribute 27@Attr1 DESCRIPTION Melee spell?
|
||||
SPELL_ATTR1_NO_AURA_ICON = 0x10000000, // TITLE Hide in aura bar (client only)
|
||||
SPELL_ATTR1_NAME_IN_CHANNEL_BAR = 0x20000000, // TITLE Show spell name during channel (client only)
|
||||
SPELL_ATTR1_COMBO_ON_BLOCK = 0x40000000, // TITLE Enable at dodge DESCRIPTION (Mainline: Dispel All Stacks)
|
||||
SPELL_ATTR1_CAST_WHEN_LEARNED = 0x80000000 // TITLE Unknown attribute 31@Attr1
|
||||
};
|
||||
|
||||
enum SpellAttr2
|
||||
{
|
||||
SPELL_ATTR2_CAN_TARGET_DEAD = 0x00000001, // TITLE Can target dead players or corpses
|
||||
SPELL_ATTR2_UNK1 = 0x00000002, // TITLE Unknown attribute 1@Attr2 DESCRIPTION vanish, shadowform, Ghost Wolf and other
|
||||
SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS = 0x00000004, // TITLE Ignore Line of Sight
|
||||
SPELL_ATTR2_UNK3 = 0x00000008, // TITLE Ignore aura scaling
|
||||
SPELL_ATTR2_DISPLAY_IN_STANCE_BAR = 0x00000010, // TITLE Show in stance bar (client only)
|
||||
SPELL_ATTR2_AUTOREPEAT_FLAG = 0x00000020, // TITLE Ranged auto-attack spell
|
||||
SPELL_ATTR2_CANT_TARGET_TAPPED = 0x00000040, // TITLE Cannot target others' tapped units DESCRIPTION Can only target untapped units, or those tapped by caster
|
||||
SPELL_ATTR2_UNK7 = 0x00000080, // TITLE Unknown attribute 7@Attr2
|
||||
SPELL_ATTR2_UNK8 = 0x00000100, // TITLE Unknown attribute 8@Attr2 DESCRIPTION not set in 3.0.3
|
||||
SPELL_ATTR2_UNK9 = 0x00000200, // TITLE Unknown attribute 9@Attr2
|
||||
SPELL_ATTR2_UNK10 = 0x00000400, // TITLE Unknown attribute 10@Attr2 DESCRIPTION Related to taming?
|
||||
SPELL_ATTR2_HEALTH_FUNNEL = 0x00000800, // TITLE Health Funnel
|
||||
SPELL_ATTR2_UNK12 = 0x00001000, // TITLE Unknown attribute 12@Attr2 DESCRIPTION Cleave, Heart Strike, Maul, Sunder Armor, Swipe
|
||||
SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA = 0x00002000, // TITLE Enchant persists when entering arena
|
||||
SPELL_ATTR2_UNK14 = 0x00004000, // TITLE Unknown attribute 14@Attr2
|
||||
SPELL_ATTR2_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr2 DESCRIPTION not set in 3.0.3
|
||||
SPELL_ATTR2_TAME_BEAST = 0x00010000, // TITLE Tame Beast
|
||||
SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS = 0x00020000, // TITLE Don't reset swing timer DESCRIPTION Does not reset melee/ranged autoattack timer on cast
|
||||
SPELL_ATTR2_REQ_DEAD_PET = 0x00040000, // TITLE Requires dead pet
|
||||
SPELL_ATTR2_NOT_NEED_SHAPESHIFT = 0x00080000, // TITLE Also allow outside shapeshift DESCRIPTION Even if Stances are nonzero, allow spell to be cast outside of shapeshift (though not in a different shapeshift)
|
||||
SPELL_ATTR2_UNK20 = 0x00100000, // TITLE Unknown attribute 20@Attr2
|
||||
SPELL_ATTR2_DAMAGE_REDUCED_SHIELD = 0x00200000, // TITLE Damage reduction ability DESCRIPTION Causes BG flags to be dropped if combined with ATTR1_DISPEL_AURAS_ON_IMMUNITY
|
||||
SPELL_ATTR2_UNK22 = 0x00400000, // TITLE Unknown attribute 22@Attr2 DESCRIPTION Ambush, Backstab, Cheap Shot, Death Grip, Garrote, Judgements, Mutilate, Pounce, Ravage, Shiv, Shred
|
||||
SPELL_ATTR2_IS_ARCANE_CONCENTRATION = 0x00800000, // TITLE Arcane Concentration
|
||||
SPELL_ATTR2_UNK24 = 0x01000000, // TITLE Unknown attribute 24@Attr2
|
||||
SPELL_ATTR2_UNK25 = 0x02000000, // TITLE Unknown attribute 25@Attr2
|
||||
SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE = 0x04000000, // TITLE Pierce aura application immunities DESCRIPTION Allow aura to be applied despite target being immune to new aura applications
|
||||
SPELL_ATTR2_UNK27 = 0x08000000, // TITLE Unknown attribute 27@Attr2
|
||||
SPELL_ATTR2_UNK28 = 0x10000000, // TITLE Unknown attribute 28@Attr2
|
||||
SPELL_ATTR2_ALLOW_DEAD_TARGET = 0x00000001, // TITLE Can target dead players or corpses
|
||||
SPELL_ATTR2_NO_SHAPESHIFT_UI = 0x00000002, // TITLE Unknown attribute 1@Attr2 DESCRIPTION vanish, shadowform, Ghost Wolf and other
|
||||
SPELL_ATTR2_IGNORE_LINE_OF_SIGHT = 0x00000004, // TITLE Ignore Line of Sight
|
||||
SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF = 0x00000008, // TITLE Ignore aura scaling
|
||||
SPELL_ATTR2_USE_SHAPESHIFT_BAR = 0x00000010, // TITLE Show in stance bar (client only)
|
||||
SPELL_ATTR2_AUTO_REPEAT = 0x00000020, // TITLE Ranged auto-attack spell
|
||||
SPELL_ATTR2_CANNOT_CAST_ON_TAPPED = 0x00000040, // TITLE Cannot target others' tapped units DESCRIPTION Can only target untapped units, or those tapped by caster
|
||||
SPELL_ATTR2_DO_NOT_REPORT_SPELL_FAILURE = 0x00000080, // TITLE Unknown attribute 7@Attr2
|
||||
SPELL_ATTR2_INCLUDE_IN_ADVANCED_COMBAT_LOG = 0x00000100, // TITLE Unknown attribute 8@Attr2 DESCRIPTION not set in 3.0.3
|
||||
SPELL_ATTR2_ALWAYS_CAST_AS_UNIT = 0x00000200, // TITLE Unknown attribute 9@Attr2
|
||||
SPELL_ATTR2_SPECIAL_TAMING_FLAG = 0x00000400, // TITLE Unknown attribute 10@Attr2 DESCRIPTION Related to taming?
|
||||
SPELL_ATTR2_NO_TARGET_PER_SECOND_COST = 0x00000800, // TITLE Health Funnel
|
||||
SPELL_ATTR2_CHAIN_FROM_CASTER = 0x00001000, // TITLE Unknown attribute 12@Attr2 DESCRIPTION Cleave, Heart Strike, Maul, Sunder Armor, Swipe
|
||||
SPELL_ATTR2_ENCHANT_OWN_ITEM_ONLY = 0x00002000, // TITLE Enchant persists when entering arena
|
||||
SPELL_ATTR2_ALLOW_WHILE_INVISIBLE = 0x00004000, // TITLE Unknown attribute 14@Attr2
|
||||
SPELL_ATTR2_DO_NOT_CONSUME_IF_GAINED_DURING_CAST = 0x00008000, // TITLE Unknown attribute 15@Attr2 DESCRIPTION not set in 3.0.3
|
||||
SPELL_ATTR2_NO_ACTIVE_PETS = 0x00010000, // TITLE Tame Beast
|
||||
SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS = 0x00020000, // TITLE Don't reset swing timer DESCRIPTION Does not reset melee/ranged autoattack timer on cast
|
||||
SPELL_ATTR2_NO_JUMP_WHILE_CAST_PENDING = 0x00040000, // TITLE Requires dead pet
|
||||
SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED = 0x00080000, // TITLE Also allow outside shapeshift (caster form) DESCRIPTION Even if Stances are nonzero, allow spell to be cast outside of shapeshift (though not in a different shapeshift)
|
||||
SPELL_ATTR2_INITIATE_COMBAT_POST_CAST = 0x00100000, // TITLE (Enables Auto-Attack)
|
||||
SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE = 0x00200000, // TITLE Damage reduction ability DESCRIPTION Causes BG flags to be dropped if combined with ATTR1_DISPEL_AURAS_ON_IMMUNITY
|
||||
SPELL_ATTR2_NO_INITIAL_THREAD = 0x00400000, // TITLE Unknown attribute 22@Attr2 DESCRIPTION Ambush, Backstab, Cheap Shot, Death Grip, Garrote, Judgements, Mutilate, Pounce, Ravage, Shiv, Shred
|
||||
SPELL_ATTR2_PROC_COOLDOWN_ON_FAILURE = 0x00800000, // TITLE Arcane Concentration
|
||||
SPELL_ATTR2_ITEM_CAST_WITH_OWNER_SKILL = 0x01000000, // TITLE Unknown attribute 24@Attr2
|
||||
SPELL_ATTR2_DONT_BLOCK_MANA_REGEN = 0x02000000, // TITLE Unknown attribute 25@Attr2
|
||||
SPELL_ATTR2_NO_SCHOOL_IMMUNITIES = 0x04000000, // TITLE Pierce aura application immunities DESCRIPTION Allow aura to be applied despite target being immune to new aura applications
|
||||
SPELL_ATTR2_IGNORE_WEAPONSKILL = 0x08000000, // TITLE Unknown attribute 27@Attr2
|
||||
SPELL_ATTR2_NOT_AN_ACTION = 0x10000000, // TITLE Unknown attribute 28@Attr2
|
||||
SPELL_ATTR2_CANT_CRIT = 0x20000000, // TITLE Cannot critically strike
|
||||
SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // TITLE Allow triggered spell to trigger (type 1) DESCRIPTION Without this attribute, any triggered spell will be unable to trigger other auras' procs
|
||||
SPELL_ATTR2_FOOD_BUFF = 0x80000000 // TITLE Food buff (client only)
|
||||
SPELL_ATTR2_ACTIVE_THREAT = 0x40000000, // TITLE Allow triggered spell to trigger (type 1) DESCRIPTION Without this attribute, any triggered spell will be unable to trigger other auras' procs
|
||||
SPELL_ATTR2_RETAIN_ITEM_CAST = 0x80000000 // TITLE Food buff (client only)
|
||||
};
|
||||
|
||||
enum SpellAttr3
|
||||
{
|
||||
SPELL_ATTR3_UNK0 = 0x00000001, // TITLE Unknown attribute 0@Attr3
|
||||
SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK = 0x00000002, // 1 Ignores subclass mask check when checking proc
|
||||
SPELL_ATTR3_UNK2 = 0x00000004, // TITLE Unknown attribute 2@Attr3
|
||||
SPELL_ATTR3_BLOCKABLE_SPELL = 0x00000008, // TITLE Blockable spell
|
||||
SPELL_ATTR3_IGNORE_RESURRECTION_TIMER = 0x00000010, // TITLE Ignore resurrection timer
|
||||
SPELL_ATTR3_UNK5 = 0x00000020, // TITLE Unknown attribute 5@Attr3
|
||||
SPELL_ATTR3_UNK6 = 0x00000040, // TITLE Unknown attribute 6@Attr3
|
||||
SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // TITLE Stack separately for each caster
|
||||
SPELL_ATTR3_ONLY_TARGET_PLAYERS = 0x00000100, // TITLE Can only target players
|
||||
SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // TITLE Allow triggered spell to trigger (type 2) DESCRIPTION Without this attribute, any triggered spell will be unable to trigger other auras' procs
|
||||
SPELL_ATTR3_MAIN_HAND = 0x00000400, // TITLE Require main hand weapon
|
||||
SPELL_ATTR3_BATTLEGROUND = 0x00000800, // TITLE Can only be cast in battleground
|
||||
SPELL_ATTR3_ONLY_TARGET_GHOSTS = 0x00001000, // TITLE Can only target ghost players
|
||||
SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR = 0x00002000, // TITLE Do not display channel bar (client only)
|
||||
SPELL_ATTR3_IS_HONORLESS_TARGET = 0x00004000, // TITLE Honorless Target
|
||||
SPELL_ATTR3_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr3 DESCRIPTION Auto Shoot, Shoot, Throw - ranged normal attack attribute?
|
||||
SPELL_ATTR3_CANT_TRIGGER_PROC = 0x00010000, // TITLE Cannot trigger procs
|
||||
SPELL_ATTR3_NO_INITIAL_AGGRO = 0x00020000, // TITLE No initial aggro
|
||||
SPELL_ATTR3_IGNORE_HIT_RESULT = 0x00040000, // TITLE Ignore hit result DESCRIPTION Spell cannot miss, or be dodged/parried/blocked
|
||||
SPELL_ATTR3_DISABLE_PROC = 0x00080000, // TITLE Cannot trigger spells during aura proc
|
||||
SPELL_ATTR3_DEATH_PERSISTENT = 0x00100000, // TITLE Persists through death
|
||||
SPELL_ATTR3_UNK21 = 0x00200000, // TITLE Unknown attribute 21@Attr3
|
||||
SPELL_ATTR3_REQ_WAND = 0x00400000, // TITLE Requires equipped Wand
|
||||
SPELL_ATTR3_UNK23 = 0x00800000, // TITLE Unknown attribute 23@Attr3
|
||||
SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // TITLE Requires offhand weapon
|
||||
SPELL_ATTR3_PVP_ENABLING = 0x00000001, // TITLE Unknown attribute 0@Attr3
|
||||
SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT = 0x00000002, // TITLE 1 Ignores subclass mask check when checking proc
|
||||
SPELL_ATTR3_NO_CASTING_BAR_TEXT = 0x00000004, // TITLE Unknown attribute 2@Attr3
|
||||
SPELL_ATTR3_COMPLETELY_BLOCKED = 0x00000008, // TITLE Blockable spell
|
||||
SPELL_ATTR3_NO_RES_TIMER = 0x00000010, // TITLE Ignore resurrection timer
|
||||
SPELL_ATTR3_NO_DURABILITY_LOSS = 0x00000020, // TITLE Unknown attribute 5@Attr3
|
||||
SPELL_ATTR3_NO_AVOIDANCE = 0x00000040, // TITLE Unknown attribute 6@Attr3
|
||||
SPELL_ATTR3_DOT_STACKING_RULE = 0x00000080, // TITLE Stack separately for each caster
|
||||
SPELL_ATTR3_ONLY_ON_PLAYER = 0x00000100, // TITLE Can only target players
|
||||
SPELL_ATTR3_NOT_A_PROC = 0x00000200, // TITLE Allow triggered spell to trigger (type 2) DESCRIPTION Without this attribute, any triggered spell will be unable to trigger other auras' procs
|
||||
SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON = 0x00000400, // TITLE Require main hand weapon
|
||||
SPELL_ATTR3_ONLY_BATTLEGROUNDS = 0x00000800, // TITLE Can only be cast in battleground
|
||||
SPELL_ATTR3_ONLY_ON_GHOSTS = 0x00001000, // TITLE Can only target ghost players
|
||||
SPELL_ATTR3_HIDE_CHANNEL_BAR = 0x00002000, // TITLE Do not display channel bar (client only)
|
||||
SPELL_ATTR3_HIDE_IN_RAID_FILTER = 0x00004000, // TITLE Honorless Target
|
||||
SPELL_ATTR3_NORMAL_RANGED_ATTACK = 0x00008000, // TITLE Unknown attribute 15@Attr3 DESCRIPTION Auto Shoot, Shoot, Throw - ranged normal attack attribute?
|
||||
SPELL_ATTR3_SUPRESS_CASTER_PROCS = 0x00010000, // TITLE Cannot trigger procs
|
||||
SPELL_ATTR3_SUPRESS_TARGET_PROCS = 0x00020000, // TITLE No initial aggro
|
||||
SPELL_ATTR3_ALWAYS_HIT = 0x00040000, // TITLE Ignore hit result DESCRIPTION Spell cannot miss, or be dodged/parried/blocked
|
||||
SPELL_ATTR3_INSTANT_TARGET_PROCS = 0x00080000, // TITLE Cannot trigger spells during aura proc
|
||||
SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD = 0x00100000, // TITLE Persists through death
|
||||
SPELL_ATTR3_ONLY_PROC_OUTDOORS = 0x00200000, // TITLE Unknown attribute 21@Attr3
|
||||
SPELL_ATTR3_CASTING_CANCELS_AUTOREPEAT = 0x00400000, // TITLE Requires equipped Wand (Mainline: Do Not Trigger Target Stand)
|
||||
SPELL_ATTR3_NO_DAMAGE_HISTORY = 0x00800000, // TITLE Unknown attribute 23@Attr3
|
||||
SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON = 0x01000000, // TITLE Requires offhand weapon
|
||||
SPELL_ATTR3_TREAT_AS_PERIODIC = 0x02000000, // TITLE Treat as periodic effect
|
||||
SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // TITLE Can trigger from triggered spells
|
||||
SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // TITLE Drain Soul
|
||||
SPELL_ATTR3_UNK28 = 0x10000000, // TITLE Unknown attribute 28@Attr3
|
||||
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // TITLE Damage dealt is unaffected by modifiers
|
||||
SPELL_ATTR3_DONT_DISPLAY_RANGE = 0x40000000, // TITLE Do not show range in tooltip (client only)
|
||||
SPELL_ATTR3_UNK31 = 0x80000000 // TITLE Unknown attribute 31@Attr3
|
||||
SPELL_ATTR3_CAN_PROC_FROM_PROCS = 0x04000000, // TITLE Can trigger from triggered spells
|
||||
SPELL_ATTR3_ONLY_PROC_ON_CASTER = 0x08000000, // TITLE Drain Soul
|
||||
SPELL_ATTR3_IGNORE_CASTER_AND_TARGET_RESTRICTIONS = 0x10000000, // TITLE Unknown attribute 28@Attr3
|
||||
SPELL_ATTR3_IGNORE_CASTER_MODIFIERS = 0x20000000, // TITLE Damage dealt is unaffected by modifiers
|
||||
SPELL_ATTR3_DO_NOT_DISPLAY_RANGE = 0x40000000, // TITLE Do not show range in tooltip (client only)
|
||||
SPELL_ATTR3_NOT_ON_AOE_IMMUNE = 0x80000000 // TITLE Unknown attribute 31@Attr3
|
||||
};
|
||||
|
||||
enum SpellAttr4
|
||||
{
|
||||
SPELL_ATTR4_IGNORE_RESISTANCES = 0x00000001, // TITLE Cannot be resisted
|
||||
SPELL_ATTR4_PROC_ONLY_ON_CASTER = 0x00000002, // TITLE Only proc on self-cast
|
||||
SPELL_ATTR4_FADES_WHILE_LOGGED_OUT = 0x00000004, // TITLE Buff expires while offline DESCRIPTION Debuffs (except Resurrection Sickness) will automatically do this
|
||||
SPELL_ATTR4_UNK3 = 0x00000008, // TITLE Unknown attribute 3@Attr4
|
||||
SPELL_ATTR4_UNK4 = 0x00000010, // TITLE Treat as delayed spell DESCRIPTION This will no longer cause guards to attack on use??
|
||||
SPELL_ATTR4_UNK5 = 0x00000020, // TITLE Unknown attribute 5@Attr4
|
||||
SPELL_ATTR4_NOT_STEALABLE = 0x00000040, // TITLE Aura cannot be stolen
|
||||
SPELL_ATTR4_CAN_CAST_WHILE_CASTING = 0x00000080, // TITLE Can be cast while casting DESCRIPTION Ignores already in-progress cast and still casts
|
||||
SPELL_ATTR4_FIXED_DAMAGE = 0x00000100, // TITLE Deals fixed damage
|
||||
SPELL_ATTR4_TRIGGER_ACTIVATE = 0x00000200, // TITLE Spell is initially disabled (client only)
|
||||
SPELL_ATTR4_SPELL_VS_EXTEND_COST = 0x00000400, // TITLE Attack speed modifies cost DESCRIPTION Adds 10 to power cost for each 1s of weapon speed
|
||||
SPELL_ATTR4_UNK11 = 0x00000800, // TITLE Unknown attribute 11@Attr4
|
||||
SPELL_ATTR4_UNK12 = 0x00001000, // TITLE Unknown attribute 12@Attr4
|
||||
SPELL_ATTR4_UNK13 = 0x00002000, // TITLE Unknown attribute 13@Attr4
|
||||
SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS = 0x00004000, // TITLE Damage does not break auras
|
||||
SPELL_ATTR4_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr4
|
||||
SPELL_ATTR4_NOT_USABLE_IN_ARENA = 0x00010000, // TITLE Not usable in arena DESCRIPTION Makes spell unusable despite CD <= 10min
|
||||
SPELL_ATTR4_USABLE_IN_ARENA = 0x00020000, // TITLE Usable in arena DESCRIPTION Makes spell usable despite CD > 10min
|
||||
SPELL_ATTR4_AREA_TARGET_CHAIN = 0x00040000, // TITLE Chain area targets DESCRIPTION [NYI] Hits area targets over time instead of all at once
|
||||
SPELL_ATTR4_UNK19 = 0x00080000, // TITLE Unknown attribute 19@Attr4 DESCRIPTION proc dalayed, after damage or don't proc on absorb?
|
||||
SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER = 0x00100000, // TITLE Allow self-cast to override stronger aura (client only)
|
||||
SPELL_ATTR4_DONT_REMOVE_IN_ARENA = 0x00200000, // TITLE Keep when entering arena
|
||||
SPELL_ATTR4_UNK22 = 0x00400000, // TITLE Unknown attribute 22@Attr4 DESCRIPTION Seal of Command (42058,57770) and Gymer's Smash 55426
|
||||
SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS = 0x00800000, // TITLE Cannot trigger item spells
|
||||
SPELL_ATTR4_UNK24 = 0x01000000, // TITLE Unknown attribute 24@Attr4 DESCRIPTION Shoot-type spell?
|
||||
SPELL_ATTR4_IS_PET_SCALING = 0x02000000, // TITLE Pet Scaling aura
|
||||
SPELL_ATTR4_CAST_ONLY_IN_OUTLAND = 0x04000000, // TITLE Only in Outland/Northrend
|
||||
SPELL_ATTR4_INHERIT_CRIT_FROM_AURA = 0x08000000, // TITLE Inherit critical chance from triggering aura
|
||||
SPELL_ATTR4_UNK28 = 0x10000000, // TITLE Unknown attribute 28@Attr4 DESCRIPTION Aimed Shot
|
||||
SPELL_ATTR4_UNK29 = 0x20000000, // TITLE Unknown attribute 29@Attr4
|
||||
SPELL_ATTR4_UNK30 = 0x40000000, // TITLE Unknown attribute 30@Attr4
|
||||
SPELL_ATTR4_UNK31 = 0x80000000 // TITLE Unknown attribute 31@Attr4 DESCRIPTION Polymorph (chicken) 228 and Sonic Boom (38052,38488)
|
||||
SPELL_ATTR4_NO_CAST_LOG = 0x00000001, // TITLE Cannot be resisted
|
||||
SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET = 0x00000002, // TITLE Only proc on self-cast
|
||||
SPELL_ATTR4_AURA_EXPIRES_OFFLINE = 0x00000004, // TITLE Buff expires while offline DESCRIPTION Debuffs (except Resurrection Sickness) will automatically do this
|
||||
SPELL_ATTR4_NO_HELPFUL_THREAT = 0x00000008, // TITLE Unknown attribute 3@Attr4
|
||||
SPELL_ATTR4_NO_HARMFUL_THREAT = 0x00000010, // TITLE Treat as delayed spell DESCRIPTION This will no longer cause guards to attack on use??
|
||||
SPELL_ATTR4_ALLOW_CLIENT_TARGETING = 0x00000020, // TITLE Unknown attribute 5@Attr4
|
||||
SPELL_ATTR4_CANNOT_BE_STOLEN = 0x00000040, // TITLE Aura cannot be stolen
|
||||
SPELL_ATTR4_ALLOW_CAST_WHILE_CASTING = 0x00000080, // TITLE Can be cast while casting DESCRIPTION Ignores already in-progress cast and still casts
|
||||
SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS = 0x00000100, // TITLE Deals fixed damage
|
||||
SPELL_ATTR4_COMBAT_FEEDBACK_WHEN_USABLE = 0x00000200, // TITLE Spell is initially disabled (client only)
|
||||
SPELL_ATTR4_WEAPON_SPEED_COST_SCALING = 0x00000400, // TITLE Attack speed modifies cost DESCRIPTION Adds 10 to power cost for each 1s of weapon speed
|
||||
SPELL_ATTR4_NO_PARTIAL_IMMUNITY = 0x00000800, // TITLE Unknown attribute 11@Attr4
|
||||
SPELL_ATTR4_AURA_IS_BUFF = 0x00001000, // TITLE Unknown attribute 12@Attr4
|
||||
SPELL_ATTR4_DO_NOT_LOG_CASTER = 0x00002000, // TITLE Unknown attribute 13@Attr4
|
||||
SPELL_ATTR4_REACTIVE_DAMAGE_PROC = 0x00004000, // TITLE Damage does not break auras
|
||||
SPELL_ATTR4_NOT_IN_SPELLBOOK = 0x00008000, // TITLE Unknown attribute 15@Attr4
|
||||
SPELL_ATTR4_NOT_IN_ARENA_OR_RATED_BATTLEGROUND = 0x00010000, // TITLE Not usable in arena DESCRIPTION Makes spell unusable despite CD <= 10min
|
||||
SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS = 0x00020000, // TITLE Usable in arena DESCRIPTION Makes spell usable despite CD > 10min
|
||||
SPELL_ATTR4_BOUNCY_CHAIN_MISSILES = 0x00040000, // TITLE Chain area targets DESCRIPTION [NYI] Hits area targets over time instead of all at once
|
||||
SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING = 0x00080000, // TITLE Unknown attribute 19@Attr4 DESCRIPTION proc dalayed, after damage or don't proc on absorb?
|
||||
SPELL_ATTR4_AURA_NEVER_BOUNCES = 0x00100000, // TITLE Allow self-cast to override stronger aura (client only)
|
||||
SPELL_ATTR4_ALLOW_ENETRING_ARENA = 0x00200000, // TITLE Keep when entering arena
|
||||
SPELL_ATTR4_PROC_SUPPRESS_SWING_ANIM = 0x00400000, // TITLE Unknown attribute 22@Attr4 DESCRIPTION Seal of Command (42058,57770) and Gymer's Smash 55426
|
||||
SPELL_ATTR4_SUPRESS_WEAPON_PROCS = 0x00800000, // TITLE Cannot trigger item spells
|
||||
SPELL_ATTR4_AUTO_RANGED_COMBAT = 0x01000000, // TITLE Unknown attribute 24@Attr4 DESCRIPTION Shoot-type spell?
|
||||
SPELL_ATTR4_OWNER_POWER_SCALING = 0x02000000, // TITLE Pet Scaling aura
|
||||
SPELL_ATTR4_ONLY_FLYING_AREAS = 0x04000000, // TITLE Only in Outland/Northrend
|
||||
SPELL_ATTR4_FORCE_DISPLAY_CASTBAR = 0x08000000, // TITLE Inherit critical chance from triggering aura
|
||||
SPELL_ATTR4_IGNORE_COMBAT_TIMERS = 0x10000000, // TITLE Unknown attribute 28@Attr4 DESCRIPTION Aimed Shot
|
||||
SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL = 0x20000000, // TITLE Unknown attribute 29@Attr4
|
||||
SPELL_ATTR4_OBSOLETE = 0x40000000, // TITLE Unknown attribute 30@Attr4
|
||||
SPELL_ATTR4_USE_FACING_FROM_SPELL = 0x80000000 // TITLE Unknown attribute 31@Attr4 DESCRIPTION Polymorph (chicken) 228 and Sonic Boom (38052,38488)
|
||||
};
|
||||
|
||||
enum SpellAttr5
|
||||
{
|
||||
SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING = 0x00000001, // TITLE Can be channeled while moving
|
||||
SPELL_ATTR5_NO_REAGENT_WHILE_PREP = 0x00000002, // TITLE No reagents during arena preparation
|
||||
SPELL_ATTR5_REMOVE_ON_ARENA_ENTER = 0x00000004, // TITLE Remove when entering arena DESCRIPTION Force this aura to be removed on entering arena, regardless of other properties
|
||||
SPELL_ATTR5_USABLE_WHILE_STUNNED = 0x00000008, // TITLE Usable while stunned
|
||||
SPELL_ATTR5_UNK4 = 0x00000010, // TITLE Unknown attribute 4@Attr5
|
||||
SPELL_ATTR5_SINGLE_TARGET_SPELL = 0x00000020, // TITLE Single-target aura DESCRIPTION Remove previous application to another unit if applied
|
||||
SPELL_ATTR5_UNK6 = 0x00000040, // TITLE Unknown attribute 6@Attr5
|
||||
SPELL_ATTR5_UNK7 = 0x00000080, // TITLE Unknown attribute 7@Attr5
|
||||
SPELL_ATTR5_CANT_TARGET_PLAYER_CONTROLLED = 0x00000100, // TITLE Cannot target player controlled units but can target players
|
||||
SPELL_ATTR5_START_PERIODIC_AT_APPLY = 0x00000200, // TITLE Immediately do periodic tick on apply
|
||||
SPELL_ATTR5_HIDE_DURATION = 0x00000400, // TITLE Do not send aura duration to client
|
||||
SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET = 0x00000800, // TITLE Auto-target target of target (client only)
|
||||
SPELL_ATTR5_UNK12 = 0x00001000, // TITLE Unknown attribute 12@Attr5 DESCRIPTION Cleave related?
|
||||
SPELL_ATTR5_HASTE_AFFECT_DURATION = 0x00002000, // TITLE Duration scales with Haste Rating
|
||||
SPELL_ATTR5_NOT_USABLE_WHILE_CHARMED = 0x00004000, // TITLE Charmed units cannot cast this spell
|
||||
SPELL_ATTR5_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr5 DESCRIPTION Related to multi-target spells?
|
||||
SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK = 0x00010000, // TITLE DESCRIPTION this allows spells with EquippedItemClass to affect spells from other items if the required item is equipped
|
||||
SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // TITLE Usable while feared
|
||||
SPELL_ATTR5_USABLE_WHILE_CONFUSED = 0x00040000, // TITLE Usable while confused
|
||||
SPELL_ATTR5_DONT_TURN_DURING_CAST = 0x00080000, // TITLE Do not auto-turn while casting
|
||||
SPELL_ATTR5_UNK20 = 0x00100000, // TITLE Unknown attribute 20@Attr5
|
||||
SPELL_ATTR5_UNK21 = 0x00200000, // TITLE Unknown attribute 21@Attr5
|
||||
SPELL_ATTR5_UNK22 = 0x00400000, // TITLE Unknown attribute 22@Attr5
|
||||
SPELL_ATTR5_UNK23 = 0x00800000, // TITLE Unknown attribute 23@Attr5
|
||||
SPELL_ATTR5_UNK24 = 0x01000000, // TITLE Unknown attribute 24@Attr5
|
||||
SPELL_ATTR5_UNK25 = 0x02000000, // TITLE Unknown attribute 25@Attr5
|
||||
SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK = 0x04000000, // TITLE Ignore line of sight checks
|
||||
SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST = 0x08000000, // TITLE Don't show aura if self-cast (client only)
|
||||
SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST = 0x10000000, // TITLE Don't show aura unless self-cast (client only)
|
||||
SPELL_ATTR5_UNK29 = 0x20000000, // TITLE Unknown attribute 29@Attr5
|
||||
SPELL_ATTR5_UNK30 = 0x40000000, // TITLE Unknown attribute 30@Attr5
|
||||
SPELL_ATTR5_UNK31 = 0x80000000 // TITLE Unknown attribute 31@Attr5 DESCRIPTION Forces nearby enemies to attack caster?
|
||||
SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL = 0x00000001, // TITLE Can be channeled while moving
|
||||
SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA = 0x00000002, // TITLE No reagents during arena preparation
|
||||
SPELL_ATTR5_REMOVE_ENTERING_ARENA = 0x00000004, // TITLE Remove when entering arena DESCRIPTION Force this aura to be removed on entering arena, regardless of other properties
|
||||
SPELL_ATTR5_ALLOW_WHILE_STUNNED = 0x00000008, // TITLE Usable while stunned
|
||||
SPELL_ATTR5_TRIGGERS_CHANNELING = 0x00000010, // TITLE Unknown attribute 4@Attr5
|
||||
SPELL_ATTR5_LIMIT_N = 0x00000020, // TITLE Single-target aura DESCRIPTION Remove previous application to another unit if applied
|
||||
SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK = 0x00000040, // TITLE Unknown attribute 6@Attr5
|
||||
SPELL_ATTR5_NOT_ON_PLAYER = 0x00000080, // TITLE Unknown attribute 7@Attr5
|
||||
SPELL_ATTR5_NOT_ON_PLAYER_CONTROLLED_NPC = 0x00000100, // TITLE Cannot target player controlled units but can target players
|
||||
SPELL_ATTR5_EXTRA_INITIAL_PERIOD = 0x00000200, // TITLE Immediately do periodic tick on apply
|
||||
SPELL_ATTR5_DO_NOT_DISPLAY_DURATION = 0x00000400, // TITLE Do not send aura duration to client
|
||||
SPELL_ATTR5_IMPLIED_TARGETING = 0x00000800, // TITLE Auto-target target of target (client only)
|
||||
SPELL_ATTR5_MELEE_CHAIN_TARGETING = 0x00001000, // TITLE Unknown attribute 12@Attr5 DESCRIPTION Cleave related?
|
||||
SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC = 0x00002000, // TITLE Duration scales with Haste Rating
|
||||
SPELL_ATTR5_NOT_AVALIABLE_WHILE_CHARMED = 0x00004000, // TITLE Charmed units cannot cast this spell
|
||||
SPELL_ATTR5_TREAT_AS_AREA_EFFECT = 0x00008000, // TITLE Unknown attribute 15@Attr5 DESCRIPTION Related to multi-target spells?
|
||||
SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPED_ITEM = 0x00010000, // TITLE DESCRIPTION this allows spells with EquippedItemClass to affect spells from other items if the required item is equipped
|
||||
SPELL_ATTR5_ALLOW_WHILE_FLEEING = 0x00020000, // TITLE Usable while feared
|
||||
SPELL_ATTR5_ALLOW_WHILE_CONFUSED = 0x00040000, // TITLE Usable while confused
|
||||
SPELL_ATTR5_AI_DOESNT_FACE_TARGET = 0x00080000, // TITLE Do not auto-turn while casting
|
||||
SPELL_ATTR5_DO_NOT_ATTEMPT_A_PET_RESUMMON_WHEN_DISMOUNTING = 0x00100000, // TITLE Unknown attribute 20@Attr5
|
||||
SPELL_ATTR5_IGNORE_TARGET_REQUIREMENTS = 0x00200000, // TITLE Unknown attribute 21@Attr5
|
||||
SPELL_ATTR5_NOT_ON_TRIVIAL = 0x00400000, // TITLE Unknown attribute 22@Attr5
|
||||
SPELL_ATTR5_NO_PARTIAL_RESISTS = 0x00800000, // TITLE Unknown attribute 23@Attr5
|
||||
SPELL_ATTR5_IGNORE_CASTER_REQUIREMENETS = 0x01000000, // TITLE Unknown attribute 24@Attr5
|
||||
SPELL_ATTR5_ALWAYS_LINE_OF_SIGHT = 0x02000000, // TITLE Unknown attribute 25@Attr5
|
||||
SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT = 0x04000000, // TITLE Ignore line of sight checks
|
||||
SPELL_ATTR5_NO_CASTER_AURA_ICON = 0x08000000, // TITLE Don't show aura if self-cast (client only)
|
||||
SPELL_ATTR5_NO_TARGET_AURA_ICON = 0x10000000, // TITLE Don't show aura unless self-cast (client only)
|
||||
SPELL_ATTR5_AURA_UNIQUE_PER_CASTER = 0x20000000, // TITLE Unknown attribute 29@Attr5
|
||||
SPELL_ATTR5_ALWAYS_SHOW_GROUND_TEXTURE = 0x40000000, // TITLE Unknown attribute 30@Attr5
|
||||
SPELL_ATTR5_ADD_MELEE_HIT_RATING = 0x80000000 // TITLE Unknown attribute 31@Attr5 DESCRIPTION Forces nearby enemies to attack caster?
|
||||
};
|
||||
|
||||
enum SpellAttr6
|
||||
{
|
||||
SPELL_ATTR6_DONT_DISPLAY_COOLDOWN = 0x00000001, // TITLE Don't display cooldown (client only)
|
||||
SPELL_ATTR6_ONLY_IN_ARENA = 0x00000002, // TITLE Only usable in arena
|
||||
SPELL_ATTR6_IGNORE_CASTER_AURAS = 0x00000004, // TITLE Ignore all preventing caster auras
|
||||
SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG = 0x00000008, // TITLE Ignore immunity flags when assisting
|
||||
SPELL_ATTR6_UNK4 = 0x00000010, // TITLE Unknown attribute 4@Attr6
|
||||
SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES = 0x00000020, // TITLE Don't consume proc charges
|
||||
SPELL_ATTR6_USE_SPELL_CAST_EVENT = 0x00000040, // TITLE Generate spell_cast event instead of aura_start (client only)
|
||||
SPELL_ATTR6_UNK7 = 0x00000080, // TITLE Unknown attribute 7@Attr6
|
||||
SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED = 0x00000100, // TITLE Do not implicitly target in CC DESCRIPTION Implicit targeting (chaining and area targeting) will not impact crowd controlled targets
|
||||
SPELL_ATTR6_UNK9 = 0x00000200, // TITLE Unknown attribute 9@Attr6
|
||||
SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS = 0x00000400, // TITLE Can target possessed friends DESCRIPTION [NYI]
|
||||
SPELL_ATTR6_NOT_IN_RAID_INSTANCE = 0x00000800, // TITLE Unusable in raid instances
|
||||
SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE = 0x00001000, // TITLE Castable while caster is on vehicle
|
||||
SPELL_ATTR6_CAN_TARGET_INVISIBLE = 0x00002000, // TITLE Can target invisible units
|
||||
SPELL_ATTR6_UNK14 = 0x00004000, // TITLE Unknown attribute 14@Attr6
|
||||
SPELL_ATTR6_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr6 DESCRIPTION only 54368, 67892
|
||||
SPELL_ATTR6_UNK16 = 0x00010000, // TITLE Unknown attribute 16@Attr6
|
||||
SPELL_ATTR6_UNK17 = 0x00020000, // TITLE Unknown attribute 17@Attr6 DESCRIPTION Mount related?
|
||||
SPELL_ATTR6_CAST_BY_CHARMER = 0x00040000, // TITLE Spell is cast by charmer DESCRIPTION Client will prevent casting if not possessed, charmer will be caster for all intents and purposes
|
||||
SPELL_ATTR6_UNK19 = 0x00080000, // TITLE Unknown attribute 19@Attr6 DESCRIPTION only 47488, 50782
|
||||
SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER = 0x00100000, // TITLE Only visible to caster (client only)
|
||||
SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS = 0x00200000, // TITLE Client UI target effects (client only)
|
||||
SPELL_ATTR6_UNK22 = 0x00400000, // TITLE Unknown attribute 22@Attr6 DESCRIPTION only 72054
|
||||
SPELL_ATTR6_UNK23 = 0x00800000, // TITLE Unknown attribute 23@Attr6
|
||||
SPELL_ATTR6_NO_COOLDOWN_ON_TOOLTIP = 0x00000001, // TITLE Don't display cooldown (client only)
|
||||
SPELL_ATTR6_DO_NOT_RESET_COOLDOWN_IN_ARENA = 0x00000002, // TITLE Only usable in arena
|
||||
SPELL_ATTR6_NOT_AN_ATTACK = 0x00000004, // TITLE Ignore all preventing caster auras
|
||||
SPELL_ATTR6_CAN_ASSIST_IMMUNE_PC = 0x00000008, // TITLE Ignore immunity flags when assisting
|
||||
SPELL_ATTR6_IGNORE_FOR_MOD_TIME_RATE = 0x00000010, // TITLE Unknown attribute 4@Attr6
|
||||
SPELL_ATTR6_DO_NOT_CONSUME_RESOURCES = 0x00000020, // TITLE Don't consume proc charges
|
||||
SPELL_ATTR6_FLOATING_COMBAT_TEXT_ON_CAST = 0x00000040, // TITLE Generate spell_cast event instead of aura_start (client only)
|
||||
SPELL_ATTR6_AURA_IS_WEAPON_PROC = 0x00000080, // TITLE Unknown attribute 7@Attr6
|
||||
SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS = 0x00000100, // TITLE Do not implicitly target in CC DESCRIPTION Implicit targeting (chaining and area targeting) will not impact crowd controlled targets
|
||||
SPELL_ATTR6_ALLOW_ON_CHARMED_TARGETS = 0x00000200, // TITLE Unknown attribute 9@Attr6
|
||||
SPELL_ATTR6_NO_AURA_LOG = 0x00000400, // TITLE Can target possessed friends DESCRIPTION [NYI]
|
||||
SPELL_ATTR6_NOT_IN_RAID_INSTANCES = 0x00000800, // TITLE Unusable in raid instances
|
||||
SPELL_ATTR6_ALLOW_WHILE_RIDING_VEHICLE = 0x00001000, // TITLE Castable while caster is on vehicle
|
||||
SPELL_ATTR6_IGNORE_PHASE_SHIFT = 0x00002000, // TITLE Can target invisible units
|
||||
SPELL_ATTR6_AI_PRIMARY_RANGED_ATTACK = 0x00004000, // TITLE Unknown attribute 14@Attr6
|
||||
SPELL_ATTR6_NO_PUSHBACK = 0x00008000, // TITLE Unknown attribute 15@Attr6 DESCRIPTION only 54368, 67892
|
||||
SPELL_ATTR6_NO_JUMP_PATHING = 0x00010000, // TITLE Unknown attribute 16@Attr6
|
||||
SPELL_ATTR6_ALLOW_EQUIP_WHILE_CASTING = 0x00020000, // TITLE Unknown attribute 17@Attr6 DESCRIPTION Mount related?
|
||||
SPELL_ATTR6_ORIGINATE_FROM_CONTROLLER = 0x00040000, // TITLE Spell is cast by charmer DESCRIPTION Client will prevent casting if not possessed, charmer will be caster for all intents and purposes
|
||||
SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST = 0x00080000, // TITLE Unknown attribute 19@Attr6 DESCRIPTION only 47488, 50782
|
||||
SPELL_ATTR6_AURA_ICON_ONLY_FOR_CASTER = 0x00100000, // TITLE Only visible to caster (client only) (LIMIT 10)
|
||||
SPELL_ATTR6_SHOW_MECHANIC_AS_COMBAT_TEXT = 0x00200000, // TITLE Client UI target effects (client only)
|
||||
SPELL_ATTR6_ABSORB_CANNOT_BE_IGNORED = 0x00400000, // TITLE Unknown attribute 22@Attr6 DESCRIPTION only 72054
|
||||
SPELL_ATTR6_TAPS_IMMEDIATELY = 0x00800000, // TITLE Unknown attribute 23@Attr6
|
||||
SPELL_ATTR6_CAN_TARGET_UNTARGETABLE = 0x01000000, // TITLE Can target untargetable units
|
||||
SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT = 0x02000000, // TITLE Do not reset swing timer if cast time is instant
|
||||
SPELL_ATTR6_UNK26 = 0x04000000, // TITLE Unknown attribute 26@Attr6 DESCRIPTION Player castable buff?
|
||||
SPELL_ATTR6_LIMIT_PCT_HEALING_MODS = 0x08000000, // TITLE Limit applicable %healing modifiers DESCRIPTION This prevents certain healing modifiers from applying - see implementation if you really care about details
|
||||
SPELL_ATTR6_UNK28 = 0x10000000, // TITLE Unknown attribute 28@Attr6 DESCRIPTION Death grip?
|
||||
SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS = 0x20000000, // TITLE Limit applicable %damage modifiers DESCRIPTION This prevents certain damage modifiers from applying - see implementation if you really care about details
|
||||
SPELL_ATTR6_UNK30 = 0x40000000, // TITLE Unknown attribute 30@Attr6
|
||||
SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS = 0x80000000 // TITLE Ignore cooldown modifiers for category cooldown
|
||||
SPELL_ATTR6_DOESNT_RESET_SWING_TIMER_IF_INSTANT = 0x02000000, // TITLE Do not reset swing timer if cast time is instant
|
||||
SPELL_ATTR6_VEHICLE_IMMUNITY_CATEGORY = 0x04000000, // TITLE Unknown attribute 26@Attr6 DESCRIPTION Player castable buff?
|
||||
SPELL_ATTR6_IGNORE_HEALTH_MODIFIERS = 0x08000000, // TITLE Limit applicable %healing modifiers DESCRIPTION This prevents certain healing modifiers from applying - see implementation if you really care about details
|
||||
SPELL_ATTR6_DO_NOT_SELECT_TARGET_WITH_INITIATES_COMBAT = 0x10000000, // TITLE Unknown attribute 28@Attr6 DESCRIPTION Death grip?
|
||||
SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS = 0x20000000, // TITLE Limit applicable %damage modifiers DESCRIPTION This prevents certain damage modifiers from applying - see implementation if you really care about details
|
||||
SPELL_ATTR6_DISABLE_TIED_EFFECT_POINTS = 0x40000000, // TITLE Unknown attribute 30@Attr6
|
||||
SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS = 0x80000000 // TITLE Ignore cooldown modifiers for category cooldown
|
||||
};
|
||||
|
||||
enum SpellAttr7
|
||||
{
|
||||
SPELL_ATTR7_UNK0 = 0x00000001, // TITLE Unknown attribute 0@Attr7 DESCRIPTION Shaman's new spells (Call of the ...), Feign Death.
|
||||
SPELL_ATTR7_IGNORE_DURATION_MODS = 0x00000002, // TITLE Ignore duration modifiers
|
||||
SPELL_ATTR7_REACTIVATE_AT_RESURRECT = 0x00000004, // TITLE Reactivate at resurrect (client only)
|
||||
SPELL_ATTR7_IS_CHEAT_SPELL = 0x00000008, // TITLE Is cheat spell DESCRIPTION Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS
|
||||
SPELL_ATTR7_UNK4 = 0x00000010, // TITLE Unknown attribute 4@Attr7 DESCRIPTION Soulstone related?
|
||||
SPELL_ATTR7_SUMMON_PLAYER_TOTEM = 0x00000020, // TITLE Summons player-owned totem
|
||||
SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE = 0x00000040, // TITLE Damage dealt by this does not cause spell pushback
|
||||
SPELL_ATTR7_UNK7 = 0x00000080, // TITLE Unknown attribute 7@Attr7 DESCRIPTION 66218 (Launch) spell.
|
||||
SPELL_ATTR7_HORDE_ONLY = 0x00000100, // TITLE Horde only
|
||||
SPELL_ATTR7_ALLIANCE_ONLY = 0x00000200, // TITLE Alliance only
|
||||
SPELL_ATTR7_DISPEL_CHARGES = 0x00000400, // TITLE Dispel/Spellsteal remove individual charges
|
||||
SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER = 0x00000800, // TITLE Only interrupt non-player casting
|
||||
SPELL_ATTR7_UNK12 = 0x00001000, // TITLE Unknown attribute 12@Attr7 DESCRIPTION Not set in 3.2.2a.
|
||||
SPELL_ATTR7_UNK13 = 0x00002000, // TITLE Unknown attribute 13@Attr7 DESCRIPTION Not set in 3.2.2a.
|
||||
SPELL_ATTR7_UNK14 = 0x00004000, // TITLE Unknown attribute 14@Attr7 DESCRIPTION Only 52150 (Raise Dead - Pet) spell.
|
||||
SPELL_ATTR7_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr7 DESCRIPTION Exorcism - guaranteed crit vs families?
|
||||
SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER = 0x00010000, // TITLE Can restore secondary power DESCRIPTION Only spells with this attribute can replenish a non-active power type
|
||||
SPELL_ATTR7_UNK17 = 0x00020000, // TITLE Unknown attribute 17@Attr7 DESCRIPTION Only 27965 (Suicide) spell.
|
||||
SPELL_ATTR7_HAS_CHARGE_EFFECT = 0x00040000, // TITLE Has charge effect
|
||||
SPELL_ATTR7_ZONE_TELEPORT = 0x00080000, // TITLE Is zone teleport
|
||||
SPELL_ATTR7_UNK20 = 0x00100000, // TITLE Unknown attribute 20@Attr7 DESCRIPTION Invulnerability related?
|
||||
SPELL_ATTR7_UNK21 = 0x00200000, // TITLE Unknown attribute 21@Attr7
|
||||
SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING = 0x00400000, // TITLE Ignore cold weather flying restriction DESCRIPTION Set for loaner mounts, allows them to be used despite lacking required flight skill
|
||||
SPELL_ATTR7_UNK23 = 0x00800000, // TITLE Unknown attribute 23@Attr7 DESCRIPTION Motivate, Mutilate, Shattering Throw
|
||||
SPELL_ATTR7_UNK24 = 0x01000000, // TITLE Unknown attribute 24@Attr7 DESCRIPTION Motivate, Mutilate, Perform Speech, Shattering Throw
|
||||
SPELL_ATTR7_UNK25 = 0x02000000, // TITLE Unknown attribute 25@Attr7
|
||||
SPELL_ATTR7_UNK26 = 0x04000000, // TITLE Unknown attribute 26@Attr7
|
||||
SPELL_ATTR7_UNK27 = 0x08000000, // TITLE Unknown attribute 27@Attr7
|
||||
SPELL_ATTR7_CONSOLIDATED_RAID_BUFF = 0x10000000, // TITLE Consolidate in raid buff frame (client only)
|
||||
SPELL_ATTR7_UNK29 = 0x20000000, // TITLE Unknown attribute 29@Attr7 DESCRIPTION only 69028, 71237
|
||||
SPELL_ATTR7_UNK30 = 0x40000000, // TITLE Unknown attribute 30@Attr7 DESCRIPTION Burning Determination, Divine Sacrifice, Earth Shield, Prayer of Mending
|
||||
SPELL_ATTR7_CLIENT_INDICATOR = 0x80000000 // TITLE Client indicator (client only)
|
||||
SPELL_ATTR7_ALLOW_SPELL_REFLECTION = 0x00000001, // TITLE Unknown attribute 0@Attr7 DESCRIPTION Shaman's new spells (Call of the ...), Feign Death.
|
||||
SPELL_ATTR7_NO_TARGET_DURATION_MOD = 0x00000002, // TITLE Ignore duration modifiers
|
||||
SPELL_ATTR7_DISABLE_AURA_WHILE_DEAD = 0x00000004, // TITLE Reactivate at resurrect (client only)
|
||||
SPELL_ATTR7_DEBUG_SPELL = 0x00000008, // TITLE Is cheat spell DESCRIPTION Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS
|
||||
SPELL_ATTR7_TREAT_AS_RAID_BUFF = 0x00000010, // TITLE Unknown attribute 4@Attr7 DESCRIPTION Soulstone related?
|
||||
SPELL_ATTR7_CAN_BE_MULTI_CAST = 0x00000020, // TITLE Summons player-owned totem
|
||||
SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK = 0x00000040, // TITLE Damage dealt by this does not cause spell pushback
|
||||
SPELL_ATTR7_PREPARE_FOR_VEHICLE_CONTROL_END = 0x00000080, // TITLE Unknown attribute 7@Attr7 DESCRIPTION 66218 (Launch) spell.
|
||||
SPELL_ATTR7_HORDE_SPECIFIC_SPELL = 0x00000100, // TITLE Horde only
|
||||
SPELL_ATTR7_ALLIANCE_SPECIFIC_SPELL = 0x00000200, // TITLE Alliance only
|
||||
SPELL_ATTR7_DISPEL_REMOVES_CHARGES = 0x00000400, // TITLE Dispel/Spellsteal remove individual charges
|
||||
SPELL_ATTR7_CAN_CAUSE_INTERRUPT = 0x00000800, // TITLE Only interrupt non-player casting
|
||||
SPELL_ATTR7_CAN_CAUSE_SILENCE = 0x00001000, // TITLE Unknown attribute 12@Attr7 DESCRIPTION Not set in 3.2.2a.
|
||||
SPELL_ATTR7_NO_UI_NOT_INTERRUPTIBLE = 0x00002000, // TITLE Unknown attribute 13@Attr7 DESCRIPTION Not set in 3.2.2a.
|
||||
SPELL_ATTR7_RECAST_ON_RESUMMON = 0x00004000, // TITLE Unknown attribute 14@Attr7 DESCRIPTION Only 52150 (Raise Dead - Pet) spell.
|
||||
SPELL_ATTR7_RESET_SWING_TIMER_AT_SPELL_START = 0x00008000, // TITLE Unknown attribute 15@Attr7 DESCRIPTION Exorcism - guaranteed crit vs families?
|
||||
SPELL_ATTR7_ONLY_IN_SPELLBOOK_UNTIL_LEARNED = 0x00010000, // TITLE Can restore secondary power DESCRIPTION Only spells with this attribute can replenish a non-active power type
|
||||
SPELL_ATTR7_DO_NOT_LOG_PVP_KILL = 0x00020000, // TITLE Unknown attribute 17@Attr7 DESCRIPTION Only 27965 (Suicide) spell.
|
||||
SPELL_ATTR7_ATTACK_ON_CHARGE_TO_UNIT = 0x00040000, // TITLE Has charge effect
|
||||
SPELL_ATTR7_REPORT_SPELL_FAILURE_TO_UNIT_TARGET = 0x00080000, // TITLE Is zone teleport
|
||||
SPELL_ATTR7_NO_CLIENT_FAIL_WHILE_STUNNED_FLEEING_CONFUSED = 0x00100000, // TITLE Unknown attribute 20@Attr7 DESCRIPTION Invulnerability related?
|
||||
SPELL_ATTR7_RETAIN_COOLDOWN_THROUGH_LOAD = 0x00200000, // TITLE Unknown attribute 21@Attr7
|
||||
SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT = 0x00400000, // TITLE Ignore cold weather flying restriction DESCRIPTION Set for loaner mounts, allows them to be used despite lacking required flight skill
|
||||
SPELL_ATTR7_NO_ATTACK_DODGE = 0x00800000, // TITLE Unknown attribute 23@Attr7 DESCRIPTION Motivate, Mutilate, Shattering Throw
|
||||
SPELL_ATTR7_NO_ATTACK_PARRY = 0x01000000, // TITLE Unknown attribute 24@Attr7 DESCRIPTION Motivate, Mutilate, Perform Speech, Shattering Throw
|
||||
SPELL_ATTR7_NO_ATTACK_MISS = 0x02000000, // TITLE Unknown attribute 25@Attr7
|
||||
SPELL_ATTR7_TREAT_AS_NPC_AOE = 0x04000000, // TITLE Unknown attribute 26@Attr7
|
||||
SPELL_ATTR7_BYPASS_NO_RESSURECTION_AURA = 0x08000000, // TITLE Unknown attribute 27@Attr7
|
||||
SPELL_ATTR7_DO_NOT_COUNT_FOR_PVP_SCOREBOARD = 0x10000000, // TITLE Consolidate in raid buff frame (client only)
|
||||
SPELL_ATTR7_REFLECTION_ONLY_DEFENDS = 0x20000000, // TITLE Unknown attribute 29@Attr7 DESCRIPTION only 69028, 71237
|
||||
SPELL_ATTR7_CAN_PROC_FROM_SUPPRESSED_TARGET_PROCS = 0x40000000, // TITLE Unknown attribute 30@Attr7 DESCRIPTION Burning Determination, Divine Sacrifice, Earth Shield, Prayer of Mending
|
||||
SPELL_ATTR7_ALWAYS_CAST_LOG = 0x80000000 // TITLE Client indicator (client only)
|
||||
};
|
||||
|
||||
#define MAX_TALENT_SPECS 2
|
||||
|
||||
@ -633,7 +633,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
|
||||
|
||||
if (caster)
|
||||
{
|
||||
if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC))
|
||||
m_amplitude = int32(m_amplitude * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
}
|
||||
}
|
||||
@ -642,7 +642,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
|
||||
{
|
||||
m_tickNumber = m_amplitude ? GetBase()->GetDuration() / m_amplitude : 0;
|
||||
m_periodicTimer = m_amplitude ? GetBase()->GetDuration() % m_amplitude : 0;
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR5_START_PERIODIC_AT_APPLY))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR5_EXTRA_INITIAL_PERIOD))
|
||||
++m_tickNumber;
|
||||
}
|
||||
else // aura just created or reapplied
|
||||
@ -660,7 +660,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
|
||||
// Start periodic on next tick or at aura apply
|
||||
if (m_amplitude)
|
||||
{
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR5_START_PERIODIC_AT_APPLY))
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR5_EXTRA_INITIAL_PERIOD))
|
||||
m_periodicTimer += m_amplitude;
|
||||
else if (caster && caster->IsTotem()) // for totems only ;d
|
||||
{
|
||||
@ -1294,7 +1294,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)))
|
||||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
@ -1313,7 +1313,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
|
||||
// Xinef: skip talents with effect learn spell
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)) || spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL))
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)) || spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL))
|
||||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
@ -1328,7 +1328,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId))
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId);
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)))
|
||||
continue;
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, glyph->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)), nullptr, this, target->GetGUID());
|
||||
@ -1977,7 +1977,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
bool allow = true;
|
||||
if (target->getTransForm())
|
||||
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()))
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) || !transformSpellInfo->IsPositive())
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !transformSpellInfo->IsPositive())
|
||||
allow = false;
|
||||
|
||||
if (allow)
|
||||
@ -2118,7 +2118,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
|
||||
if (apply)
|
||||
{
|
||||
// update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) || !target->GetModelForForm(target->GetShapeshiftForm()) || !GetSpellInfo()->IsPositive())
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !target->GetModelForForm(target->GetShapeshiftForm()) || !GetSpellInfo()->IsPositive())
|
||||
{
|
||||
// special case (spell specific functionality)
|
||||
if (GetMiscValue() == 0)
|
||||
@ -2290,7 +2290,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
// update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case
|
||||
SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm());
|
||||
if (!transformSpellInfo || GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive())
|
||||
if (!transformSpellInfo || GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive())
|
||||
target->setTransForm(GetId());
|
||||
|
||||
// polymorph case
|
||||
@ -2406,7 +2406,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo
|
||||
if ((*iter)->GetCurrentSpell(i) && (*iter)->GetCurrentSpell(i)->m_targets.GetUnitTargetGUID() == target->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_CAN_TARGET_INVISIBLE) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
if ((!c->IsPet() && c->GetCreatureTemplate()->rank == CREATURE_ELITE_WORLDBOSS) || c->isWorldBoss() || c->IsDungeonBoss())
|
||||
@ -3623,7 +3623,7 @@ void AuraEffect::HandleModStateImmunityMask(AuraApplication const* aurApp, uint8
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, apply);
|
||||
}
|
||||
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
|
||||
{
|
||||
target->RemoveAurasWithMechanic(mechanic_immunity_list, AURA_REMOVE_BY_DEFAULT, GetId());
|
||||
for (std::list <AuraType>::iterator iter = aura_immunity_list.begin(); iter != aura_immunity_list.end(); ++iter)
|
||||
@ -3688,7 +3688,7 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const* aurApp, uint8
|
||||
break;
|
||||
}
|
||||
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
|
||||
{
|
||||
// Xinef: exception for purely snare mechanic (eg. hands of freedom)!
|
||||
if (mechanic == (1 << MECHANIC_SNARE))
|
||||
@ -3730,7 +3730,7 @@ void AuraEffect::HandleAuraModStateImmunity(AuraApplication const* aurApp, uint8
|
||||
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_STATE, GetMiscValue(), apply);
|
||||
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
|
||||
if (apply && GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
|
||||
target->RemoveAurasByType(AuraType(GetMiscValue()), ObjectGuid::Empty, GetBase());
|
||||
}
|
||||
|
||||
@ -3766,13 +3766,13 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint
|
||||
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
|
||||
|
||||
// remove all flag auras (they are positive, but they must be removed when you are immune)
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)
|
||||
&& GetSpellInfo()->HasAttribute(SPELL_ATTR2_DAMAGE_REDUCED_SHIELD))
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT)
|
||||
&& GetSpellInfo()->HasAttribute(SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE))
|
||||
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
|
||||
|
||||
// TODO: optimalize this cycle - use RemoveAurasWithInterruptFlags call or something else
|
||||
if ((apply)
|
||||
&& GetSpellInfo()->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)
|
||||
&& GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT)
|
||||
&& GetSpellInfo()->IsPositive()) //Only positive immunity removes auras
|
||||
{
|
||||
uint32 school_mask = GetMiscValue();
|
||||
@ -4129,7 +4129,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
|
||||
|
||||
// recalculate current HP/MP after applying aura modifications (only for spells with SPELL_ATTR0_UNK4 0x00000010 flag)
|
||||
// this check is total bullshit i think
|
||||
if (GetMiscValue() == STAT_STAMINA && m_spellInfo->HasAttribute(SPELL_ATTR0_ABILITY))
|
||||
if (GetMiscValue() == STAT_STAMINA && m_spellInfo->HasAttribute(SPELL_ATTR0_IS_ABILITY))
|
||||
target->SetHealth(std::max<uint32>(uint32(healthPct * target->GetMaxHealth() * 0.01f), (alive ? 1 : 0)));
|
||||
}
|
||||
|
||||
@ -6417,7 +6417,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
|
||||
}
|
||||
|
||||
// heal for caster damage (must be alive)
|
||||
if (target != caster && GetSpellInfo()->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL) && (!caster || !caster->IsAlive()))
|
||||
if (target != caster && GetSpellInfo()->HasAttribute(SPELL_ATTR2_NO_TARGET_PER_SECOND_COST) && (!caster || !caster->IsAlive()))
|
||||
return;
|
||||
|
||||
// don't regen when permanent aura target has full power
|
||||
@ -6521,7 +6521,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
|
||||
// Health Funnel
|
||||
// damage caster for heal amount
|
||||
// xinef: caster is available, checked earlier
|
||||
if (target != caster && GetSpellInfo()->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL))
|
||||
if (target != caster && GetSpellInfo()->HasAttribute(SPELL_ATTR2_NO_TARGET_PER_SECOND_COST))
|
||||
{
|
||||
uint32 damage = GetSpellInfo()->ManaPerSecond;
|
||||
if ((int32)damage > gain && gain > 0)
|
||||
@ -6661,7 +6661,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
|
||||
{
|
||||
Powers PowerType = Powers(GetMiscValue());
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() != PowerType && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() != PowerType && !m_spellInfo->HasAttribute(SPELL_ATTR7_ONLY_IN_SPELLBOOK_UNTIL_LEARNED))
|
||||
return;
|
||||
|
||||
if (!target->IsAlive() || !target->GetMaxPower(PowerType))
|
||||
|
||||
@ -250,7 +250,7 @@ void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
|
||||
Aura const* aura = GetBase();
|
||||
data << uint32(aura->GetId());
|
||||
uint32 flags = _flags;
|
||||
if (aura->GetMaxDuration() > 0 && !aura->GetSpellInfo()->HasAttribute(SPELL_ATTR5_HIDE_DURATION))
|
||||
if (aura->GetMaxDuration() > 0 && !aura->GetSpellInfo()->HasAttribute(SPELL_ATTR5_DO_NOT_DISPLAY_DURATION))
|
||||
flags |= AFLAG_DURATION;
|
||||
data << uint8(flags);
|
||||
data << uint8(aura->GetCasterLevel());
|
||||
@ -403,7 +403,7 @@ Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item*
|
||||
m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1),
|
||||
m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false)
|
||||
{
|
||||
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL))
|
||||
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_NO_TARGET_PER_SECOND_COST))
|
||||
m_timeCla = 1 * IN_MILLISECONDS;
|
||||
|
||||
m_maxDuration = CalcMaxDuration(caster);
|
||||
@ -850,7 +850,7 @@ void Aura::RefreshDuration()
|
||||
{
|
||||
SetDuration(GetMaxDuration());
|
||||
|
||||
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL))
|
||||
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_NO_TARGET_PER_SECOND_COST))
|
||||
m_timeCla = 1 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
@ -872,7 +872,7 @@ void Aura::RefreshTimersWithMods()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
m_maxDuration = CalcMaxDuration();
|
||||
if ((caster && caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo)) || m_spellInfo->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
if ((caster && caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo)) || m_spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC))
|
||||
m_maxDuration = int32(m_maxDuration * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
|
||||
// xinef: we should take ModSpellDuration into account, but none of the spells using this function is affected by contents of ModSpellDuration
|
||||
@ -968,7 +968,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode, bool periodicRes
|
||||
return true;
|
||||
}
|
||||
|
||||
bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo->StackAmount || !m_spellInfo->HasAttribute(SPELL_ATTR1_DONT_REFRESH_DURATION_ON_RECAST));
|
||||
bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo->StackAmount || !m_spellInfo->HasAttribute(SPELL_ATTR1_AURA_UNIQUE));
|
||||
|
||||
// Update stack amount
|
||||
if (refresh)
|
||||
@ -1021,12 +1021,12 @@ bool Aura::IsDeathPersistent() const
|
||||
|
||||
bool Aura::IsRemovedOnShapeLost(Unit* target) const
|
||||
{
|
||||
return (GetCasterGUID() == target->GetGUID() && m_spellInfo->Stances && !m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && !m_spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT));
|
||||
return (GetCasterGUID() == target->GetGUID() && m_spellInfo->Stances && !m_spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED) && !m_spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED));
|
||||
}
|
||||
|
||||
bool Aura::CanBeSaved() const
|
||||
{
|
||||
if (IsPassive() || (GetSpellInfo()->HasAttribute(SPELL_ATTR0_HIDDEN_CLIENTSIDE) && GetSpellInfo()->Stances))
|
||||
if (IsPassive() || (GetSpellInfo()->HasAttribute(SPELL_ATTR0_DO_NOT_DISPLAY) && GetSpellInfo()->Stances))
|
||||
return false;
|
||||
|
||||
// Xinef: do not save channel auras
|
||||
@ -1970,7 +1970,7 @@ bool Aura::CanStackWith(Aura const* existingAura, bool remove) const
|
||||
if (existingAura->GetSpellInfo()->IsChanneled())
|
||||
return true;
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_STACK_FOR_DIFF_CASTERS))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_DOT_STACKING_RULE))
|
||||
return true;
|
||||
|
||||
// check same periodic auras
|
||||
@ -2072,7 +2072,7 @@ void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInf
|
||||
return;
|
||||
|
||||
// take one charge, aura expiration will be handled in Aura::TriggerProcOnEvent (if needed)
|
||||
if (IsUsingCharges() && (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->HasAttribute(SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES)))
|
||||
if (IsUsingCharges() && (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->HasAttribute(SPELL_ATTR6_DO_NOT_CONSUME_RESOURCES)))
|
||||
{
|
||||
--m_procCharges;
|
||||
SetNeedClientUpdateForTargets();
|
||||
@ -2130,7 +2130,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
|
||||
Unit* target = aurApp->GetTarget();
|
||||
if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER && GetSpellInfo()->EquippedItemClass != -1)
|
||||
{
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK))
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT))
|
||||
{
|
||||
Item* item = nullptr;
|
||||
if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_WEAPON)
|
||||
|
||||
@ -542,7 +542,7 @@ SpellValue::SpellValue(SpellInfo const* proto)
|
||||
|
||||
Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID, bool skipCheck) :
|
||||
m_spellInfo(sSpellMgr->GetSpellForDifficultyFromSpell(info, caster)),
|
||||
m_caster((info->HasAttribute(SPELL_ATTR6_CAST_BY_CHARMER) && caster->GetCharmerOrOwner()) ? caster->GetCharmerOrOwner() : caster)
|
||||
m_caster((info->HasAttribute(SPELL_ATTR6_ORIGINATE_FROM_CONTROLLER) && caster->GetCharmerOrOwner()) ? caster->GetCharmerOrOwner() : caster)
|
||||
, m_spellValue(new SpellValue(m_spellInfo))
|
||||
{
|
||||
m_customError = SPELL_CUSTOM_ERROR_NONE;
|
||||
@ -562,7 +562,7 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
|
||||
switch (m_spellInfo->DmgClass)
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_MELEE:
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQ_OFFHAND))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON))
|
||||
m_attackType = OFF_ATTACK;
|
||||
else
|
||||
m_attackType = BASE_ATTACK;
|
||||
@ -572,7 +572,7 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
|
||||
break;
|
||||
default:
|
||||
// Wands
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_AUTO_REPEAT))
|
||||
m_attackType = RANGED_ATTACK;
|
||||
else
|
||||
m_attackType = BASE_ATTACK;
|
||||
@ -603,7 +603,7 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
|
||||
|
||||
m_spellState = SPELL_STATE_NULL;
|
||||
_triggeredCastFlags = triggerFlags;
|
||||
if (info->HasAttribute(SPELL_ATTR4_CAN_CAST_WHILE_CASTING))
|
||||
if (info->HasAttribute(SPELL_ATTR4_ALLOW_CAST_WHILE_CASTING))
|
||||
_triggeredCastFlags = TriggerCastFlags(uint32(_triggeredCastFlags) | TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_CAST_DIRECTLY);
|
||||
|
||||
m_CastItem = nullptr;
|
||||
@ -646,8 +646,8 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
|
||||
|
||||
// Determine if spell can be reflected back to the caster
|
||||
// Patch 1.2 notes: Spell Reflection no longer reflects abilities
|
||||
m_canReflect = m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !m_spellInfo->HasAttribute(SPELL_ATTR0_ABILITY)
|
||||
&& !m_spellInfo->HasAttribute(SPELL_ATTR1_CANT_BE_REFLECTED) && !m_spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
|
||||
m_canReflect = m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !m_spellInfo->HasAttribute(SPELL_ATTR0_IS_ABILITY)
|
||||
&& !m_spellInfo->HasAttribute(SPELL_ATTR1_NO_REFLECTION) && !m_spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES)
|
||||
&& !m_spellInfo->IsPassive() && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL));
|
||||
|
||||
CleanupTargetList();
|
||||
@ -1864,11 +1864,11 @@ uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList*
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_DEAD))
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_DEAD_TARGET))
|
||||
retMask &= ~GRID_MAP_TYPE_MASK_CORPSE;
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_ONLY_TARGET_PLAYERS))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER))
|
||||
retMask &= GRID_MAP_TYPE_MASK_CORPSE | GRID_MAP_TYPE_MASK_PLAYER;
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_ONLY_TARGET_GHOSTS))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_GHOSTS))
|
||||
retMask &= GRID_MAP_TYPE_MASK_PLAYER;
|
||||
|
||||
if (condList)
|
||||
@ -1959,7 +1959,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
|
||||
}
|
||||
|
||||
// chain lightning/heal spells and similar - allow to jump at larger distance and go out of los
|
||||
bool isBouncingFar = (m_spellInfo->HasAttribute(SPELL_ATTR4_AREA_TARGET_CHAIN)
|
||||
bool isBouncingFar = (m_spellInfo->HasAttribute(SPELL_ATTR4_BOUNCY_CHAIN_MISSILES)
|
||||
|| m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE
|
||||
|| m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC);
|
||||
|
||||
@ -2051,7 +2051,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
// Auto attack
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_AUTO_REPEAT))
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_DONE_RANGED_AUTO_ATTACK;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK;
|
||||
@ -2065,7 +2065,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
|
||||
default:
|
||||
if (m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON &&
|
||||
m_spellInfo->EquippedItemSubClassMask & (1 << ITEM_SUBCLASS_WEAPON_WAND)
|
||||
&& m_spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG)) // Wands auto attack
|
||||
&& m_spellInfo->HasAttribute(SPELL_ATTR2_AUTO_REPEAT)) // Wands auto attack
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_DONE_RANGED_AUTO_ATTACK;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK;
|
||||
@ -2098,8 +2098,8 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
|
||||
if (!(m_procAttacker & PROC_FLAG_DONE_RANGED_AUTO_ATTACK))
|
||||
{
|
||||
if (_triggeredCastFlags & TRIGGERED_DISALLOW_PROC_EVENTS &&
|
||||
(m_spellInfo->HasAttribute(SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC) ||
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2)))
|
||||
(m_spellInfo->HasAttribute(SPELL_ATTR2_ACTIVE_THREAT) ||
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR3_NOT_A_PROC)))
|
||||
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
||||
else if (_triggeredCastFlags & TRIGGERED_DISALLOW_PROC_EVENTS)
|
||||
m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
|
||||
@ -2414,7 +2414,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
m_spellAura = nullptr; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied
|
||||
|
||||
//Spells with this flag cannot trigger if effect is casted on self
|
||||
bool canEffectTrigger = !m_spellInfo->HasAttribute(SPELL_ATTR3_CANT_TRIGGER_PROC) && unitTarget->CanProc() && (CanExecuteTriggersOnHit(mask) || missInfo == SPELL_MISS_IMMUNE2);
|
||||
bool canEffectTrigger = !m_spellInfo->HasAttribute(SPELL_ATTR3_SUPRESS_CASTER_PROCS) && unitTarget->CanProc() && (CanExecuteTriggersOnHit(mask) || missInfo == SPELL_MISS_IMMUNE2);
|
||||
bool reflectedSpell = missInfo == SPELL_MISS_REFLECT;
|
||||
Unit* spellHitTarget = nullptr;
|
||||
|
||||
@ -2617,8 +2617,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
if (canEffectTrigger)
|
||||
{
|
||||
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET) == 0 &&
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS) == 0 && (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED))
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT) == 0 &&
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR4_SUPRESS_WEAPON_PROCS) == 0 && (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED))
|
||||
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim, procEx);
|
||||
}
|
||||
|
||||
@ -2636,8 +2636,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
|
||||
// Xinef: eg. rogue poisons can proc off cheap shot, etc. so this block should be here also
|
||||
// Xinef: ofc count only spells that HIT the target, little hack used to fool the system
|
||||
if ((procEx & PROC_EX_NORMAL_HIT || procEx & PROC_EX_CRITICAL_HIT) && caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET) == 0 &&
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS) == 0 && (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED))
|
||||
if ((procEx & PROC_EX_NORMAL_HIT || procEx & PROC_EX_CRITICAL_HIT) && caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT) == 0 &&
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR4_SUPRESS_WEAPON_PROCS) == 0 && (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED))
|
||||
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim | PROC_FLAG_TAKEN_DAMAGE, procEx);
|
||||
}
|
||||
|
||||
@ -2654,7 +2654,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
|
||||
{
|
||||
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_NO_INITIAL_AGGRO));
|
||||
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
||||
|
||||
// Unsure if there are more spells that are not supposed to stop enemy from
|
||||
// regenerating HP from food, so for now it stays as an ID.
|
||||
@ -2672,8 +2672,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
if (missInfo != SPELL_MISS_EVADE && effectUnit != m_caster && m_caster->IsFriendlyTo(effectUnit) && m_spellInfo->IsPositive() && effectUnit->IsInCombat())
|
||||
m_caster->SetInCombatWith(effectUnit);
|
||||
|
||||
// Check for SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER) && effectUnit->GetTypeId() != TYPEID_PLAYER)
|
||||
// Check for SPELL_ATTR7_CAN_CAUSE_INTERRUPT
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_CAUSE_INTERRUPT) && effectUnit->GetTypeId() != TYPEID_PLAYER)
|
||||
caster->CastSpell(effectUnit, SPELL_INTERRUPT_NONPLAYER, true);
|
||||
|
||||
if (spellHitTarget)
|
||||
@ -2786,7 +2786,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
}
|
||||
|
||||
// xinef: triggered spells should not prolong combat
|
||||
if (unit->IsInCombat() && !m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO) && !m_triggeredByAuraSpell)
|
||||
if (unit->IsInCombat() && !m_spellInfo->HasAttribute(SPELL_ATTR3_SUPRESS_TARGET_PROCS) && !m_triggeredByAuraSpell)
|
||||
{
|
||||
// xinef: start combat with hostile unit...
|
||||
if (Unit* hostile = unit->getAttackerForHelper())
|
||||
@ -2904,7 +2904,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive, effectMask);
|
||||
|
||||
// xinef: haste affects duration of those spells twice
|
||||
if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC))
|
||||
duration = int32(duration * m_originalCaster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
|
||||
if (duration != m_spellAura->GetMaxDuration())
|
||||
@ -3127,7 +3127,7 @@ bool Spell::UpdateChanneledTargetList()
|
||||
continue;
|
||||
}
|
||||
// Xinef: Update Orientation server side (non players wont sent appropriate packets)
|
||||
else if (m_spellInfo->HasAttribute(SPELL_ATTR1_CHANNEL_TRACK_TARGET))
|
||||
else if (m_spellInfo->HasAttribute(SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL))
|
||||
m_caster->UpdateOrientation(m_caster->GetAngle(unit));
|
||||
}
|
||||
}
|
||||
@ -3482,8 +3482,8 @@ void Spell::_cast(bool skipCheck)
|
||||
return;
|
||||
}
|
||||
|
||||
// Xinef: implement attribute SPELL_ATTR1_DISMISS_PET, on spell cast current pet is dismissed and charms are removed
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET))
|
||||
// Xinef: implement attribute SPELL_ATTR1_DISMISS_PET_FIRST, on spell cast current pet is dismissed and charms are removed
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET_FIRST))
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->HasEffect(SPELL_EFFECT_SUMMON_PET))
|
||||
if (Pet* pet = m_caster->ToPlayer()->GetPet())
|
||||
@ -3504,8 +3504,8 @@ void Spell::_cast(bool skipCheck)
|
||||
// As of 3.0.2 pets begin attacking their owner's target immediately
|
||||
// Let any pets know we've attacked something. Check DmgClass for harmful spells only
|
||||
// This prevents spells such as Hunter's Mark from triggering pet attack
|
||||
// xinef: take into account SPELL_ATTR3_NO_INITIAL_AGGRO
|
||||
if ((m_targets.GetTargetMask() & TARGET_FLAG_UNIT) && GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE && !GetSpellInfo()->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO))
|
||||
// xinef: take into account SPELL_ATTR3_SUPRESS_TARGET_PROCS
|
||||
if ((m_targets.GetTargetMask() & TARGET_FLAG_UNIT) && GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE && !GetSpellInfo()->HasAttribute(SPELL_ATTR3_SUPRESS_TARGET_PROCS))
|
||||
if (!playerCaster->m_Controlled.empty())
|
||||
for (Unit::ControlSet::iterator itr = playerCaster->m_Controlled.begin(); itr != playerCaster->m_Controlled.end(); ++itr)
|
||||
if (Unit* pet = *itr)
|
||||
@ -3677,7 +3677,7 @@ void Spell::_cast(bool skipCheck)
|
||||
|
||||
// Interrupt Spell casting
|
||||
// handle this here, in other places SpellHitTarget can be set to nullptr, if there is an error in this function
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_CAUSE_INTERRUPT))
|
||||
if (Unit* target = m_targets.GetUnitTarget())
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
m_caster->CastSpell(target, 32747, true);
|
||||
@ -3686,7 +3686,7 @@ void Spell::_cast(bool skipCheck)
|
||||
if (Unit* target = m_targets.GetUnitTarget())
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER || (m_caster->IsPet() && m_caster->IsControlledByPlayer()))
|
||||
if (GetDelayMoment() > 0 && !m_caster->IsFriendlyTo(target) && !m_spellInfo->HasAura(SPELL_AURA_BIND_SIGHT) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
|
||||
m_caster->CombatStartOnCast(target, !m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO), GetDelayMoment() + 500); // xinef: increase this time so we dont leave and enter combat in a moment
|
||||
m_caster->CombatStartOnCast(target, !m_spellInfo->HasAttribute(SPELL_ATTR3_SUPRESS_TARGET_PROCS), GetDelayMoment() + 500); // xinef: increase this time so we dont leave and enter combat in a moment
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_COOLDOWN))
|
||||
@ -3709,7 +3709,7 @@ void Spell::handle_immediate()
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
// Apply haste mods
|
||||
if (m_caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
if (m_caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC))
|
||||
duration = int32(duration * m_caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
|
||||
m_spellState = SPELL_STATE_CASTING;
|
||||
@ -4085,7 +4085,7 @@ void Spell::finish(bool ok)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found && !m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS))
|
||||
if (!found && !m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS))
|
||||
{
|
||||
bool allow = true;
|
||||
if (m_casttime == 0 && m_spellInfo->CalcCastTime())
|
||||
@ -4115,7 +4115,7 @@ void Spell::finish(bool ok)
|
||||
m_caster->ModifyAuraState(AuraStateType(m_spellInfo->CasterAuraState), false);
|
||||
|
||||
// Stop Attack for some spells
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT))
|
||||
m_caster->AttackStop();
|
||||
}
|
||||
|
||||
@ -4284,7 +4284,7 @@ void Spell::SendSpellStart()
|
||||
if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_spellInfo->IsChanneled())
|
||||
castFlags |= CAST_FLAG_PENDING;
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT))
|
||||
castFlags |= CAST_FLAG_AMMO;
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||
(m_caster->GetTypeId() == TYPEID_UNIT && m_caster->IsPet()))
|
||||
@ -4340,7 +4340,7 @@ void Spell::SendSpellGo()
|
||||
if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_spellInfo->IsChanneled())
|
||||
castFlags |= CAST_FLAG_PENDING;
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT))
|
||||
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
|
||||
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||
@ -4738,7 +4738,7 @@ void Spell::SendResurrectRequest(Player* target)
|
||||
|
||||
data << uint8(m_caster->GetTypeId() == TYPEID_PLAYER ? 0 : 1); // "you'll be afflicted with resurrection sickness"
|
||||
// override delay sent with SMSG_CORPSE_RECLAIM_DELAY, set instant resurrection for spells with this attribute
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_IGNORE_RESURRECTION_TIMER))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_NO_RES_TIMER))
|
||||
data << uint32(0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
}
|
||||
@ -5074,7 +5074,7 @@ void Spell::HandleThreatSpells()
|
||||
if (m_UniqueTargetInfo.empty())
|
||||
return;
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_NO_THREAT) || m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_NO_THREAT) || m_spellInfo->HasAttribute(SPELL_ATTR3_SUPRESS_TARGET_PROCS))
|
||||
return;
|
||||
|
||||
float threat = 0.0f;
|
||||
@ -5146,7 +5146,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOT
|
||||
SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
// check death state
|
||||
if (!m_caster->IsAlive() && !m_spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) && !(m_spellInfo->HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_DEAD) || (IsTriggered() && !m_triggeredByAuraSpell)))
|
||||
if (!m_caster->IsAlive() && !m_spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) && !(m_spellInfo->HasAttribute(SPELL_ATTR0_ALLOW_CAST_WHILE_DEAD) || (IsTriggered() && !m_triggeredByAuraSpell)))
|
||||
return SPELL_FAILED_CASTER_DEAD;
|
||||
|
||||
// Spectator check
|
||||
@ -5186,7 +5186,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_NOT_READY;
|
||||
}
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_IS_CHEAT_SPELL) && !m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_DEBUG_SPELL) && !m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS))
|
||||
{
|
||||
m_customError = SPELL_CUSTOM_ERROR_GM_ONLY;
|
||||
return SPELL_FAILED_CUSTOM_ERROR;
|
||||
@ -5204,11 +5204,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER /*&& VMAP::VMapFactory::createOrGetVMapManager()->isLineOfSightCalcEnabled()*/) // pussywizard: optimization (commented)
|
||||
{
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_OUTDOORS_ONLY) &&
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_ONLY_OUTDOORS) &&
|
||||
!m_caster->IsOutdoors())
|
||||
return SPELL_FAILED_ONLY_OUTDOORS;
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_INDOORS_ONLY) &&
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_ONLY_INDOORS) &&
|
||||
m_caster->IsOutdoors())
|
||||
return SPELL_FAILED_ONLY_INDOORS;
|
||||
}
|
||||
@ -5334,7 +5334,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// All creatures should be able to cast as passengers freely, restriction and attribute are only for players
|
||||
VehicleSeatEntry const* vehicleSeat = vehicle->GetSeatForPassenger(m_caster);
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE) && !m_spellInfo->HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_MOUNTED)
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR6_ALLOW_WHILE_RIDING_VEHICLE) && !m_spellInfo->HasAttribute(SPELL_ATTR0_ALLOW_WHILE_MOUNTED)
|
||||
&& (vehicleSeat->m_flags & checkMask) != checkMask && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
}
|
||||
@ -5393,7 +5393,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_NOT_INFRONT;
|
||||
|
||||
if (m_caster->GetEntry() != WORLD_TRIGGER) // Ignore LOS for gameobjects casts (wrongly casted by a trigger)
|
||||
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && !m_spellInfo->HasAttribute(SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK) && !m_caster->IsWithinLOSInMap(target, LINEOFSIGHT_ALL_CHECKS) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
|
||||
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT) && !m_caster->IsWithinLOSInMap(target, LINEOFSIGHT_ALL_CHECKS) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
|
||||
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||
}
|
||||
}
|
||||
@ -5404,7 +5404,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
float x, y, z;
|
||||
m_targets.GetDstPos()->GetPosition(x, y, z);
|
||||
|
||||
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && !m_spellInfo->HasAttribute(SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK) && !m_caster->IsWithinLOS(x, y, z, LINEOFSIGHT_ALL_CHECKS))
|
||||
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT) && !m_caster->IsWithinLOS(x, y, z, LINEOFSIGHT_ALL_CHECKS))
|
||||
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||
}
|
||||
|
||||
@ -5424,15 +5424,15 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
}
|
||||
// Spell casted only on battleground
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_BATTLEGROUND) && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_ONLY_BATTLEGROUNDS) && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!m_caster->ToPlayer()->InBattleground())
|
||||
return SPELL_FAILED_ONLY_BATTLEGROUNDS;
|
||||
|
||||
// do not allow spells to be cast in arenas
|
||||
// - with greater than 10 min CD without SPELL_ATTR4_USABLE_IN_ARENA flag
|
||||
// - with SPELL_ATTR4_NOT_USABLE_IN_ARENA flag
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR4_NOT_USABLE_IN_ARENA) ||
|
||||
(m_spellInfo->GetRecoveryTime() >= 10 * MINUTE * IN_MILLISECONDS && !m_spellInfo->HasAttribute(SPELL_ATTR4_USABLE_IN_ARENA)))
|
||||
// - with greater than 10 min CD without SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS flag
|
||||
// - with SPELL_ATTR4_NOT_IN_ARENA_OR_RATED_BATTLEGROUND flag
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR4_NOT_IN_ARENA_OR_RATED_BATTLEGROUND) ||
|
||||
(m_spellInfo->GetRecoveryTime() >= 10 * MINUTE * IN_MILLISECONDS && !m_spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS)))
|
||||
if (MapEntry const* mapEntry = sMapStore.LookupEntry(m_caster->GetMapId()))
|
||||
if (mapEntry->IsBattleArena())
|
||||
return SPELL_FAILED_NOT_IN_ARENA;
|
||||
@ -5451,7 +5451,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// not let players cast spells at mount (and let do it to creatures)
|
||||
if (m_caster->IsMounted() && m_caster->GetTypeId() == TYPEID_PLAYER && !(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE) &&
|
||||
!m_spellInfo->IsPassive() && !m_spellInfo->HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_MOUNTED))
|
||||
!m_spellInfo->IsPassive() && !m_spellInfo->HasAttribute(SPELL_ATTR0_ALLOW_WHILE_MOUNTED))
|
||||
{
|
||||
if (m_caster->IsInFlight())
|
||||
return SPELL_FAILED_NOT_ON_TAXI;
|
||||
@ -5515,7 +5515,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_DISPEL)
|
||||
{
|
||||
if (m_spellInfo->Effects[i].IsTargetingArea() || m_spellInfo->HasAttribute(SPELL_ATTR1_MELEE_COMBAT_START))
|
||||
if (m_spellInfo->Effects[i].IsTargetingArea() || m_spellInfo->HasAttribute(SPELL_ATTR1_INITIATE_COMBAT))
|
||||
{
|
||||
hasDispellableAura = true;
|
||||
break;
|
||||
@ -5825,7 +5825,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
case SPELL_EFFECT_SUMMON:
|
||||
{
|
||||
SummonPropertiesEntry const* SummonProperties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[i].MiscValueB);
|
||||
if (!SummonProperties || m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET))
|
||||
if (!SummonProperties || m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET_FIRST))
|
||||
break;
|
||||
switch (SummonProperties->Category)
|
||||
{
|
||||
@ -5853,7 +5853,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
case SPELL_EFFECT_SUMMON_PET:
|
||||
{
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET))
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET_FIRST))
|
||||
{
|
||||
if (m_caster->GetPetGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
|
||||
@ -6017,7 +6017,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_CHARMED;
|
||||
|
||||
// Xinef: allow SPELL_AURA_MOD_POSSESS to posses target if caster has some pet
|
||||
if (m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_CHARM && !m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET))
|
||||
if (m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_CHARM && !m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET_FIRST))
|
||||
{
|
||||
if (m_caster->GetPetGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
|
||||
@ -6075,8 +6075,8 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// xinef: dont allow to cast mounts in specific transforms
|
||||
if (m_caster->getTransForm())
|
||||
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(m_caster->getTransForm()))
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) &&
|
||||
!transformSpellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_CASTABLE_WHILE_MOUNTED | SPELL_ATTR0_NEGATIVE_1)))
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) &&
|
||||
!transformSpellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_ALLOW_WHILE_MOUNTED | SPELL_ATTR0_AURA_IS_DEBUFF)))
|
||||
return SPELL_FAILED_NOT_SHAPESHIFT;
|
||||
|
||||
break;
|
||||
@ -6208,7 +6208,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||
SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
{
|
||||
// spells totally immuned to caster auras (wsg flag drop, give marks etc)
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR6_IGNORE_CASTER_AURAS))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR6_NOT_AN_ATTACK))
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
uint8 school_immune = 0;
|
||||
@ -6217,7 +6217,7 @@ SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
|
||||
// Check if the spell grants school or mechanic immunity.
|
||||
// We use bitmasks so the loop is done only once and not on every aura check below.
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
|
||||
{
|
||||
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
@ -6234,7 +6234,7 @@ SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
||||
bool usableInStun = m_spellInfo->HasAttribute(SPELL_ATTR5_USABLE_WHILE_STUNNED);
|
||||
bool usableInStun = m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_WHILE_STUNNED);
|
||||
|
||||
// Glyph of Pain Suppression
|
||||
// there is no other way to handle it
|
||||
@ -6277,9 +6277,9 @@ SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
else
|
||||
prevented_reason = SPELL_FAILED_STUNNED;
|
||||
}
|
||||
else if (unitflag & UNIT_FLAG_CONFUSED && !m_spellInfo->HasAttribute(SPELL_ATTR5_USABLE_WHILE_CONFUSED))
|
||||
else if (unitflag & UNIT_FLAG_CONFUSED && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_WHILE_CONFUSED))
|
||||
prevented_reason = SPELL_FAILED_CONFUSED;
|
||||
else if (unitflag & UNIT_FLAG_FLEEING && !m_spellInfo->HasAttribute(SPELL_ATTR5_USABLE_WHILE_FEARED))
|
||||
else if (unitflag & UNIT_FLAG_FLEEING && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_WHILE_FLEEING))
|
||||
prevented_reason = SPELL_FAILED_FLEEING;
|
||||
}
|
||||
|
||||
@ -6305,7 +6305,7 @@ SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
SpellInfo const* auraInfo = aura->GetSpellInfo();
|
||||
if (auraInfo->GetAllEffectsMechanicMask() & mechanic_immune)
|
||||
continue;
|
||||
if (auraInfo->GetSchoolMask() & school_immune && !auraInfo->HasAttribute(SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE))
|
||||
if (auraInfo->GetSchoolMask() & school_immune && !auraInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS))
|
||||
continue;
|
||||
if (auraInfo->GetDispelMask() & dispel_immune)
|
||||
continue;
|
||||
@ -6333,11 +6333,11 @@ SpellCastResult Spell::CheckCasterAuras(bool preventionOnly) const
|
||||
break;
|
||||
}
|
||||
case SPELL_AURA_MOD_CONFUSE:
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR5_USABLE_WHILE_CONFUSED))
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_WHILE_CONFUSED))
|
||||
return SPELL_FAILED_CONFUSED;
|
||||
break;
|
||||
case SPELL_AURA_MOD_FEAR:
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR5_USABLE_WHILE_FEARED))
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_WHILE_FLEEING))
|
||||
return SPELL_FAILED_FLEEING;
|
||||
break;
|
||||
case SPELL_AURA_MOD_SILENCE:
|
||||
@ -7054,7 +7054,7 @@ SpellCastResult Spell::CheckItems()
|
||||
if (/*Moar retardnes! never skip those checks !(_triggeredCastFlags & TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT) &&*/ m_spellInfo->EquippedItemClass >= 0)
|
||||
{
|
||||
// main hand weapon required
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_MAIN_HAND))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON))
|
||||
{
|
||||
Item* item = m_caster->ToPlayer()->GetWeaponForAttack(BASE_ATTACK);
|
||||
|
||||
@ -7068,7 +7068,7 @@ SpellCastResult Spell::CheckItems()
|
||||
}
|
||||
|
||||
// offhand hand weapon required
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQ_OFFHAND))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON))
|
||||
{
|
||||
Item* item = m_caster->ToPlayer()->GetWeaponForAttack(OFF_ATTACK);
|
||||
|
||||
@ -7284,11 +7284,11 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
|
||||
|
||||
// xinef: skip los checking if spell has appropriate attribute, or target requires specific entry
|
||||
// this is only for target addition and target has to have unselectable flag, this is valid for FLAG_EXTRA_TRIGGER and quest triggers however there are some without this flag, used not_selectable
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) || (target->GetTypeId() == TYPEID_UNIT && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE) && (m_spellInfo->Effects[eff].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || m_spellInfo->Effects[eff].TargetB.GetCheckType() == TARGET_CHECK_ENTRY)))
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) || (target->GetTypeId() == TYPEID_UNIT && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE) && (m_spellInfo->Effects[eff].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || m_spellInfo->Effects[eff].TargetB.GetCheckType() == TARGET_CHECK_ENTRY)))
|
||||
return true;
|
||||
|
||||
// if spell is triggered, need to check for LOS disable on the aura triggering it and inherit that behaviour
|
||||
if (IsTriggered() && m_triggeredByAuraSpell && (m_triggeredByAuraSpell->HasAttribute(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_triggeredByAuraSpell->Id, nullptr, SPELL_DISABLE_LOS)))
|
||||
if (IsTriggered() && m_triggeredByAuraSpell && (m_triggeredByAuraSpell->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_triggeredByAuraSpell->Id, nullptr, SPELL_DISABLE_LOS)))
|
||||
return true;
|
||||
|
||||
// todo: shit below shouldn't be here, but it's temporary
|
||||
@ -7383,7 +7383,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
|
||||
|
||||
bool Spell::IsNextMeleeSwingSpell() const
|
||||
{
|
||||
return m_spellInfo->HasAttribute(SPELL_ATTR0_ON_NEXT_SWING);
|
||||
return m_spellInfo->HasAttribute(SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE);
|
||||
}
|
||||
|
||||
bool Spell::IsAutoActionResetSpell() const
|
||||
@ -7394,7 +7394,7 @@ bool Spell::IsAutoActionResetSpell() const
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_casttime && m_spellInfo->HasAttribute(SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT))
|
||||
if (!m_casttime && m_spellInfo->HasAttribute(SPELL_ATTR6_DOESNT_RESET_SWING_TIMER_IF_INSTANT))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -8069,8 +8069,8 @@ bool Spell::CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* triggeredByA
|
||||
if (triggeredByAura && triggeredByAura->SpellIconID == 559)
|
||||
return effMask & (1 << EFFECT_0);
|
||||
|
||||
bool only_on_caster = (triggeredByAura && triggeredByAura->HasAttribute(SPELL_ATTR4_PROC_ONLY_ON_CASTER));
|
||||
// If triggeredByAura has SPELL_ATTR4_PROC_ONLY_ON_CASTER then it can only proc on a casted spell with TARGET_UNIT_CASTER
|
||||
bool only_on_caster = (triggeredByAura && triggeredByAura->HasAttribute(SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET));
|
||||
// If triggeredByAura has SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET then it can only proc on a casted spell with TARGET_UNIT_CASTER
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if ((effMask & (1 << i)) && (!only_on_caster || (m_spellInfo->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CASTER)))
|
||||
|
||||
@ -904,7 +904,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
// ignore positive and passive auras
|
||||
!iter->second->IsPositive() && !iter->second->GetBase()->IsPassive() &&
|
||||
// Xinef: Ignore NPC spells having INVULNERABILITY attribute
|
||||
(!spell->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) || spell->SpellFamilyName != SPELLFAMILY_GENERIC))
|
||||
(!spell->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || spell->SpellFamilyName != SPELLFAMILY_GENERIC))
|
||||
{
|
||||
m_caster->RemoveAura(iter);
|
||||
}
|
||||
@ -1895,7 +1895,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && m_spellInfo->SpellFamilyName != SPELLFAMILY_POTION
|
||||
&& !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
&& !m_spellInfo->HasAttribute(SPELL_ATTR7_ONLY_IN_SPELLBOOK_UNTIL_LEARNED))
|
||||
return;
|
||||
|
||||
if (unitTarget->GetMaxPower(power) == 0)
|
||||
@ -2006,7 +2006,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
|
||||
|
||||
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_ONLY_IN_SPELLBOOK_UNTIL_LEARNED))
|
||||
return;
|
||||
|
||||
uint32 maxPower = unitTarget->GetMaxPower(power);
|
||||
@ -4287,7 +4287,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
if ((*iter)->GetCurrentSpell(i) && (*iter)->GetCurrentSpell(i)->m_targets.GetUnitTargetGUID() == unitTarget->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_CAN_TARGET_INVISIBLE) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
if ((!c->IsPet() && c->GetCreatureTemplate()->rank == CREATURE_ELITE_WORLDBOSS) || c->isWorldBoss() || c->IsDungeonBoss())
|
||||
@ -4958,7 +4958,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
if (spell->m_targets.GetUnitTargetGUID() == m_caster->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = spell->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_CAN_TARGET_INVISIBLE) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
if ((!c->IsPet() && c->GetCreatureTemplate()->rank == CREATURE_ELITE_WORLDBOSS) || c->isWorldBoss() || c->IsDungeonBoss())
|
||||
@ -5705,13 +5705,13 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
|
||||
if ((aura->GetSpellInfo()->GetDispelMask()) & dispelMask)
|
||||
{
|
||||
// Need check for passive? this
|
||||
if (!aurApp->IsPositive() || aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_NOT_STEALABLE))
|
||||
if (!aurApp->IsPositive() || aura->IsPassive() || aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_CANNOT_BE_STOLEN))
|
||||
continue;
|
||||
|
||||
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
|
||||
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell
|
||||
// Polymorph instead of 1 / (5 + 1) -> 16%.
|
||||
bool dispel_charges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
bool dispel_charges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_REMOVES_CHARGES);
|
||||
uint8 charges = dispel_charges ? aura->GetCharges() : aura->GetStackAmount();
|
||||
if (charges > 0)
|
||||
steal_list.push_back(std::make_pair(aura, charges));
|
||||
@ -6266,7 +6266,7 @@ void Spell::EffectCastButtons(SpellEffIndex effIndex)
|
||||
if (!p_caster->HasSpell(spell_id) || p_caster->HasSpellCooldown(spell_id))
|
||||
continue;
|
||||
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR7_SUMMON_PLAYER_TOTEM))
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR7_CAN_BE_MULTI_CAST))
|
||||
continue;
|
||||
|
||||
uint32 cost = spellInfo->CalcPowerCost(m_caster, spellInfo->GetSchoolMask(), this);
|
||||
|
||||
@ -449,7 +449,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const
|
||||
// amount multiplication based on caster's level
|
||||
if (!caster->IsControlledByPlayer() &&
|
||||
_spellInfo->SpellLevel && _spellInfo->SpellLevel != caster->getLevel() &&
|
||||
!basePointsPerLevel && _spellInfo->HasAttribute(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION))
|
||||
!basePointsPerLevel && _spellInfo->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL))
|
||||
{
|
||||
bool canEffectScale = false;
|
||||
switch (Effect)
|
||||
@ -1082,7 +1082,7 @@ bool SpellInfo::IsAutocastable() const
|
||||
{
|
||||
if (Attributes & SPELL_ATTR0_PASSIVE)
|
||||
return false;
|
||||
if (AttributesEx & SPELL_ATTR1_UNAUTOCASTABLE_BY_PET)
|
||||
if (AttributesEx & SPELL_ATTR1_NO_AUTOCAST_AI)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@ -1189,27 +1189,27 @@ bool SpellInfo::IsMultiSlotAura() const
|
||||
|
||||
bool SpellInfo::IsCooldownStartedOnEvent() const
|
||||
{
|
||||
return Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE || (CategoryEntry && CategoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT);
|
||||
return Attributes & SPELL_ATTR0_COOLDOWN_ON_EVENT || (CategoryEntry && CategoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsDeathPersistent() const
|
||||
{
|
||||
return AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT;
|
||||
return AttributesEx3 & SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD;
|
||||
}
|
||||
|
||||
bool SpellInfo::IsRequiringDeadTarget() const
|
||||
{
|
||||
return AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS;
|
||||
return AttributesEx3 & SPELL_ATTR3_ONLY_ON_GHOSTS;
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAllowingDeadTarget() const
|
||||
{
|
||||
return AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD || Targets & (TARGET_FLAG_CORPSE_ALLY | TARGET_FLAG_CORPSE_ENEMY | TARGET_FLAG_UNIT_DEAD);
|
||||
return AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET || Targets & (TARGET_FLAG_CORPSE_ALLY | TARGET_FLAG_CORPSE_ENEMY | TARGET_FLAG_UNIT_DEAD);
|
||||
}
|
||||
|
||||
bool SpellInfo::CanBeUsedInCombat() const
|
||||
{
|
||||
return !(Attributes & SPELL_ATTR0_CANT_USED_IN_COMBAT);
|
||||
return !(Attributes & SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsPositive() const
|
||||
@ -1233,39 +1233,39 @@ bool SpellInfo::IsPositiveEffect(uint8 effIndex) const
|
||||
|
||||
bool SpellInfo::IsChanneled() const
|
||||
{
|
||||
return (AttributesEx & (SPELL_ATTR1_CHANNELED_1 | SPELL_ATTR1_CHANNELED_2));
|
||||
return (AttributesEx & (SPELL_ATTR1_IS_CHANNELED | SPELL_ATTR1_IS_SELF_CHANNELED));
|
||||
}
|
||||
|
||||
bool SpellInfo::IsMoveAllowedChannel() const
|
||||
{
|
||||
return IsChanneled() && (HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) || (!(ChannelInterruptFlags & (AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING))));
|
||||
return IsChanneled() && (HasAttribute(SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL) || (!(ChannelInterruptFlags & (AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING))));
|
||||
}
|
||||
|
||||
bool SpellInfo::NeedsComboPoints() const
|
||||
{
|
||||
return (AttributesEx & (SPELL_ATTR1_REQ_COMBO_POINTS1 | SPELL_ATTR1_REQ_COMBO_POINTS2));
|
||||
return (AttributesEx & (SPELL_ATTR1_FINISHING_MOVE_DAMAGE | SPELL_ATTR1_FINISHING_MOVE_DURATION));
|
||||
}
|
||||
|
||||
bool SpellInfo::IsBreakingStealth() const
|
||||
{
|
||||
return !(AttributesEx & SPELL_ATTR1_NOT_BREAK_STEALTH);
|
||||
return !(AttributesEx & SPELL_ATTR1_ALLOW_WHILE_STEALTHED);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsRangedWeaponSpell() const
|
||||
{
|
||||
return (SpellFamilyName == SPELLFAMILY_HUNTER && !(SpellFamilyFlags[1] & 0x10000000)) // for 53352, cannot find better way
|
||||
|| (EquippedItemSubClassMask & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
|
||||
|| (Attributes & SPELL_ATTR0_REQ_AMMO); // Xinef: added
|
||||
|| (Attributes & SPELL_ATTR0_USES_RANGED_SLOT); // Xinef: added
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAutoRepeatRangedSpell() const
|
||||
{
|
||||
return AttributesEx2 & SPELL_ATTR2_AUTOREPEAT_FLAG;
|
||||
return AttributesEx2 & SPELL_ATTR2_AUTO_REPEAT;
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffectedBySpellMods() const
|
||||
{
|
||||
return !(AttributesEx3 & SPELL_ATTR3_NO_DONE_BONUS);
|
||||
return !(AttributesEx3 & SPELL_ATTR3_IGNORE_CASTER_MODIFIERS);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
@ -1290,13 +1290,13 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
bool SpellInfo::CanPierceImmuneAura(SpellInfo const* aura) const
|
||||
{
|
||||
// these spells pierce all avalible spells (Resurrection Sickness for example)
|
||||
if (Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
|
||||
if (Attributes & SPELL_ATTR0_NO_IMMUNITIES)
|
||||
return true;
|
||||
|
||||
// these spells (Cyclone for example) can pierce all...
|
||||
if ((AttributesEx & SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE)
|
||||
if ((AttributesEx & SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS)
|
||||
// ...but not these (Divine shield for example) // xinef: banish exception, banish can override banish to cancel itself
|
||||
&& !(aura && (aura->Mechanic == MECHANIC_IMMUNE_SHIELD || aura->Mechanic == MECHANIC_INVULNERABILITY || (aura->Mechanic == MECHANIC_BANISH && (Mechanic != MECHANIC_BANISH || !(AttributesEx2 & SPELL_ATTR2_CANT_TARGET_TAPPED))))))
|
||||
&& !(aura && (aura->Mechanic == MECHANIC_IMMUNE_SHIELD || aura->Mechanic == MECHANIC_INVULNERABILITY || (aura->Mechanic == MECHANIC_BANISH && (Mechanic != MECHANIC_BANISH || !(AttributesEx2 & SPELL_ATTR2_CANNOT_CAST_ON_TAPPED))))))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -1310,19 +1310,19 @@ bool SpellInfo::CanDispelAura(SpellInfo const* aura) const
|
||||
|
||||
// Xinef: At frist we check non-player auras, that should be never dispellable
|
||||
// Xinef: Eg. Mark of the Fallen Champion
|
||||
if (aura->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && aura->SpellFamilyName == SPELLFAMILY_GENERIC)
|
||||
if (aura->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) && aura->SpellFamilyName == SPELLFAMILY_GENERIC)
|
||||
return false;
|
||||
|
||||
// These spells (like Mass Dispel) can dispell all auras
|
||||
if (HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
|
||||
if (HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
|
||||
return true;
|
||||
|
||||
// These auras (like Divine Shield) can't be dispelled
|
||||
if (aura->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
|
||||
if (aura->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
|
||||
return false;
|
||||
|
||||
// These auras (Cyclone for example) are not dispelable
|
||||
if (aura->HasAttribute(SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE))
|
||||
if (aura->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -1331,7 +1331,7 @@ bool SpellInfo::CanDispelAura(SpellInfo const* aura) const
|
||||
bool SpellInfo::IsSingleTarget() const
|
||||
{
|
||||
// all other single target spells have if it has AttributesEx5
|
||||
if (AttributesEx5 & SPELL_ATTR5_SINGLE_TARGET_SPELL)
|
||||
if (AttributesEx5 & SPELL_ATTR5_LIMIT_N)
|
||||
return true;
|
||||
|
||||
switch (GetSpellSpecific())
|
||||
@ -1427,7 +1427,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
|
||||
|
||||
if (actAsShifted)
|
||||
{
|
||||
if (Attributes & SPELL_ATTR0_NOT_SHAPESHIFT) // not while shapeshifted
|
||||
if (Attributes & SPELL_ATTR0_NOT_SHAPESHIFTED) // not while shapeshifted
|
||||
return SPELL_FAILED_NOT_SHAPESHIFT;
|
||||
else if (Stances != 0) // needs other shapeshift
|
||||
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
||||
@ -1435,7 +1435,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
|
||||
else
|
||||
{
|
||||
// needs shapeshift
|
||||
if (!(AttributesEx2 & SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && Stances != 0)
|
||||
if (!(AttributesEx2 & SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED) && Stances != 0)
|
||||
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
||||
}
|
||||
|
||||
@ -1474,7 +1474,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
}
|
||||
|
||||
// continent limitation (virtual continent)
|
||||
if (HasAttribute(SPELL_ATTR4_CAST_ONLY_IN_OUTLAND))
|
||||
if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS))
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
@ -1501,7 +1501,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
}
|
||||
|
||||
// raid instance limitation
|
||||
if (HasAttribute(SPELL_ATTR6_NOT_IN_RAID_INSTANCE))
|
||||
if (HasAttribute(SPELL_ATTR6_NOT_IN_RAID_INSTANCES))
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
|
||||
if (!mapEntry || mapEntry->IsRaid())
|
||||
@ -1708,7 +1708,7 @@ bool SpellInfo::IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const
|
||||
bool SpellInfo::ValidateAttribute6SpellDamageMods(const Unit* caster, const AuraEffect* auraEffect, bool isDot) const
|
||||
{
|
||||
// Xinef: no attribute
|
||||
if (!(AttributesEx6 & SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS))
|
||||
if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS))
|
||||
return true;
|
||||
|
||||
// Xinef we have a hook to decide which auras should profit to the spell, by default no profits
|
||||
@ -1729,11 +1729,11 @@ bool SpellInfo::ValidateAttribute6SpellDamageMods(const Unit* caster, const Aura
|
||||
|
||||
SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* target, bool implicit) const
|
||||
{
|
||||
if (AttributesEx & SPELL_ATTR1_CANT_TARGET_SELF && caster == target)
|
||||
if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// check visibility - ignore stealth for implicit (area) targets
|
||||
if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->CanSeeOrDetect(target, implicit))
|
||||
if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
Unit const* unitTarget = target->ToUnit();
|
||||
@ -1742,13 +1742,13 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
if (unitTarget)
|
||||
{
|
||||
// xinef: spells cannot be cast if player is in fake combat also
|
||||
if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
|
||||
if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
|
||||
return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
|
||||
|
||||
// only spells with SPELL_ATTR3_ONLY_TARGET_GHOSTS can target ghosts
|
||||
// only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
|
||||
if (((IsRequiringDeadTarget() != 0) != unitTarget->HasAuraType(SPELL_AURA_GHOST)) && !(IsDeathPersistent() && IsAllowingDeadTarget()))
|
||||
{
|
||||
if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS)
|
||||
if (AttributesEx3 & SPELL_ATTR3_ONLY_ON_GHOSTS)
|
||||
return SPELL_FAILED_TARGET_NOT_GHOST;
|
||||
else
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
@ -1759,7 +1759,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
|
||||
if (AttributesEx2 & SPELL_ATTR2_CANT_TARGET_TAPPED)
|
||||
if (AttributesEx2 & SPELL_ATTR2_CANNOT_CAST_ON_TAPPED)
|
||||
if (Creature const* targetCreature = unitTarget->ToCreature())
|
||||
if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
|
||||
return SPELL_FAILED_CANT_CAST_ON_TAPPED;
|
||||
@ -1804,21 +1804,21 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
else return SPELL_CAST_OK;
|
||||
|
||||
// corpseOwner and unit specific target checks
|
||||
if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS && !unitTarget->ToPlayer())
|
||||
if (AttributesEx3 & SPELL_ATTR3_ONLY_ON_PLAYER && !unitTarget->ToPlayer())
|
||||
return SPELL_FAILED_TARGET_NOT_PLAYER;
|
||||
|
||||
if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
|
||||
return SPELL_FAILED_TARGETS_DEAD;
|
||||
|
||||
// check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
|
||||
if (implicit && AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED && !unitTarget->CanFreeMove())
|
||||
if (implicit && AttributesEx6 & SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS && !unitTarget->CanFreeMove())
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
|
||||
//if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
// return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
//if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS)
|
||||
//if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
|
||||
|
||||
if (!CheckTargetCreatureType(unitTarget))
|
||||
{
|
||||
@ -2291,7 +2291,7 @@ uint32 SpellInfo::CalcCastTime(Unit* caster, Spell* spell) const
|
||||
return 0;
|
||||
|
||||
int32 castTime = CastTimeEntry->CastTime;
|
||||
if (Attributes & SPELL_ATTR0_REQ_AMMO && (!IsAutoRepeatRangedSpell()))
|
||||
if (Attributes & SPELL_ATTR0_USES_RANGED_SLOT && (!IsAutoRepeatRangedSpell()))
|
||||
castTime += 500;
|
||||
|
||||
if (caster)
|
||||
@ -2335,7 +2335,7 @@ uint32 SpellInfo::GetRecoveryTime() const
|
||||
int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell) const
|
||||
{
|
||||
// Spell drain all exist power on cast (Only paladin lay of Hands)
|
||||
if (AttributesEx & SPELL_ATTR1_DRAIN_ALL_POWER)
|
||||
if (AttributesEx & SPELL_ATTR1_USE_ALL_MANA)
|
||||
{
|
||||
// If power type - health drain all
|
||||
if (PowerType == POWER_HEALTH)
|
||||
@ -2383,7 +2383,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
powerCost += caster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school);
|
||||
|
||||
// Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
|
||||
if (AttributesEx4 & SPELL_ATTR4_SPELL_VS_EXTEND_COST)
|
||||
if (AttributesEx4 & SPELL_ATTR4_WEAPON_SPEED_COST_SCALING)
|
||||
{
|
||||
uint32 speed = 0;
|
||||
if (SpellShapeshiftEntry const* ss = sSpellShapeshiftStore.LookupEntry(caster->GetShapeshiftForm()))
|
||||
@ -2391,7 +2391,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
else
|
||||
{
|
||||
WeaponAttackType slot = BASE_ATTACK;
|
||||
if (AttributesEx3 & SPELL_ATTR3_REQ_OFFHAND)
|
||||
if (AttributesEx3 & SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON)
|
||||
slot = OFF_ATTACK;
|
||||
|
||||
speed = caster->GetAttackTime(slot);
|
||||
@ -2406,7 +2406,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
|
||||
if (!caster->IsControlledByPlayer())
|
||||
{
|
||||
if (Attributes & SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION)
|
||||
if (Attributes & SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)
|
||||
{
|
||||
GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
|
||||
GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->getLevel() - 1);
|
||||
@ -2556,7 +2556,7 @@ uint32 SpellInfo::_GetExplicitTargetMask() const
|
||||
bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
|
||||
{
|
||||
// not found a single positive spell with this attribute
|
||||
if (Attributes & SPELL_ATTR0_NEGATIVE_1)
|
||||
if (Attributes & SPELL_ATTR0_AURA_IS_DEBUFF)
|
||||
return false;
|
||||
|
||||
switch (Mechanic)
|
||||
@ -2697,7 +2697,7 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
|
||||
if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
|
||||
return false;
|
||||
// but not this if this first effect (didn't find better check)
|
||||
if (Attributes & SPELL_ATTR0_NEGATIVE_1 && effIndex == 0)
|
||||
if (Attributes & SPELL_ATTR0_AURA_IS_DEBUFF && effIndex == 0)
|
||||
return false;
|
||||
break;
|
||||
case SPELL_AURA_MECHANIC_IMMUNITY:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user