diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/AI/CoreAI/UnitAI.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 6 | ||||
-rwxr-xr-x | src/server/game/Miscellaneous/SharedDefines.h | 16 | ||||
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 6 | ||||
-rwxr-xr-x | src/server/game/Spells/Spell.h | 2 | ||||
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 0a89820defd..3ada008de59 100755 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -144,7 +144,7 @@ void UnitAI::DoCast(uint32 spellId) case AITARGET_ENEMY: { const SpellInfo * spellInfo = sSpellMgr->GetSpellInfo(spellId); - bool playerOnly = spellInfo->AttributesEx3 & SPELL_ATTR3_PLAYERS_ONLY; + bool playerOnly = spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS; //float range = GetSpellMaxRange(spellInfo, false); target = SelectTarget(SELECT_TARGET_RANDOM, 0, spellInfo->GetMaxRange(false), playerOnly); break; @@ -154,7 +154,7 @@ void UnitAI::DoCast(uint32 spellId) case AITARGET_DEBUFF: { const SpellInfo * spellInfo = sSpellMgr->GetSpellInfo(spellId); - bool playerOnly = spellInfo->AttributesEx3 & SPELL_ATTR3_PLAYERS_ONLY; + bool playerOnly = spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS; float range = spellInfo->GetMaxRange(false); DefaultTargetSelector targetSelector(me, range, playerOnly, -(int32)spellId); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index b45a870ee83..46e0b8bf9a5 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -901,7 +901,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) } if ((cond->mConditionValue1 == SPELL_TARGET_TYPE_DEAD) && !spellProto->IsAllowingDeadTarget()) { - sLog->outErrorDb("SourceEntry %u in `condition` table does have SPELL_TARGET_TYPE_DEAD specified but spell does not have SPELL_ATTR2_ALLOW_DEAD_TARGET", cond->mSourceEntry); + sLog->outErrorDb("SourceEntry %u in `condition` table does have SPELL_TARGET_TYPE_DEAD specified but spell does not have SPELL_ATTR2_CAN_TARGET_DEAD", cond->mSourceEntry); return false; } break; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 379af2e508a..bfa37659a0a 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12328,8 +12328,8 @@ bool Unit::canAttack(Unit const* target, bool force) const bool Unit::isAttackableByAOE(SpellInfo const* spellProto) const { - bool targetMustBeDead = spellProto ? bool(spellProto->AttributesEx3 & SPELL_ATTR3_REQUIRE_DEAD_TARGET) : false; - bool targetCanBeDead = spellProto ? bool(spellProto->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET) : false; + bool targetMustBeDead = spellProto ? bool(spellProto->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS) : false; + bool targetCanBeDead = spellProto ? bool(spellProto->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD) : false; if (targetMustBeDead && isAlive()) return false; @@ -16329,7 +16329,7 @@ Aura* Unit::AddAura(uint32 spellId, Unit* target) if (!spellInfo) return NULL; - if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET)) + if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD)) return NULL; return AddAura(spellInfo, MAX_EFFECT_MASK, target); diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index b051f9528db..c0a28014cb2 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -307,7 +307,7 @@ enum SpellAttr1 SPELL_ATTR1_NOT_BREAK_STEALTH = 0x00000020, // 5 Not break stealth SPELL_ATTR1_CHANNELED_2 = 0x00000040, // 6 SPELL_ATTR1_CANT_BE_REFLECTED = 0x00000080, // 7 - SPELL_ATTR1_NOT_IN_COMBAT_TARGET = 0x00000100, // 8 Spell req target not to be in combat state + SPELL_ATTR1_CANT_TARGET_IN_COMBAT = 0x00000100, // 8 can target only out of combat units SPELL_ATTR1_MELEE_COMBAT_START = 0x00000200, // 9 player starts melee combat after this spell is cast SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO) SPELL_ATTR1_UNK11 = 0x00000800, // 11 aura @@ -318,7 +318,7 @@ enum SpellAttr1 SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE = 0x00010000, // 16 on immuniy SPELL_ATTR1_UNAUTOCASTABLE_BY_PET = 0x00020000, // 17 SPELL_ATTR1_UNK18 = 0x00040000, // 18 - SPELL_ATTR1_CANT_TARGET_SELF = 0x00080000, // 19 Applies only to unit target - for example Divine Intervention (19752) + SPELL_ATTR1_CANT_TARGET_SELF = 0x00080000, // 19 SPELL_ATTR1_REQ_COMBO_POINTS1 = 0x00100000, // 20 Req combo points on target SPELL_ATTR1_UNK21 = 0x00200000, // 21 SPELL_ATTR1_REQ_COMBO_POINTS2 = 0x00400000, // 22 Req combo points on target @@ -335,7 +335,7 @@ enum SpellAttr1 enum SpellAttr2 { - SPELL_ATTR2_ALLOW_DEAD_TARGET = 0x00000001, // 0 + SPELL_ATTR2_CAN_TARGET_DEAD = 0x00000001, // 0 can target dead unit or corpse SPELL_ATTR2_UNK1 = 0x00000002, // 1 ? many triggered spells have this flag SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS = 0x00000004, // 2 26368 4.0.1 dbc change (NYI) SPELL_ATTR2_UNK3 = 0x00000008, // 3 @@ -379,11 +379,11 @@ enum SpellAttr3 SPELL_ATTR3_UNK5 = 0x00000020, // 5 SPELL_ATTR3_UNK6 = 0x00000040, // 6 SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 separate stack for every caster - SPELL_ATTR3_PLAYERS_ONLY = 0x00000100, // 8 Player only? + SPELL_ATTR3_ONLY_TARGET_PLAYERS = 0x00000100, // 8 can only target players SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // 9 triggered from effect? SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can casted only on battleground - SPELL_ATTR3_REQUIRE_DEAD_TARGET = 0x00001000, // 12 + SPELL_ATTR3_ONLY_TARGET_GHOSTS = 0x00001000, // 12 SPELL_ATTR3_UNK13 = 0x00002000, // 13 SPELL_ATTR3_UNK14 = 0x00004000, // 14 "Honorless Target" only this spells have this flag SPELL_ATTR3_UNK15 = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag @@ -482,12 +482,12 @@ enum SpellAttr6 SPELL_ATTR6_DONT_DISPLAY_COOLDOWN = 0x00000001, // 0 client doesn't display cooldown in tooltip for these spells SPELL_ATTR6_ONLY_IN_ARENA = 0x00000002, // 1 only usable in arena SPELL_ATTR6_IGNORE_CASTER_AURAS = 0x00000004, // 2 - SPELL_ATTR6_CAN_TARGET_INVISIBLE = 0x00000008, // 3 ignore visibility requirement for spell target (phases, invisibility, etc.) + SPELL_ATTR6_CAN_TARGET_INVISIBLE = 0x00000008, // 3 (NYI) ignore visibility requirement for spell target (phases, invisibility, etc.) SPELL_ATTR6_UNK4 = 0x00000010, // 4 SPELL_ATTR6_UNK5 = 0x00000020, // 5 SPELL_ATTR6_UNK6 = 0x00000040, // 6 SPELL_ATTR6_UNK7 = 0x00000080, // 7 - SPELL_ATTR6_IGNORE_CROWD_CONTROL_TARGETS = 0x00000100, // 8 + SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED = 0x00000100, // 8 SPELL_ATTR6_UNK9 = 0x00000200, // 9 SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS = 0x00000400, // 10 NYI! SPELL_ATTR6_NOT_IN_RAID_INSTANCE = 0x00000800, // 11 not usable in raid instance @@ -1014,7 +1014,7 @@ enum SpellCastResult SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED = 186, SPELL_FAILED_UNKNOWN = 187, // actually doesn't exist in client - SPELL_CAST_OK = 255 // custom value, don't must be send to client + SPELL_CAST_OK = 255 // custom value, must not be sent to client }; enum SpellCustomErrors diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index b287734b9a5..9182a616c85 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1793,7 +1793,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin && !m_caster->isInFrontInMap(*next, max_range)) || !m_caster->canSeeOrDetect(*next) || !cur->IsWithinLOSInMap(*next) - || ((GetSpellInfo()->AttributesEx6 & SPELL_ATTR6_IGNORE_CROWD_CONTROL_TARGETS) && !(*next)->CanFreeMove())) + || ((GetSpellInfo()->AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED) && !(*next)->CanFreeMove())) { ++next; if (next == tempUnitMap.end() || cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) // Don't search beyond the max jump radius @@ -1839,7 +1839,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, SpellNo } Trinity::SpellNotifierCreatureAndPlayer notifier(m_caster, TagUnitMap, radius, type, TargetType, pos, entry, m_spellInfo); - if ((m_spellInfo->AttributesEx3 & SPELL_ATTR3_PLAYERS_ONLY) || (TargetType == SPELL_TARGETS_ENTRY && !entry)) + if ((m_spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS) || (TargetType == SPELL_TARGETS_ENTRY && !entry)) { m_caster->GetMap()->VisitWorld(pos->m_positionX, pos->m_positionY, radius, notifier); TagUnitMap.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false)); // above line will select also pets and totems, remove them @@ -4866,7 +4866,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NOT_INFRONT; // Target must not be in combat - if (m_spellInfo->AttributesEx & SPELL_ATTR1_NOT_IN_COMBAT_TARGET && target->isInCombat()) + if (m_spellInfo->AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && target->isInCombat()) return SPELL_FAILED_TARGET_AFFECTING_COMBAT; } diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index e334f6d29f6..cdf2c6d1232 100755 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -719,7 +719,7 @@ namespace Trinity template<class T> inline void Visit(GridRefManager<T>& m) { - i_requireDeadTarget = i_spellProto ? bool(i_spellProto->AttributesEx3 & SPELL_ATTR3_REQUIRE_DEAD_TARGET) : false; + i_requireDeadTarget = i_spellProto ? bool(i_spellProto->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS) : false; for (typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr) { diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index a4cddd607b6..4cce79f9f2a 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -783,12 +783,12 @@ bool SpellInfo::IsDeathPersistent() const bool SpellInfo::IsRequiringDeadTarget() const { - return AttributesEx3 & SPELL_ATTR3_REQUIRE_DEAD_TARGET; + return AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS; } bool SpellInfo::IsAllowingDeadTarget() const { - return AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET; + return AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD; } bool SpellInfo::CanBeUsedInCombat() const |