diff options
-rw-r--r-- | src/game/SharedDefines.h | 31 | ||||
-rw-r--r-- | src/game/Spell.cpp | 14 | ||||
-rw-r--r-- | src/game/Spell.h | 8 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 11 |
4 files changed, 44 insertions, 20 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 1303700ec8e..5724261c9b8 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -965,12 +965,11 @@ enum AuraState AURA_STATE_JUDGEMENT = 5, // C | //AURA_STATE_UNKNOWN6 = 6, // | not used AURA_STATE_HUNTER_PARRY = 7, // C | - AURA_STATE_ROGUE_ATTACK_FROM_STEALTH = 7, // C | FIX ME: not implemented yet! - //AURA_STATE_UNKNOWN7 = 7, // c | random/focused bursts spells (?) - //AURA_STATE_UNKNOWN8 = 8, // | not used - //AURA_STATE_UNKNOWN9 = 9, // | not used + //AURA_STATE_UNKNOWN7 = 7, // c | creature cheap shot / focused bursts spells + //AURA_STATE_UNKNOWN8 = 8, // t| test spells + //AURA_STATE_UNKNOWN9 = 9, // | AURA_STATE_WARRIOR_VICTORY_RUSH = 10, // C | warrior victory rush - //AURA_STATE_UNKNOWN11 = 11, // t| + //AURA_STATE_UNKNOWN11 = 11, // C t| 60348 - Maelstrom Ready!, test spells AURA_STATE_FAERIE_FIRE = 12, // c t| AURA_STATE_HEALTHLESS_35_PERCENT = 13, // C T | AURA_STATE_CONFLAGRATE = 14, // T | @@ -981,7 +980,7 @@ enum AuraState //AURA_STATE_UNKNOWN19 = 19, // | not used //AURA_STATE_UNKNOWN20 = 20, // c | only (45317 Suicide) //AURA_STATE_UNKNOWN21 = 21, // | not used - //AURA_STATE_UNKNOWN22 = 22, // C | not implemented yet (Requires Evasive Charges to use) + //AURA_STATE_UNKNOWN22 = 22, // C t| varius spells (63884, 50240) AURA_STATE_HEALTH_ABOVE_75_PERCENT = 23, // C | }; @@ -1092,7 +1091,6 @@ enum Targets TARGET_UNIT_AREA_ENEMY_DST = 16, TARGET_DST_DB = 17, // uses in teleport spells and some other TARGET_DST_CASTER = 18, - TARGET_PREV_EFFECT_SUMMON = 18, TARGET_UNIT_PARTY_CASTER = 20, TARGET_UNIT_TARGET_ALLY = 21, TARGET_SRC_CASTER = 22, @@ -1167,13 +1165,22 @@ enum Targets TARGET_DEST_DYNOBJ_NONE = 88, TARGET_DEST_TRAJ = 89, TARGET_UNIT_MINIPET = 90, - TARGET_UNK_91 = 91, - TARGET_UNK_92 = 92, - TARGET_CORPSE_AREA_ENEMY_PLAYER = 93, + TARGET_DEST_DEST_RANDOM_DIR_DIST = 91, + TARGET_UNIT_UNK_92 = 92, + TARGET_CORPSE_AREA_ENEMY_PLAYER_SRC= 93, TARGET_UNIT_VEHICLE = 94, - TARGET_UNIT_DRIVER = 95, //? - TARGET_UNIT_PASSENGER = 97, + TARGET_UNIT_DRIVER = 95, + TARGET_UNIT_PASSENGER_0 = 96, + TARGET_UNIT_PASSENGER_1 = 97, + TARGET_UNIT_PASSENGER_2 = 98, + TARGET_UNIT_PASSENGER_3 = 99, + TARGET_UNIT_PASSENGER_4 = 100, + TARGET_UNIT_PASSENGER_5 = 101, + TARGET_UNIT_PASSENGER_6 = 102, + TARGET_UNIT_PASSENGER_7 = 103, TARGET_UNIT_AREA_PATH = 104, + TARGET_UNIT_UNK_105 = 105, // 1 spell + TARGET_DEST_UNK_110 = 110, // some kind of traj? }; #define TOTAL_SPELL_TARGETS 105 diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1cc530f5ada..3e7b2519224 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1864,9 +1864,16 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if(Unit *vehicle = m_caster->GetVehicleBase()) AddUnitTarget(vehicle, i); break; - case TARGET_UNIT_PASSENGER: + case TARGET_UNIT_PASSENGER_0: + case TARGET_UNIT_PASSENGER_1: + case TARGET_UNIT_PASSENGER_2: + case TARGET_UNIT_PASSENGER_3: + case TARGET_UNIT_PASSENGER_4: + case TARGET_UNIT_PASSENGER_5: + case TARGET_UNIT_PASSENGER_6: + case TARGET_UNIT_PASSENGER_7: if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsVehicle()) - if(Unit *unit = m_caster->GetVehicleKit()->GetPassenger(1)) // maybe not right + if(Unit *unit = m_caster->GetVehicleKit()->GetPassenger(cur - TARGET_UNIT_PASSENGER_0)) AddUnitTarget(unit, i); break; } @@ -1904,6 +1911,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) case TARGET_UNIT_TARGET_RAID: case TARGET_UNIT_TARGET_PARTY: case TARGET_UNIT_MINIPET: + case TARGET_UNIT_UNK_92: AddUnitTarget(target, i); break; case TARGET_UNIT_PARTY_TARGET: @@ -2090,7 +2098,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) float dist; dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); - if (cur == TARGET_DEST_DEST_RANDOM) + if (cur == TARGET_DEST_DEST_RANDOM || cur == TARGET_DEST_DEST_RANDOM_DIR_DIST) dist *= rand_norm(); // must has dst, no need to set flag diff --git a/src/game/Spell.h b/src/game/Spell.h index cff9375a502..004011f985e 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -33,10 +33,10 @@ class Aura; enum SpellCastTargetFlags { TARGET_FLAG_SELF = 0x00000000, - TARGET_FLAG_UNUSED1 = 0x00000001, // not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_UNUSED1 = 0x00000001, // not used in any spells as of 3.2.2a (can be set dynamically) TARGET_FLAG_UNIT = 0x00000002, // pguid - TARGET_FLAG_UNUSED2 = 0x00000004, // not used in any spells as of 3.0.3 (can be set dynamically) - TARGET_FLAG_UNUSED3 = 0x00000008, // not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_UNUSED2 = 0x00000004, // not used in any spells as of 3.2.2a (can be set dynamically) + TARGET_FLAG_UNUSED3 = 0x00000008, // not used in any spells as of 3.2.2a (can be set dynamically) TARGET_FLAG_ITEM = 0x00000010, // pguid TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // 3 float TARGET_FLAG_DEST_LOCATION = 0x00000040, // 3 float @@ -49,7 +49,7 @@ enum SpellCastTargetFlags TARGET_FLAG_STRING = 0x00002000, // string, 0 spells TARGET_FLAG_UNK1 = 0x00004000, // 199 spells, opening object/lock TARGET_FLAG_CORPSE = 0x00008000, // pguid, resurrection spells - TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.2.2a (can be set dynamically) TARGET_FLAG_GLYPH = 0x00020000 // used in glyph spells }; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 588e7ad8b8d..34a25020d9b 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -110,7 +110,14 @@ SpellMgr::SpellMgr() case TARGET_UNIT_PARTY_CASTER: case TARGET_UNIT_RAID_CASTER: case TARGET_UNIT_VEHICLE: - case TARGET_UNIT_PASSENGER: + case TARGET_UNIT_PASSENGER_0: + case TARGET_UNIT_PASSENGER_1: + case TARGET_UNIT_PASSENGER_2: + case TARGET_UNIT_PASSENGER_3: + case TARGET_UNIT_PASSENGER_4: + case TARGET_UNIT_PASSENGER_5: + case TARGET_UNIT_PASSENGER_6: + case TARGET_UNIT_PASSENGER_7: SpellTargetType[i] = TARGET_TYPE_UNIT_CASTER; break; case TARGET_UNIT_MINIPET: @@ -122,6 +129,7 @@ SpellMgr::SpellMgr() case TARGET_UNIT_PARTY_TARGET: case TARGET_UNIT_CLASS_TARGET: case TARGET_UNIT_CHAINHEAL: + case TARGET_UNIT_UNK_92: SpellTargetType[i] = TARGET_TYPE_UNIT_TARGET; break; case TARGET_UNIT_NEARBY_ENEMY: @@ -196,6 +204,7 @@ SpellMgr::SpellMgr() case TARGET_DEST_DEST_RIGHT: case TARGET_DEST_DEST_LEFT: case TARGET_DEST_DEST_RANDOM: + case TARGET_DEST_DEST_RANDOM_DIR_DIST: SpellTargetType[i] = TARGET_TYPE_DEST_DEST; break; case TARGET_DST_DB: |