aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpete318 <pete318@hotmail.com>2015-02-23 10:52:07 +0000
committerNaios <naios-dev@live.de>2015-06-04 13:38:53 +0200
commit97a074def2fd60225d3e2137d36e10b87413b024 (patch)
tree53dea541266410d09a495c6916ff9f7c13f9f3b9 /src
parent6e9ab38fcc9d2859393e452ef8630ee420783e47 (diff)
Core/Spells: Support for targetting spells onto in flight units
* This adds support to spell_custom_attr to allow a spell to be cast upon a unit on a taxi/in flight. * This will allow the Issue #11880 with Horde quest Test At Sea (11170) to be corrected. * closes #14235 Signed-off-by: Naios <naios-dev@live.de> (cherry picked from commit f9cba93985d79ae352a9e6371da1d580a119fb51)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
-rw-r--r--src/server/game/Spells/SpellInfo.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 7b012d8a0f6..f97714d36eb 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1959,7 +1959,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
}
// not allow casting on flying player
- if (unitTarget->HasUnitState(UNIT_STATE_IN_FLIGHT))
+ if (unitTarget->HasUnitState(UNIT_STATE_IN_FLIGHT) && !(AttributesCu & SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET))
return SPELL_FAILED_BAD_TARGETS;
/* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 62381372657..6d1d787e303 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -197,6 +197,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER = 0x00010000,
SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET = 0x00020000,
+ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET = 0x00040000,
SPELL_ATTR0_CU_NEGATIVE = SPELL_ATTR0_CU_NEGATIVE_EFF0 | SPELL_ATTR0_CU_NEGATIVE_EFF1 | SPELL_ATTR0_CU_NEGATIVE_EFF2
};