mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[c12544] Force SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS and SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2 auras to send amount
This commit is contained in:
parent
461f81a06a
commit
41a410968c
2 changed files with 261 additions and 167 deletions
|
|
@ -33,7 +33,7 @@
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "UpdateData.h"
|
#include "UpdateData.h"
|
||||||
#include "ObjectAccessor.h"
|
#include "ObjectAccessor.h"
|
||||||
#include "Policies/SingletonImp.h"
|
#include "Policies/Singleton.h"
|
||||||
#include "Totem.h"
|
#include "Totem.h"
|
||||||
#include "Creature.h"
|
#include "Creature.h"
|
||||||
#include "Formulas.h"
|
#include "Formulas.h"
|
||||||
|
|
@ -101,7 +101,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleAuraTrackResources, // 45 SPELL_AURA_TRACK_RESOURCES
|
&Aura::HandleAuraTrackResources, // 45 SPELL_AURA_TRACK_RESOURCES
|
||||||
&Aura::HandleUnused, // 46 SPELL_AURA_46 4 spells in 4.3.4
|
&Aura::HandleUnused, // 46 SPELL_AURA_46 4 spells in 4.3.4
|
||||||
&Aura::HandleAuraModParryPercent, // 47 SPELL_AURA_MOD_PARRY_PERCENT
|
&Aura::HandleAuraModParryPercent, // 47 SPELL_AURA_MOD_PARRY_PERCENT
|
||||||
&Aura::HandleNULL, // 48 SPELL_AURA_48 4 spells in 4.3.4 Napalm (area damage spell with additional delayed damage effect)
|
&Aura::HandleNoImmediateEffect, // 48 SPELL_AURA_PERIODIC_TRIGGER_BY_CLIENT (Client periodic trigger spell by self (4 spells in 4.3.4 )). Implemented in pet/player cast chains.
|
||||||
&Aura::HandleAuraModDodgePercent, // 49 SPELL_AURA_MOD_DODGE_PERCENT
|
&Aura::HandleAuraModDodgePercent, // 49 SPELL_AURA_MOD_DODGE_PERCENT
|
||||||
&Aura::HandleNoImmediateEffect, // 50 SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT implemented in Unit::SpellCriticalHealingBonus
|
&Aura::HandleNoImmediateEffect, // 50 SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT implemented in Unit::SpellCriticalHealingBonus
|
||||||
&Aura::HandleAuraModBlockChancePercent, // 51 SPELL_AURA_MOD_BLOCK_CHANCE_PERCENT
|
&Aura::HandleAuraModBlockChancePercent, // 51 SPELL_AURA_MOD_BLOCK_CHANCE_PERCENT
|
||||||
|
|
@ -206,14 +206,14 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleModShieldBlockDamage, //150 SPELL_AURA_MOD_SHIELD_BLOCKDAMAGE
|
&Aura::HandleModShieldBlockDamage, //150 SPELL_AURA_MOD_SHIELD_BLOCKDAMAGE
|
||||||
&Aura::HandleAuraTrackStealthed, //151 SPELL_AURA_TRACK_STEALTHED
|
&Aura::HandleAuraTrackStealthed, //151 SPELL_AURA_TRACK_STEALTHED
|
||||||
&Aura::HandleNoImmediateEffect, //152 SPELL_AURA_MOD_DETECTED_RANGE implemented in Creature::GetAttackDistance
|
&Aura::HandleNoImmediateEffect, //152 SPELL_AURA_MOD_DETECTED_RANGE implemented in Creature::GetAttackDistance
|
||||||
&Aura::HandleNoImmediateEffect, //153 SPELL_AURA_SPLIT_DAMAGE_FLAT implemented in Unit::CalculateAbsorbAndResist
|
&Aura::HandleUnused, //153 old SPELL_AURA_SPLIT_DAMAGE_FLAT
|
||||||
&Aura::HandleNoImmediateEffect, //154 SPELL_AURA_MOD_STEALTH_LEVEL implemented in Unit::isVisibleForOrDetect
|
&Aura::HandleNoImmediateEffect, //154 SPELL_AURA_MOD_STEALTH_LEVEL implemented in Unit::isVisibleForOrDetect
|
||||||
&Aura::HandleNoImmediateEffect, //155 SPELL_AURA_MOD_WATER_BREATHING implemented in Player::getMaxTimer
|
&Aura::HandleNoImmediateEffect, //155 SPELL_AURA_MOD_WATER_BREATHING implemented in Player::getMaxTimer
|
||||||
&Aura::HandleNoImmediateEffect, //156 SPELL_AURA_MOD_REPUTATION_GAIN implemented in Player::CalculateReputationGain
|
&Aura::HandleNoImmediateEffect, //156 SPELL_AURA_MOD_REPUTATION_GAIN implemented in Player::CalculateReputationGain
|
||||||
&Aura::HandleUnused, //157 SPELL_AURA_PET_DAMAGE_MULTI (single test like spell 20782, also single for 214 aura)
|
&Aura::HandleUnused, //157 SPELL_AURA_PET_DAMAGE_MULTI (single test like spell 20782, also single for 214 aura)
|
||||||
&Aura::HandleNULL, //158 SPELL_AURA_MOD_SHIELD_BLOCKVALUE
|
&Aura::HandleNULL, //158 SPELL_AURA_MOD_SHIELD_BLOCKVALUE
|
||||||
&Aura::HandleNoImmediateEffect, //159 SPELL_AURA_NO_PVP_CREDIT implemented in Player::RewardHonor
|
&Aura::HandleNoImmediateEffect, //159 SPELL_AURA_NO_PVP_CREDIT implemented in Player::RewardHonor
|
||||||
&Aura::HandleNoImmediateEffect, //160 SPELL_AURA_MOD_AOE_AVOIDANCE implemented in Unit::MagicSpellHitResult
|
&Aura::HandleUnused, //160 old SPELL_AURA_MOD_AOE_AVOIDANCE
|
||||||
&Aura::HandleNoImmediateEffect, //161 SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT implemented in Player::RegenerateAll and Player::RegenerateHealth
|
&Aura::HandleNoImmediateEffect, //161 SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT implemented in Player::RegenerateAll and Player::RegenerateHealth
|
||||||
&Aura::HandleAuraPowerBurn, //162 SPELL_AURA_POWER_BURN_MANA
|
&Aura::HandleAuraPowerBurn, //162 SPELL_AURA_POWER_BURN_MANA
|
||||||
&Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus
|
&Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus
|
||||||
|
|
@ -222,7 +222,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT
|
&Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT
|
||||||
&Aura::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
&Aura::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
||||||
&Aura::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonusDone, Unit::MeleeDamageBonusDone
|
&Aura::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonusDone, Unit::MeleeDamageBonusDone
|
||||||
&Aura::HandleNoImmediateEffect, //169 SPELL_AURA_MOD_CRIT_PERCENT_VERSUS implemented in Unit::DealDamageBySchool, Unit::DoAttackDamage, Unit::SpellCriticalBonus
|
&Aura::HandleUnused, //169 old SPELL_AURA_MOD_CRIT_PERCENT_VERSUS
|
||||||
&Aura::HandleDetectAmore, //170 SPELL_AURA_DETECT_AMORE different spells that ignore transformation effects
|
&Aura::HandleDetectAmore, //170 SPELL_AURA_DETECT_AMORE different spells that ignore transformation effects
|
||||||
&Aura::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
&Aura::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
||||||
&Aura::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
&Aura::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
||||||
|
|
@ -231,7 +231,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonusDone
|
&Aura::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonusDone
|
||||||
&Aura::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end
|
&Aura::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end
|
||||||
&Aura::HandleNULL, //177 SPELL_AURA_AOE_CHARM (22 spells)
|
&Aura::HandleNULL, //177 SPELL_AURA_AOE_CHARM (22 spells)
|
||||||
&Aura::HandleNoImmediateEffect, //178 SPELL_AURA_MOD_DEBUFF_RESISTANCE implemented in Unit::MagicSpellHitResult
|
&Aura::HandleUnused, //178 old SPELL_AURA_MOD_DEBUFF_RESISTANCE
|
||||||
&Aura::HandleNoImmediateEffect, //179 SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE implemented in Unit::SpellCriticalBonus
|
&Aura::HandleNoImmediateEffect, //179 SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE implemented in Unit::SpellCriticalBonus
|
||||||
&Aura::HandleNoImmediateEffect, //180 SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS implemented in Unit::SpellDamageBonusDone
|
&Aura::HandleNoImmediateEffect, //180 SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS implemented in Unit::SpellDamageBonusDone
|
||||||
&Aura::HandleUnused, //181 unused (3.0.8a-4.3.4) old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS
|
&Aura::HandleUnused, //181 unused (3.0.8a-4.3.4) old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS
|
||||||
|
|
@ -252,7 +252,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN (single spell 24818 in 3.2.2a)
|
&Aura::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN (single spell 24818 in 3.2.2a)
|
||||||
&Aura::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
|
&Aura::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
|
||||||
&Aura::HandleUnused, //198 unused (3.0.8a-4.3.4) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
|
&Aura::HandleUnused, //198 unused (3.0.8a-4.3.4) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
|
||||||
&Aura::HandleNoImmediateEffect, //199 SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT implemented in Unit::MagicSpellHitResult
|
&Aura::HandleUnused, //199 SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT implemented in Unit::MagicSpellHitResult
|
||||||
&Aura::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_KILL_XP_PCT implemented in Player::GiveXP
|
&Aura::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_KILL_XP_PCT implemented in Player::GiveXP
|
||||||
&Aura::HandleAuraAllowFlight, //201 SPELL_AURA_FLY this aura enable flight mode...
|
&Aura::HandleAuraAllowFlight, //201 SPELL_AURA_FLY this aura enable flight mode...
|
||||||
&Aura::HandleNoImmediateEffect, //202 SPELL_AURA_IGNORE_COMBAT_RESULT implemented in Unit::MeleeSpellHitResult
|
&Aura::HandleNoImmediateEffect, //202 SPELL_AURA_IGNORE_COMBAT_RESULT implemented in Unit::MeleeSpellHitResult
|
||||||
|
|
@ -265,7 +265,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleAuraModIncreaseFlightSpeed, //209 SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED_STACKING
|
&Aura::HandleAuraModIncreaseFlightSpeed, //209 SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED_STACKING
|
||||||
&Aura::HandleAuraModIncreaseFlightSpeed, //210 SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACKING
|
&Aura::HandleAuraModIncreaseFlightSpeed, //210 SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACKING
|
||||||
&Aura::HandleAuraModIncreaseFlightSpeed, //211 SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED_NOT_STACKING
|
&Aura::HandleAuraModIncreaseFlightSpeed, //211 SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED_NOT_STACKING
|
||||||
&Aura::HandleAuraModRangedAttackPowerOfStatPercent, //212 SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT
|
&Aura::HandleUnused, //212 old SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT
|
||||||
&Aura::HandleNoImmediateEffect, //213 SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT implemented in Player::RewardRage
|
&Aura::HandleNoImmediateEffect, //213 SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT implemented in Player::RewardRage
|
||||||
&Aura::HandleUnused, //214 Tamed Pet Passive (single test like spell 20782, also single for 157 aura)
|
&Aura::HandleUnused, //214 Tamed Pet Passive (single test like spell 20782, also single for 157 aura)
|
||||||
&Aura::HandleArenaPreparation, //215 SPELL_AURA_ARENA_PREPARATION
|
&Aura::HandleArenaPreparation, //215 SPELL_AURA_ARENA_PREPARATION
|
||||||
|
|
@ -312,7 +312,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleNoReagentUseAura, //256 SPELL_AURA_NO_REAGENT_USE Use SpellClassMask for spell select
|
&Aura::HandleNoReagentUseAura, //256 SPELL_AURA_NO_REAGENT_USE Use SpellClassMask for spell select
|
||||||
&Aura::HandleNULL, //257 SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS Use SpellClassMask for spell select
|
&Aura::HandleNULL, //257 SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS Use SpellClassMask for spell select
|
||||||
&Aura::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL
|
&Aura::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL
|
||||||
&Aura::HandleNoImmediateEffect, //259 SPELL_AURA_MOD_PERIODIC_HEAL implemented in Unit::SpellHealingBonus
|
&Aura::HandleUnused, //259 old SPELL_AURA_MOD_PERIODIC_HEAL
|
||||||
&Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code
|
&Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code
|
||||||
&Aura::HandlePhase, //261 SPELL_AURA_PHASE undetectable invisibility? implemented in Unit::isVisibleForOrDetect
|
&Aura::HandlePhase, //261 SPELL_AURA_PHASE undetectable invisibility? implemented in Unit::isVisibleForOrDetect
|
||||||
&Aura::HandleNoImmediateEffect, //262 SPELL_AURA_IGNORE_UNIT_STATE implemented in Unit::isIgnoreUnitState & Spell::CheckCast
|
&Aura::HandleNoImmediateEffect, //262 SPELL_AURA_IGNORE_UNIT_STATE implemented in Unit::isIgnoreUnitState & Spell::CheckCast
|
||||||
|
|
@ -321,19 +321,19 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleUnused, //265 unused (3.0.8a-4.3.4)
|
&Aura::HandleUnused, //265 unused (3.0.8a-4.3.4)
|
||||||
&Aura::HandleUnused, //266 unused (3.0.8a-4.3.4)
|
&Aura::HandleUnused, //266 unused (3.0.8a-4.3.4)
|
||||||
&Aura::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmuneToSpellEffect
|
&Aura::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmuneToSpellEffect
|
||||||
&Aura::HandleAuraModAttackPowerOfStatPercent, //268 SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
|
&Aura::HandleUnused, //268 old SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
|
||||||
&Aura::HandleNoImmediateEffect, //269 SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL implemented in Unit::CalcNotIgnoreDamageReduction
|
&Aura::HandleNoImmediateEffect, //269 SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL implemented in Unit::CalcNotIgnoreDamageReduction
|
||||||
&Aura::HandleUnused, //270 SPELL_AURA_MOD_IGNORE_TARGET_RESIST (unused in 3.2.2a)
|
&Aura::HandleUnused, //270 old SPELL_AURA_MOD_IGNORE_TARGET_RESIST (unused in 3.2.2a)
|
||||||
&Aura::HandleNoImmediateEffect, //271 SPELL_AURA_MOD_DAMAGE_FROM_CASTER implemented in Unit::SpellDamageBonusTaken
|
&Aura::HandleNoImmediateEffect, //271 SPELL_AURA_MOD_DAMAGE_FROM_CASTER implemented in Unit::SpellDamageBonusTaken
|
||||||
&Aura::HandleNoImmediateEffect, //272 SPELL_AURA_MAELSTROM_WEAPON (unclear use for aura, it used in (3.2.2a...3.3.0) in single spell 53817 that spellmode stacked and charged spell expected to be drop as stack
|
&Aura::HandleNoImmediateEffect, //272 SPELL_AURA_MAELSTROM_WEAPON (unclear use for aura, it used in (3.2.2a...3.3.0) in single spell 53817 that spellmode stacked and charged spell expected to be drop as stack
|
||||||
&Aura::HandleNoImmediateEffect, //273 SPELL_AURA_X_RAY (client side implementation)
|
&Aura::HandleNoImmediateEffect, //273 SPELL_AURA_X_RAY (client side implementation)
|
||||||
&Aura::HandleNULL, //274 proc free shot?
|
&Aura::HandleNULL, //274 proc free shot?
|
||||||
&Aura::HandleNoImmediateEffect, //275 SPELL_AURA_MOD_IGNORE_SHAPESHIFT Use SpellClassMask for spell select
|
&Aura::HandleNoImmediateEffect, //275 SPELL_AURA_MOD_IGNORE_SHAPESHIFT Use SpellClassMask for spell select
|
||||||
&Aura::HandleNULL, //276 mod damage % mechanic?
|
&Aura::HandleNULL, //276 mod damage % mechanic?
|
||||||
&Aura::HandleNoImmediateEffect, //277 SPELL_AURA_MOD_MAX_AFFECTED_TARGETS Use SpellClassMask for spell select
|
&Aura::HandleUnused, //277 old SPELL_AURA_MOD_MAX_AFFECTED_TARGETS
|
||||||
&Aura::HandleAuraModDisarm, //278 SPELL_AURA_MOD_DISARM_RANGED disarm ranged weapon
|
&Aura::HandleAuraModDisarm, //278 SPELL_AURA_MOD_DISARM_RANGED disarm ranged weapon
|
||||||
&Aura::HandleNULL, //279 SPELL_AURA_INITIALIZE_IMAGES 9 spells in 4.3.4 visual effects?
|
&Aura::HandleNULL, //279 SPELL_AURA_INITIALIZE_IMAGES 9 spells in 4.3.4 visual effects?
|
||||||
&Aura::HandleModTargetArmorPct, //280 SPELL_AURA_MOD_TARGET_ARMOR_PCT
|
&Aura::HandleUnused, //280 old SPELL_AURA_MOD_TARGET_ARMOR_PCT
|
||||||
&Aura::HandleNoImmediateEffect, //281 SPELL_AURA_MOD_HONOR_GAIN implemented in Player::RewardHonor
|
&Aura::HandleNoImmediateEffect, //281 SPELL_AURA_MOD_HONOR_GAIN implemented in Player::RewardHonor
|
||||||
&Aura::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
|
&Aura::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
|
||||||
&Aura::HandleNoImmediateEffect, //283 SPELL_AURA_MOD_HEALING_RECEIVED implemented in Unit::SpellHealingBonusTaken
|
&Aura::HandleNoImmediateEffect, //283 SPELL_AURA_MOD_HEALING_RECEIVED implemented in Unit::SpellHealingBonusTaken
|
||||||
|
|
@ -349,7 +349,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset
|
&Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset
|
||||||
&Aura::HandleAuraStopNaturalManaRegen, //294 SPELL_AURA_STOP_NATURAL_MANA_REGEN implemented in Player:Regenerate
|
&Aura::HandleAuraStopNaturalManaRegen, //294 SPELL_AURA_STOP_NATURAL_MANA_REGEN implemented in Player:Regenerate
|
||||||
&Aura::HandleUnused, //295 unused (4.3.4)
|
&Aura::HandleUnused, //295 unused (4.3.4)
|
||||||
&Aura::HandleNULL, //296 62 spells in 4.3.4
|
&Aura::HandleAuraSetVehicleId, //296 62 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //297 14 spells in 4.3.4
|
&Aura::HandleNULL, //297 14 spells in 4.3.4
|
||||||
&Aura::HandleUnused, //298 6 spells in 4.3.4
|
&Aura::HandleUnused, //298 6 spells in 4.3.4
|
||||||
&Aura::HandleUnused, //299 unused (3.2.2a-4.3.4)
|
&Aura::HandleUnused, //299 unused (3.2.2a-4.3.4)
|
||||||
|
|
@ -369,8 +369,8 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleNULL, //313 0 spells in 4.3.4
|
&Aura::HandleNULL, //313 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //314 SPELL_AURA_PREVENT_RESURRECTION 2 spells int 4.3.4 prevents ressurection ?
|
&Aura::HandleNULL, //314 SPELL_AURA_PREVENT_RESURRECTION 2 spells int 4.3.4 prevents ressurection ?
|
||||||
&Aura::HandleNULL, //315 SPELL_AURA_UNDERWATER_WALKING 4 spells in 4.3.4 underwater walking
|
&Aura::HandleNULL, //315 SPELL_AURA_UNDERWATER_WALKING 4 spells in 4.3.4 underwater walking
|
||||||
&Aura::HandleUnused, //316 0 spells in 4.3.4
|
&Aura::HandleUnused, //316 old SPELL_AURA_MOD_PERIODIC_HASTE 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //317 SPELL_AURA_MOD_INCREASE_SPELL_POWER_PCT 13 spells in 4.3.4
|
&Aura::HandleModIncreaseSpellPowerPct, //317 SPELL_AURA_MOD_INCREASE_SPELL_POWER_PCT 13 spells in 4.3.4, implemented in Unit::SpellBaseDamageBonusDone and Unit::SpellBaseHealingBonusDone
|
||||||
&Aura::HandleAuraMastery, //318 SPELL_AURA_MASTERY 12 spells in 4.3
|
&Aura::HandleAuraMastery, //318 SPELL_AURA_MASTERY 12 spells in 4.3
|
||||||
&Aura::HandleNULL, //319 SPELL_AURA_MOD_MELEE_ATTACK_SPEED 47 spells in 4.3.4
|
&Aura::HandleNULL, //319 SPELL_AURA_MOD_MELEE_ATTACK_SPEED 47 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //320 SPELL_AURA_MOD_RANGED_ATTACK_SPEED 5 spells in 4.3.4
|
&Aura::HandleNULL, //320 SPELL_AURA_MOD_RANGED_ATTACK_SPEED 5 spells in 4.3.4
|
||||||
|
|
@ -383,7 +383,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleUnused, //327 0 spells in 4.3.4
|
&Aura::HandleUnused, //327 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //328 3 spells in 4.3.4 Eclipse Mastery Driver Passive
|
&Aura::HandleNULL, //328 3 spells in 4.3.4 Eclipse Mastery Driver Passive
|
||||||
&Aura::HandleNULL, //329 SPELL_AURA_MOD_RUNIC_POWER_REGEN 3 spells in 4.3.4
|
&Aura::HandleNULL, //329 SPELL_AURA_MOD_RUNIC_POWER_REGEN 3 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //330 SPELL_AURA_ALLOW_CAST_WHILE_MOVING 16 spells in 4.3.4
|
&Aura::HandleNoImmediateEffect, //330 SPELL_AURA_ALLOW_CAST_WHILE_MOVING 16 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //331 SPELL_AURA_MOD_WEATHER 10 spells in 4.3.4
|
&Aura::HandleNULL, //331 SPELL_AURA_MOD_WEATHER 10 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //332 SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS 16 spells in 4.3.4
|
&Aura::HandleNULL, //332 SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS 16 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //333 SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2 10 spells in 4.3.4
|
&Aura::HandleNULL, //333 SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2 10 spells in 4.3.4
|
||||||
|
|
@ -402,14 +402,14 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleNULL, //346 32 spells in 4.3.4 shows progressbar-like ui?
|
&Aura::HandleNULL, //346 32 spells in 4.3.4 shows progressbar-like ui?
|
||||||
&Aura::HandleNULL, //347 SPELL_AURA_MOD_CD_FROM_HASTE 2 spells in 4.3.4
|
&Aura::HandleNULL, //347 SPELL_AURA_MOD_CD_FROM_HASTE 2 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //348 SPELL_AURA_MOD_MONEY_TO_GUILD_BANK 2 spells in 4.3.4
|
&Aura::HandleNULL, //348 SPELL_AURA_MOD_MONEY_TO_GUILD_BANK 2 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //349 SPELL_AURA_MOD_CURRENCY_GAIN 16 spells in 4.3.4
|
&Aura::HandleNoImmediateEffect, //349 SPELL_AURA_MOD_CURRENCY_GAIN 16 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //350 SPELL_AURA_MOD_MATERIAL_GAIN 1 spells in 4.3.4
|
&Aura::HandleNULL, //350 SPELL_AURA_MOD_MATERIAL_GAIN 1 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //351 8 spells in 4.3.4 archaeology-related
|
&Aura::HandleNULL, //351 8 spells in 4.3.4 archaeology-related
|
||||||
&Aura::HandleNULL, //352 1 spells in 4.3.4 enables worgen<>human form switches
|
&Aura::HandleNULL, //352 SPELL_AURA_ALLOW_WORGEN_TRANSFORM 1 spells in 4.3.4 enables worgen<>human form switches
|
||||||
&Aura::HandleNULL, //353 SPELL_AURA_MOD_CAMOUFLAGE 3 spells in 4.3.4
|
&Aura::HandleNULL, //353 SPELL_AURA_MOD_CAMOUFLAGE 3 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //354 SPELL_AURA_MOD_HEALING_DONE_FROM_PCT_HEALTH 2 spells in 4.3.4
|
&Aura::HandleNoImmediateEffect, //354 SPELL_AURA_MOD_HEALING_DONE_FROM_PCT_HEALTH 2 spells in 4.3.4
|
||||||
&Aura::HandleUnused, //355 0 spells in 4.3.4
|
&Aura::HandleUnused, //355 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
&Aura::HandleNoImmediateEffect, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
&Aura::HandleNULL, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
||||||
&Aura::HandleNoImmediateEffect, //358 SPELL_AURA_WORGEN_TRANSFORM 5 spells in 4.3.4 forces client-side transformation to worgen form
|
&Aura::HandleNoImmediateEffect, //358 SPELL_AURA_WORGEN_TRANSFORM 5 spells in 4.3.4 forces client-side transformation to worgen form
|
||||||
&Aura::HandleNULL, //359 1 spells in 4.3.4 healing done vs aurastate?
|
&Aura::HandleNULL, //359 1 spells in 4.3.4 healing done vs aurastate?
|
||||||
|
|
@ -419,7 +419,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleNULL, //363 1 spells in 4.3.4 Throw Totem
|
&Aura::HandleNULL, //363 1 spells in 4.3.4 Throw Totem
|
||||||
&Aura::HandleUnused, //364 0 spells in 4.3.4
|
&Aura::HandleUnused, //364 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //365 1 spells in 4.3.4 Max Far Clip Plane
|
&Aura::HandleNULL, //365 1 spells in 4.3.4 Max Far Clip Plane
|
||||||
&Aura::HandleNULL, //366 SPELL_AURA_MOD_SPELL_POWER_OF_ATTACK_POWER 1 spells in 4.3.4
|
&Aura::HandleOverrideSpellPowerByAp, //366 SPELL_AURA_OVERRIDE_SPELL_POWER_BY_AP_PCT 1 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //367 2 spells in 4.3.4 test spells
|
&Aura::HandleNULL, //367 2 spells in 4.3.4 test spells
|
||||||
&Aura::HandleUnused, //368 0 spells in 4.3.4
|
&Aura::HandleUnused, //368 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //369 5 spells in 4.3.4 darkmoon faire related
|
&Aura::HandleNULL, //369 5 spells in 4.3.4 darkmoon faire related
|
||||||
|
|
@ -507,7 +507,7 @@ AreaAura::AreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* cu
|
||||||
// caster==NULL in constructor args if target==caster in fact
|
// caster==NULL in constructor args if target==caster in fact
|
||||||
Unit* caster_ptr = caster ? caster : target;
|
Unit* caster_ptr = caster ? caster : target;
|
||||||
|
|
||||||
m_radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellEffect->EffectRadiusIndex));
|
m_radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellEffect->GetRadiusIndex()));
|
||||||
if(Player* modOwner = caster_ptr->GetSpellModOwner())
|
if(Player* modOwner = caster_ptr->GetSpellModOwner())
|
||||||
modOwner->ApplySpellMod(spellproto->Id, SPELLMOD_RADIUS, m_radius);
|
modOwner->ApplySpellMod(spellproto->Id, SPELLMOD_RADIUS, m_radius);
|
||||||
|
|
||||||
|
|
@ -779,6 +779,10 @@ void AreaAura::Update(uint32 diff)
|
||||||
if (!apply)
|
if (!apply)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Skip some targets (TODO: Might require better checks, also unclear how the actual caster must/can be handled)
|
||||||
|
if (GetSpellProto()->HasAttribute(SPELL_ATTR_EX3_TARGET_ONLY_PLAYER) && (*tIter)->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (SpellEntry const* actualSpellInfo = sSpellMgr.SelectAuraRankForLevel(GetSpellProto(), (*tIter)->getLevel()))
|
if (SpellEntry const* actualSpellInfo = sSpellMgr.SelectAuraRankForLevel(GetSpellProto(), (*tIter)->getLevel()))
|
||||||
{
|
{
|
||||||
int32 actualBasePoints = m_currentBasePoints;
|
int32 actualBasePoints = m_currentBasePoints;
|
||||||
|
|
@ -1099,26 +1103,18 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_spellmod = new SpellModifier(
|
SpellClassOptionsEntry const * opt = spellProto->GetSpellClassOptions();
|
||||||
SpellModOp(m_modifier.m_miscvalue),
|
|
||||||
SpellModType(m_modifier.m_auraname), // SpellModType value == spell aura types
|
|
||||||
m_modifier.m_amount,
|
|
||||||
this,
|
|
||||||
// prevent expire spell mods with (charges > 0 && m_stackAmount > 1)
|
|
||||||
// all this spell expected expire not at use but at spell proc event check
|
|
||||||
GetSpellProto()->GetStackAmount() > 1 ? 0 : GetHolder()->GetAuraCharges());
|
|
||||||
|
|
||||||
// Everlasting Affliction, overwrite wrong data, if will need more better restore support of spell_affect table
|
// Everlasting Affliction, overwrite wrong data, if will need more better restore support of spell_affect table
|
||||||
if (spellProto->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && spellProto->SpellIconID == 3169)
|
if (opt && spellProto->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && spellProto->SpellIconID == 3169)
|
||||||
{
|
{
|
||||||
// Corruption and Unstable Affliction
|
// Corruption and Unstable Affliction
|
||||||
m_spellmod->mask = ClassFamilyMask(UI64LIT(0x0000010000000002));
|
const_cast<SpellClassOptionsEntry*>(opt)->SpellFamilyFlags = ClassFamilyMask(UI64LIT(0x0000010000000002));
|
||||||
}
|
}
|
||||||
// Improved Flametongue Weapon, overwrite wrong data, maybe time re-add table
|
// Improved Flametongue Weapon, overwrite wrong data, maybe time re-add table
|
||||||
else if (spellProto->Id == 37212)
|
else if (opt && spellProto->Id == 37212)
|
||||||
{
|
{
|
||||||
// Flametongue Weapon (Passive)
|
// Flametongue Weapon (Passive)
|
||||||
m_spellmod->mask = ClassFamilyMask(UI64LIT(0x0000000000200000));
|
const_cast<SpellClassOptionsEntry*>(opt)->SpellFamilyFlags = ClassFamilyMask(UI64LIT(0x0000000000200000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1294,18 +1290,17 @@ void Aura::TriggerSpell()
|
||||||
case 24834: // Shadow Bolt Whirl
|
case 24834: // Shadow Bolt Whirl
|
||||||
{
|
{
|
||||||
uint32 spellForTick[8] = { 24820, 24821, 24822, 24823, 24835, 24836, 24837, 24838 };
|
uint32 spellForTick[8] = { 24820, 24821, 24822, 24823, 24835, 24836, 24837, 24838 };
|
||||||
uint32 tick = GetAuraTicks();
|
uint32 tick = (GetAuraTicks() + 7/*-1*/) % 8;
|
||||||
if (tick < 8)
|
|
||||||
{
|
|
||||||
trigger_spell_id = spellForTick[tick];
|
|
||||||
|
|
||||||
// casted in left/right (but triggered spell have wide forward cone)
|
// casted in left/right (but triggered spell have wide forward cone)
|
||||||
float forward = target->GetOrientation();
|
float forward = target->GetOrientation();
|
||||||
float angle = target->GetOrientation() + (tick % 2 == 0 ? M_PI_F / 2 : - M_PI_F / 2);
|
if (tick <= 3)
|
||||||
target->SetOrientation(angle);
|
target->SetOrientation(forward + 0.75f * M_PI_F - tick * M_PI_F / 8); // Left
|
||||||
triggerTarget->CastSpell(triggerTarget, trigger_spell_id, true, NULL, this, casterGUID);
|
else
|
||||||
target->SetOrientation(forward);
|
target->SetOrientation(forward - 0.75f * M_PI_F + (8 - tick) * M_PI_F / 8); // Right
|
||||||
}
|
|
||||||
|
triggerTarget->CastSpell(triggerTarget, spellForTick[tick], true, NULL, this, casterGUID);
|
||||||
|
target->SetOrientation(forward);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// // Stink Trap
|
// // Stink Trap
|
||||||
|
|
@ -1326,11 +1321,11 @@ void Aura::TriggerSpell()
|
||||||
float newAngle = target->GetOrientation();
|
float newAngle = target->GetOrientation();
|
||||||
|
|
||||||
if (auraId == 26009)
|
if (auraId == 26009)
|
||||||
newAngle += M_PI_F/40;
|
newAngle += M_PI_F / 40;
|
||||||
else
|
else
|
||||||
newAngle -= M_PI_F/40;
|
newAngle -= M_PI_F / 40;
|
||||||
|
|
||||||
NormalizeOrientation(newAngle);
|
newAngle = NormalizeOrientation(newAngle);
|
||||||
|
|
||||||
target->SetFacingTo(newAngle);
|
target->SetFacingTo(newAngle);
|
||||||
|
|
||||||
|
|
@ -1458,7 +1453,7 @@ void Aura::TriggerSpell()
|
||||||
if (!creature->GetCreatureInfo()->SkinLootId)
|
if (!creature->GetCreatureInfo()->SkinLootId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player->AutoStoreLoot(creature->GetCreatureInfo()->SkinLootId, LootTemplates_Skinning, true);
|
player->AutoStoreLoot(creature, creature->GetCreatureInfo()->SkinLootId, LootTemplates_Skinning, true);
|
||||||
|
|
||||||
creature->ForcedDespawn();
|
creature->ForcedDespawn();
|
||||||
}
|
}
|
||||||
|
|
@ -1565,8 +1560,16 @@ void Aura::TriggerSpell()
|
||||||
// case 36556: break;
|
// case 36556: break;
|
||||||
// // Cursed Scarab Despawn Periodic
|
// // Cursed Scarab Despawn Periodic
|
||||||
// case 36561: break;
|
// case 36561: break;
|
||||||
// // Vision Guide
|
case 36573: // Vision Guide
|
||||||
// case 36573: break;
|
{
|
||||||
|
if (GetAuraTicks() == 10 && target->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
((Player*)target)->AreaExploredOrEventHappens(10525);
|
||||||
|
target->RemoveAurasDueToSpell(36573);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
// // Cannon Charging (platform)
|
// // Cannon Charging (platform)
|
||||||
// case 36785: break;
|
// case 36785: break;
|
||||||
// // Cannon Charging (self)
|
// // Cannon Charging (self)
|
||||||
|
|
@ -1578,10 +1581,23 @@ void Aura::TriggerSpell()
|
||||||
// case 37125: break;
|
// case 37125: break;
|
||||||
// // Arcane Flurry
|
// // Arcane Flurry
|
||||||
// case 37268: break;
|
// case 37268: break;
|
||||||
// // Spout
|
case 37429: // Spout (left)
|
||||||
// case 37429: break;
|
case 37430: // Spout (right)
|
||||||
// // Spout
|
{
|
||||||
// case 37430: break;
|
float newAngle = target->GetOrientation();
|
||||||
|
|
||||||
|
if (auraId == 37429)
|
||||||
|
newAngle += 2 * M_PI_F / 100;
|
||||||
|
else
|
||||||
|
newAngle -= 2 * M_PI_F / 100;
|
||||||
|
|
||||||
|
newAngle = NormalizeOrientation(newAngle);
|
||||||
|
|
||||||
|
target->SetFacingTo(newAngle);
|
||||||
|
|
||||||
|
target->CastSpell(target, 37433, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// // Karazhan - Chess NPC AI, Snapshot timer
|
// // Karazhan - Chess NPC AI, Snapshot timer
|
||||||
// case 37440: break;
|
// case 37440: break;
|
||||||
// // Karazhan - Chess NPC AI, action timer
|
// // Karazhan - Chess NPC AI, action timer
|
||||||
|
|
@ -1656,10 +1672,23 @@ void Aura::TriggerSpell()
|
||||||
// case 40113: break;
|
// case 40113: break;
|
||||||
// // Spirit Lance
|
// // Spirit Lance
|
||||||
// case 40157: break;
|
// case 40157: break;
|
||||||
// // Demon Transform 2
|
case 40398: // Demon Transform 2
|
||||||
// case 40398: break;
|
switch (GetAuraTicks())
|
||||||
// // Demon Transform 1
|
{
|
||||||
// case 40511: break;
|
case 1:
|
||||||
|
if (target->HasAura(40506))
|
||||||
|
target->RemoveAurasDueToSpell(40506);
|
||||||
|
else
|
||||||
|
trigger_spell_id = 40506;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
trigger_spell_id = 40510;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 40511: // Demon Transform 1
|
||||||
|
trigger_spell_id = 40398;
|
||||||
|
break;
|
||||||
// // Ancient Flames
|
// // Ancient Flames
|
||||||
// case 40657: break;
|
// case 40657: break;
|
||||||
// // Ethereal Ring Cannon: Cannon Aura
|
// // Ethereal Ring Cannon: Cannon Aura
|
||||||
|
|
@ -2254,6 +2283,11 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
target->RemoveAurasDueToSpell(32346);
|
target->RemoveAurasDueToSpell(32346);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 36587: // Vision Guide
|
||||||
|
{
|
||||||
|
target->CastSpell(target, 36573, true, NULL, this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Gender spells
|
// Gender spells
|
||||||
case 38224: // Illidari Agent Illusion
|
case 38224: // Illidari Agent Illusion
|
||||||
case 37096: // Blood Elf Illusion
|
case 37096: // Blood Elf Illusion
|
||||||
|
|
@ -2850,6 +2884,20 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 64398: // Summon Scrap Bot (Ulduar, Mimiron) - for Scrap Bots
|
||||||
|
case 64426: // Summon Scrap Bot (Ulduar, Mimiron) - for Assault Bots
|
||||||
|
case 64621: // Summon Fire Bot (Ulduar, Mimiron)
|
||||||
|
{
|
||||||
|
uint32 triggerSpell = 0;
|
||||||
|
switch (GetId())
|
||||||
|
{
|
||||||
|
case 64398: triggerSpell = 63819; break;
|
||||||
|
case 64426: triggerSpell = 64427; break;
|
||||||
|
case 64621: triggerSpell = 64622; break;
|
||||||
|
}
|
||||||
|
target->CastSpell(target, triggerSpell, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
case 68839: // Corrupt Soul
|
case 68839: // Corrupt Soul
|
||||||
{
|
{
|
||||||
// Knockdown Stun
|
// Knockdown Stun
|
||||||
|
|
@ -3335,10 +3383,27 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
|
||||||
display_id = minfo->modelid;
|
display_id = minfo->modelid;
|
||||||
|
|
||||||
target->Mount(display_id, GetId());
|
target->Mount(display_id, GetId());
|
||||||
|
|
||||||
|
if (ci->vehicleId)
|
||||||
|
{
|
||||||
|
target->SetVehicleId(ci->vehicleId, ci->Entry);
|
||||||
|
|
||||||
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
target->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
target->Unmount(true);
|
target->Unmount(true);
|
||||||
|
|
||||||
|
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||||
|
if (ci && target->IsVehicle() && ci->vehicleId == target->GetVehicleInfo()->GetVehicleEntry()->m_ID)
|
||||||
|
{
|
||||||
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
target->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||||
|
|
||||||
|
target->SetVehicleId(0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3348,9 +3413,7 @@ void Aura::HandleAuraWaterWalk(bool apply, bool Real)
|
||||||
if (!Real)
|
if (!Real)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WorldPacket data;
|
GetTarget()->SetWaterWalk(apply);
|
||||||
GetTarget()->BuildMoveWaterWalkPacket(&data, apply, 0);
|
|
||||||
GetTarget()->SendMessageToSet(&data, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraFeatherFall(bool apply, bool Real)
|
void Aura::HandleAuraFeatherFall(bool apply, bool Real)
|
||||||
|
|
@ -3360,12 +3423,7 @@ void Aura::HandleAuraFeatherFall(bool apply, bool Real)
|
||||||
return;
|
return;
|
||||||
Unit* target = GetTarget();
|
Unit* target = GetTarget();
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
if (apply)
|
target->BuildMoveFeatherFallPacket(&data, apply, 0);
|
||||||
data.Initialize(SMSG_MOVE_FEATHER_FALL, 8 + 4);
|
|
||||||
else
|
|
||||||
data.Initialize(SMSG_MOVE_NORMAL_FALL, 8 + 4);
|
|
||||||
data << target->GetPackGUID();
|
|
||||||
data << uint32(0);
|
|
||||||
target->SendMessageToSet(&data, true);
|
target->SendMessageToSet(&data, true);
|
||||||
|
|
||||||
// start fall from current height
|
// start fall from current height
|
||||||
|
|
@ -3381,11 +3439,42 @@ void Aura::HandleAuraHover(bool apply, bool Real)
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
if (apply)
|
if (apply)
|
||||||
data.Initialize(SMSG_MOVE_SET_HOVER, 8 + 4);
|
{
|
||||||
|
GetTarget()->m_movementInfo.AddMovementFlag(MOVEFLAG_HOVER);
|
||||||
|
if (GetTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
data.Initialize(SMSG_MOVE_SET_HOVER, 8 + 4 + 1);
|
||||||
|
data.WriteGuidMask<1, 4, 2, 3, 0, 5, 6, 7>(GetTarget()->GetObjectGuid());
|
||||||
|
data.WriteGuidBytes<5, 4, 1, 2, 3, 6, 0, 7>(GetTarget()->GetObjectGuid());
|
||||||
|
data << uint32(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.Initialize(SMSG_SPLINE_MOVE_SET_HOVER, 8 + 4 + 1);
|
||||||
|
data.WriteGuidMask<3, 7, 0, 1, 4, 6, 2, 5>(GetTarget()->GetObjectGuid());
|
||||||
|
data.WriteGuidBytes<2, 4, 3, 1, 7, 0, 5, 6>(GetTarget()->GetObjectGuid());
|
||||||
|
GetTarget()->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
data.Initialize(SMSG_MOVE_UNSET_HOVER, 8 + 4);
|
{
|
||||||
data << GetTarget()->GetPackGUID();
|
GetTarget()->m_movementInfo.RemoveMovementFlag(MOVEFLAG_HOVER);
|
||||||
data << uint32(0);
|
data.Initialize(GetTarget()->GetTypeId() == TYPEID_PLAYER ? SMSG_MOVE_UNSET_HOVER : SMSG_SPLINE_MOVE_UNSET_HOVER, 8+4);
|
||||||
|
if (GetTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
data.Initialize(SMSG_MOVE_UNSET_HOVER, 8 + 4 + 1);
|
||||||
|
data.WriteGuidMask<4, 6, 3, 1, 2, 7, 5, 0>(GetTarget()->GetObjectGuid());
|
||||||
|
data.WriteGuidBytes<4, 5, 3, 6, 7, 1, 2, 0>(GetTarget()->GetObjectGuid());
|
||||||
|
data << uint32(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.Initialize(SMSG_SPLINE_MOVE_UNSET_HOVER, 8 + 4 + 1);
|
||||||
|
data.WriteGuidMask<6, 7, 4, 0, 3, 1, 5, 2>(GetTarget()->GetObjectGuid());
|
||||||
|
data.WriteGuidBytes<4, 5, 3, 0, 2, 7, 6, 1>(GetTarget()->GetObjectGuid());
|
||||||
|
GetTarget()->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2);
|
||||||
|
}
|
||||||
|
}
|
||||||
GetTarget()->SendMessageToSet(&data, true);
|
GetTarget()->SendMessageToSet(&data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3489,9 +3578,6 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||||
// remove other shapeshift before applying a new one
|
// remove other shapeshift before applying a new one
|
||||||
target->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT, GetHolder());
|
target->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT, GetHolder());
|
||||||
|
|
||||||
// need send to client not form active state, or at re-apply form client go crazy
|
|
||||||
target->SendForcedObjectUpdate();
|
|
||||||
|
|
||||||
if (modelid > 0)
|
if (modelid > 0)
|
||||||
target->SetDisplayId(modelid);
|
target->SetDisplayId(modelid);
|
||||||
|
|
||||||
|
|
@ -3628,6 +3714,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||||
|
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
((Player*)target)->InitDataForForm();
|
((Player*)target)->InitDataForForm();
|
||||||
|
|
||||||
|
// update form-dependent armor specializations
|
||||||
|
if (target->GetTypeId() == TYPEID_PLAYER && ((Player*)target)->getClass() == CLASS_DRUID)
|
||||||
|
((Player*)target)->UpdateArmorSpecializations();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraTransform(bool apply, bool Real)
|
void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||||
|
|
@ -4163,7 +4253,6 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
((Player*)target)->SetClientControl(target, 0);
|
((Player*)target)->SetClientControl(target, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -4513,9 +4602,7 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
|
||||||
target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client
|
target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data;
|
target->SetRoot(true);
|
||||||
target->BuildForceMoveRootPacket(&data, true, 0);
|
|
||||||
target->SendMessageToSet(&data, true);
|
|
||||||
|
|
||||||
// Summon the Naj'entus Spine GameObject on target if spell is Impaling Spine
|
// Summon the Naj'entus Spine GameObject on target if spell is Impaling Spine
|
||||||
if (GetId() == 39837)
|
if (GetId() == 39837)
|
||||||
|
|
@ -4570,9 +4657,7 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
|
||||||
if (target->getVictim() && target->isAlive())
|
if (target->getVictim() && target->isAlive())
|
||||||
target->SetTargetGuid(target->getVictim()->GetObjectGuid());
|
target->SetTargetGuid(target->getVictim()->GetObjectGuid());
|
||||||
|
|
||||||
WorldPacket data;
|
target->SetRoot(false);
|
||||||
target->BuildForceMoveRootPacket(&data, false, 0);
|
|
||||||
target->SendMessageToSet(&data, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wyvern Sting
|
// Wyvern Sting
|
||||||
|
|
@ -4803,9 +4888,7 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
|
||||||
|
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
target->SetRoot(true);
|
||||||
target->BuildForceMoveRootPacket(&data, true, 2);
|
|
||||||
target->SendMessageToSet(&data, true);
|
|
||||||
|
|
||||||
// Clear unit movement flags
|
// Clear unit movement flags
|
||||||
((Player*)target)->m_movementInfo.SetMovementFlags(MOVEFLAG_NONE);
|
((Player*)target)->m_movementInfo.SetMovementFlags(MOVEFLAG_NONE);
|
||||||
|
|
@ -4850,11 +4933,7 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
|
||||||
target->SetTargetGuid(target->getVictim()->GetObjectGuid());
|
target->SetTargetGuid(target->getVictim()->GetObjectGuid());
|
||||||
|
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
target->SetRoot(false);
|
||||||
WorldPacket data;
|
|
||||||
target->BuildForceMoveRootPacket(&data, false, 2);
|
|
||||||
target->SendMessageToSet(&data, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5389,7 +5468,6 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real)
|
||||||
if (Unit* caster = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (200 * GetAuraMaxTicks()));
|
m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (200 * GetAuraMaxTicks()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case 29166: // Innervate (value% of casters base mana)
|
case 29166: // Innervate (value% of casters base mana)
|
||||||
{
|
{
|
||||||
|
|
@ -5626,11 +5704,11 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
break;
|
break;
|
||||||
//1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs
|
// 1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs
|
||||||
//2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs
|
// 2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs
|
||||||
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
|
// 3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
|
||||||
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
|
// 4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
|
||||||
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
|
// 5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
|
||||||
float AP_per_combo[6] = {0.0f, 0.015f, 0.024f, 0.03f, 0.03428571f, 0.0375f};
|
float AP_per_combo[6] = {0.0f, 0.015f, 0.024f, 0.03f, 0.03428571f, 0.0375f};
|
||||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||||
if (cp > 5) cp = 5;
|
if (cp > 5) cp = 5;
|
||||||
|
|
@ -5923,13 +6001,11 @@ void Aura::HandleModHealingDone(bool /*apply*/, bool /*Real*/)
|
||||||
|
|
||||||
void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
||||||
{
|
{
|
||||||
if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4)
|
if (!m_modifier.m_amount)
|
||||||
{
|
|
||||||
sLog.outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
Unit* target = GetTarget();
|
Unit* target = GetTarget();
|
||||||
|
uint32 miscValueB = GetSpellEffect()->EffectMiscValueB;
|
||||||
|
|
||||||
// save current and max HP before applying aura
|
// save current and max HP before applying aura
|
||||||
uint32 curHPValue = target->GetHealth();
|
uint32 curHPValue = target->GetHealth();
|
||||||
|
|
@ -5937,7 +6013,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
||||||
|
|
||||||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||||
{
|
{
|
||||||
if (m_modifier.m_miscvalue == i || m_modifier.m_miscvalue == -1)
|
if ((miscValueB & (1 << i)) || miscValueB == 0)
|
||||||
{
|
{
|
||||||
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, float(m_modifier.m_amount), apply);
|
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->IsPet())
|
if (target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->IsPet())
|
||||||
|
|
@ -5946,10 +6022,9 @@ void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
// recalculate current HP/MP after applying aura modifications (only for spells with 0x10 flag)
|
// recalculate current HP/MP after applying aura modifications (only for spells with 0x10 flag)
|
||||||
if (m_modifier.m_miscvalue == STAT_STAMINA && maxHPValue > 0 && GetSpellProto()->HasAttribute(SPELL_ATTR_UNK4))
|
if ((miscValueB & (1 << STAT_STAMINA)) && maxHPValue > 0 && GetSpellProto()->HasAttribute(SPELL_ATTR_UNK4))
|
||||||
{
|
{
|
||||||
// newHP = (curHP / maxHP) * newMaxHP = (newMaxHP * curHP) / maxHP -> which is better because no int -> double -> int conversion is needed
|
uint32 newHPValue = uint32(float(target->GetMaxHealth()) / maxHPValue * curHPValue);
|
||||||
uint32 newHPValue = (target->GetMaxHealth() * curHPValue) / maxHPValue;
|
|
||||||
target->SetHealth(newHPValue);
|
target->SetHealth(newHPValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6394,28 +6469,6 @@ void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool /*Real*/)
|
||||||
GetTarget()->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
GetTarget()->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool /*apply*/, bool Real)
|
|
||||||
{
|
|
||||||
// spells required only Real aura add/remove
|
|
||||||
if (!Real)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Recalculate bonus
|
|
||||||
if (GetTarget()->GetTypeId() == TYPEID_PLAYER && !(GetTarget()->getClassMask() & CLASSMASK_WAND_USERS))
|
|
||||||
((Player*)GetTarget())->UpdateAttackPowerAndDamage(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Aura::HandleAuraModAttackPowerOfStatPercent(bool /*apply*/, bool Real)
|
|
||||||
{
|
|
||||||
// spells required only Real aura add/remove
|
|
||||||
if (!Real)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Recalculate bonus
|
|
||||||
if (GetTarget()->GetTypeId() == TYPEID_PLAYER)
|
|
||||||
((Player*)GetTarget())->UpdateAttackPowerAndDamage(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Aura::HandleAuraModAttackPowerOfArmor(bool /*apply*/, bool Real)
|
void Aura::HandleAuraModAttackPowerOfArmor(bool /*apply*/, bool Real)
|
||||||
{
|
{
|
||||||
// spells required only Real aura add/remove
|
// spells required only Real aura add/remove
|
||||||
|
|
@ -6762,7 +6815,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Master Shapeshifter
|
// Master Shapeshifter
|
||||||
if (MasterShaperSpellId)
|
if (MasterShaperSpellId)
|
||||||
{
|
{
|
||||||
|
|
@ -7349,7 +7401,7 @@ void Aura::PeriodicTick()
|
||||||
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
||||||
pdamage -= target->GetDamageReduction(pdamage);
|
pdamage -= target->GetDamageReduction(pdamage);
|
||||||
|
|
||||||
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !GetSpellProto()->HasAttribute(SPELL_ATTR_EX2_CANT_REFLECTED));
|
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !GetSpellProto()->HasAttribute(SPELL_ATTR_EX_CANT_REFLECTED));
|
||||||
|
|
||||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
|
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
|
||||||
GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(), absorb);
|
GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(), absorb);
|
||||||
|
|
@ -7441,7 +7493,7 @@ void Aura::PeriodicTick()
|
||||||
if (GetCasterGuid().IsPlayer())
|
if (GetCasterGuid().IsPlayer())
|
||||||
pdamage -= target->GetDamageReduction(pdamage);
|
pdamage -= target->GetDamageReduction(pdamage);
|
||||||
|
|
||||||
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !spellProto->HasAttribute(SPELL_ATTR_EX2_CANT_REFLECTED));
|
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !spellProto->HasAttribute(SPELL_ATTR_EX_CANT_REFLECTED));
|
||||||
|
|
||||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
|
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
|
||||||
GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(), absorb);
|
GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(), absorb);
|
||||||
|
|
@ -7961,7 +8013,7 @@ void Aura::PeriodicDummyTick()
|
||||||
uint32 rand = urand(0, 99);
|
uint32 rand = urand(0, 99);
|
||||||
for (uint32 i = 1; i <= 6; ++i)
|
for (uint32 i = 1; i <= 6; ++i)
|
||||||
{
|
{
|
||||||
if (rand < i * (i+1) /2 * 5)
|
if (rand < i * (i + 1) / 2 * 5)
|
||||||
{
|
{
|
||||||
target->CastSpell(target, spell->Id + i, true);
|
target->CastSpell(target, spell->Id + i, true);
|
||||||
break;
|
break;
|
||||||
|
|
@ -8192,7 +8244,7 @@ void Aura::PeriodicDummyTick()
|
||||||
else
|
else
|
||||||
newAngle -= 0.09f;
|
newAngle -= 0.09f;
|
||||||
|
|
||||||
NormalizeOrientation(newAngle);
|
newAngle = NormalizeOrientation(newAngle);
|
||||||
|
|
||||||
target->SetFacingTo(newAngle);
|
target->SetFacingTo(newAngle);
|
||||||
|
|
||||||
|
|
@ -8501,29 +8553,16 @@ void Aura::HandleAuraControlVehicle(bool apply, bool Real)
|
||||||
if (!target->IsVehicle())
|
if (!target->IsVehicle())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: Check for free seat
|
|
||||||
|
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (!caster)
|
if (!caster)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
target->GetVehicleInfo()->Board(caster, GetBasePoints() - 1);
|
||||||
((Player*)caster)->RemovePet(PET_SAVE_AS_CURRENT);
|
|
||||||
|
|
||||||
// caster->EnterVehicle(target);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
target->GetVehicleInfo()->UnBoard(caster, m_removeMode == AURA_REMOVE_BY_TRACKING);
|
||||||
// some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them
|
|
||||||
caster->RemoveAurasDueToSpell(GetId());
|
|
||||||
|
|
||||||
// caster->ExitVehicle();
|
|
||||||
|
|
||||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
|
||||||
((Player*)caster)->ResummonPetTemporaryUnSummonedIfAny();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraAddMechanicAbilities(bool apply, bool Real)
|
void Aura::HandleAuraAddMechanicAbilities(bool apply, bool Real)
|
||||||
|
|
@ -8707,10 +8746,6 @@ void Aura::HandleAuraSafeFall(bool Apply, bool Real)
|
||||||
|
|
||||||
bool Aura::IsCritFromAbilityAura(Unit* caster, uint32& damage)
|
bool Aura::IsCritFromAbilityAura(Unit* caster, uint32& damage)
|
||||||
{
|
{
|
||||||
if (!GetSpellProto()->IsFitToFamily(SPELLFAMILY_ROGUE, UI64LIT(0x100000)) && // Rupture
|
|
||||||
!caster->HasAffectedAura(SPELL_AURA_ABILITY_PERIODIC_CRIT, GetSpellProto()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (caster->IsSpellCrit(GetTarget(), GetSpellProto(), GetSpellSchoolMask(GetSpellProto())))
|
if (caster->IsSpellCrit(GetTarget(), GetSpellProto(), GetSpellSchoolMask(GetSpellProto())))
|
||||||
{
|
{
|
||||||
damage = caster->SpellCriticalDamageBonus(GetSpellProto(), damage, GetTarget());
|
damage = caster->SpellCriticalDamageBonus(GetSpellProto(), damage, GetTarget());
|
||||||
|
|
@ -8720,14 +8755,6 @@ bool Aura::IsCritFromAbilityAura(Unit* caster, uint32& damage)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleModTargetArmorPct(bool /*apply*/, bool /*Real*/)
|
|
||||||
{
|
|
||||||
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
|
||||||
return;
|
|
||||||
|
|
||||||
((Player*)GetTarget())->UpdateArmorPenetration();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Aura::HandleAuraModAllCritChance(bool apply, bool Real)
|
void Aura::HandleAuraModAllCritChance(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
// spells required only Real aura add/remove
|
// spells required only Real aura add/remove
|
||||||
|
|
@ -8755,6 +8782,14 @@ void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool Real)
|
||||||
GetTarget()->ApplyModFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER, !apply);
|
GetTarget()->ApplyModFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER, !apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Aura::HandleAuraSetVehicleId(bool apply, bool Real)
|
||||||
|
{
|
||||||
|
if (!Real)
|
||||||
|
return;
|
||||||
|
|
||||||
|
GetTarget()->SetVehicleId(apply ? GetMiscValue() : 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraMastery(bool apply, bool Real)
|
void Aura::HandleAuraMastery(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
Unit* target = GetTarget();
|
Unit* target = GetTarget();
|
||||||
|
|
@ -8809,7 +8844,7 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Wor
|
||||||
m_applyTime = time(NULL);
|
m_applyTime = time(NULL);
|
||||||
m_isPassive = IsPassiveSpell(spellproto);
|
m_isPassive = IsPassiveSpell(spellproto);
|
||||||
m_isDeathPersist = IsDeathPersistentSpell(spellproto);
|
m_isDeathPersist = IsDeathPersistentSpell(spellproto);
|
||||||
m_isSingleTarget = IsSingleTargetSpell(spellproto);
|
m_trackedAuraType= IsSingleTargetSpell(spellproto) ? TRACK_AURA_TYPE_SINGLE_TARGET : IsSpellHaveAura(spellproto, SPELL_AURA_CONTROL_VEHICLE) ? TRACK_AURA_TYPE_CONTROL_VEHICLE : TRACK_AURA_TYPE_NOT_TRACKED;
|
||||||
m_procCharges = m_spellProto->GetProcCharges();
|
m_procCharges = m_spellProto->GetProcCharges();
|
||||||
|
|
||||||
m_isRemovedOnShapeLost = (GetCasterGuid() == m_target->GetObjectGuid() &&
|
m_isRemovedOnShapeLost = (GetCasterGuid() == m_target->GetObjectGuid() &&
|
||||||
|
|
@ -8915,7 +8950,23 @@ void SpellAuraHolder::_AddSpellAuraHolder()
|
||||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||||
{
|
{
|
||||||
if (m_auras[i])
|
if (m_auras[i])
|
||||||
|
{
|
||||||
flags |= (1 << i);
|
flags |= (1 << i);
|
||||||
|
|
||||||
|
if (m_auras[i]->GetModifier()->m_amount)
|
||||||
|
{
|
||||||
|
switch (m_auras[i]->GetModifier()->m_auraname)
|
||||||
|
{
|
||||||
|
case SPELL_AURA_SCHOOL_ABSORB:
|
||||||
|
case SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS:
|
||||||
|
case SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2:
|
||||||
|
flags |= AFLAG_EFFECT_AMOUNT_SEND;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetCasterGuid() == GetTarget()->GetObjectGuid())
|
if (GetCasterGuid() == GetTarget()->GetObjectGuid())
|
||||||
|
|
@ -9282,6 +9333,8 @@ bool SpellAuraHolder::IsNeedVisibleSlot(Unit const* caster) const
|
||||||
return true;
|
return true;
|
||||||
else if (IsSpellHaveAura(m_spellProto, SPELL_AURA_IGNORE_UNIT_STATE))
|
else if (IsSpellHaveAura(m_spellProto, SPELL_AURA_IGNORE_UNIT_STATE))
|
||||||
return true;
|
return true;
|
||||||
|
else if (IsSpellHaveAura(m_spellProto, SPELL_AURA_ALLOW_CAST_WHILE_MOVING))
|
||||||
|
return true;
|
||||||
|
|
||||||
// passive auras (except totem auras) do not get placed in the slots
|
// passive auras (except totem auras) do not get placed in the slots
|
||||||
return !m_isPassive || totemAura || HasAreaAuraEffect(m_spellProto);
|
return !m_isPassive || totemAura || HasAreaAuraEffect(m_spellProto);
|
||||||
|
|
@ -10194,13 +10247,54 @@ bool SpellAuraHolder::IsEmptyHolder() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellAuraHolder::UnregisterSingleCastHolder()
|
void SpellAuraHolder::UnregisterAndCleanupTrackedAuras()
|
||||||
{
|
{
|
||||||
if (IsSingleTarget())
|
TrackedAuraType trackedType = GetTrackedAuraType();
|
||||||
|
if (!trackedType)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (trackedType == TRACK_AURA_TYPE_SINGLE_TARGET)
|
||||||
{
|
{
|
||||||
if (Unit* caster = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
caster->GetSingleCastSpellTargets().erase(GetSpellProto());
|
caster->GetTrackedAuraTargets(trackedType).erase(GetSpellProto());
|
||||||
|
|
||||||
m_isSingleTarget = false;
|
|
||||||
}
|
}
|
||||||
|
else if (trackedType == TRACK_AURA_TYPE_CONTROL_VEHICLE)
|
||||||
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
if (caster && IsSpellHaveAura(GetSpellProto(), SPELL_AURA_CONTROL_VEHICLE, GetAuraFlags()))
|
||||||
|
{
|
||||||
|
caster->GetTrackedAuraTargets(trackedType).erase(GetSpellProto());
|
||||||
|
caster->RemoveAurasDueToSpell(GetSpellProto()->Id);
|
||||||
|
}
|
||||||
|
else if (caster)
|
||||||
|
{
|
||||||
|
Unit::TrackedAuraTargetMap scTarget = caster->GetTrackedAuraTargets(trackedType);
|
||||||
|
Unit::TrackedAuraTargetMap::iterator find = scTarget.find(GetSpellProto());
|
||||||
|
if (find != scTarget.end())
|
||||||
|
{
|
||||||
|
ObjectGuid vehicleGuid = find->second;
|
||||||
|
scTarget.erase(find);
|
||||||
|
if (Unit* vehicle = caster->GetMap()->GetUnit(vehicleGuid))
|
||||||
|
vehicle->RemoveAurasDueToSpell(GetSpellProto()->Id, NULL, AURA_REMOVE_BY_DEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_trackedAuraType = TRACK_AURA_TYPE_NOT_TRACKED;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Aura::HandleModIncreaseSpellPowerPct(bool apply, bool Real)
|
||||||
|
{
|
||||||
|
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
((Player*)GetTarget())->UpdateSpellDamageAndHealingBonus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Aura::HandleOverrideSpellPowerByAp(bool apply, bool Real)
|
||||||
|
{
|
||||||
|
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
((Player*)GetTarget())->UpdateSpellDamageAndHealingBonus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12543"
|
#define REVISION_NR "12544"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue