Merged commit 269 (5f0e38da128a).
--HG-- branch : trunk
This commit is contained in:
commit
ae8a27bbb7
403 files changed
+4898
-3946
No files matched your search
+40
-68
@@ -169,10 +169,10 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||
&Aura::HandleNoImmediateEffect, //112 SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
|
||||
&Aura::HandleNoImmediateEffect, //113 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleNoImmediateEffect, //114 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleAuraHealing, //115 SPELL_AURA_MOD_HEALING
|
||||
&Aura::HandleNoImmediateEffect, //115 SPELL_AURA_MOD_HEALING implemented in Unit::SpellBaseHealingBonusForVictim
|
||||
&Aura::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT
|
||||
&Aura::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult
|
||||
&Aura::HandleAuraHealingPct, //118 SPELL_AURA_MOD_HEALING_PCT
|
||||
&Aura::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleUnused, //119 SPELL_AURA_SHARE_PET_TRACKING useless
|
||||
&Aura::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE
|
||||
&Aura::HandleAuraEmpathy, //121 SPELL_AURA_EMPATHY
|
||||
@@ -190,7 +190,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||
&Aura::HandleAuraModIncreaseHealthPercent, //133 SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
|
||||
&Aura::HandleAuraModRegenInterrupt, //134 SPELL_AURA_MOD_MANA_REGEN_INTERRUPT
|
||||
&Aura::HandleModHealingDone, //135 SPELL_AURA_MOD_HEALING_DONE
|
||||
&Aura::HandleAuraHealingPct, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleNoImmediateEffect, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleModTotalPercentStat, //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
|
||||
&Aura::HandleHaste, //138 SPELL_AURA_MOD_HASTE
|
||||
&Aura::HandleForceReaction, //139 SPELL_AURA_FORCE_REACTION
|
||||
@@ -219,7 +219,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||
&Aura::HandleAuraPowerBurn, //162 SPELL_AURA_POWER_BURN_MANA
|
||||
&Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE
|
||||
&Aura::HandleUnused, //164 useless, only one test spell
|
||||
&Aura::HandleAuraAttackPowerAttacker, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleNoImmediateEffect, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_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::SpellDamageBonus, Unit::MeleeDamageBonus
|
||||
@@ -1998,6 +1998,16 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||
return;
|
||||
}
|
||||
|
||||
// Waiting to Resurrect
|
||||
if(GetId()==2584)
|
||||
{
|
||||
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
if(BattleGround *bg = ((Player*)m_target)->GetBattleGround())
|
||||
bg->RemovePlayerFromResurrectQueue(m_target->GetGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
// Dark Fiend
|
||||
if(GetId()==45934)
|
||||
{
|
||||
@@ -2286,6 +2296,10 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
||||
|
||||
void Aura::HandleAuraMounted(bool apply, bool Real)
|
||||
{
|
||||
// only at real add/remove aura
|
||||
if(!Real)
|
||||
return;
|
||||
|
||||
if(apply)
|
||||
{
|
||||
CreatureInfo const* ci = objmgr.GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
@@ -2685,7 +2699,9 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (uint32 modelid = ci->GetRandomValidModelId()) m_target->SetDisplayId(modelid);
|
||||
// Will use the default model here
|
||||
if (uint32 modelid = ci->GetRandomValidModelId())
|
||||
m_target->SetDisplayId(modelid);
|
||||
|
||||
// Dragonmaw Illusion (set mount model also)
|
||||
if(GetId()==42016 && m_target->GetMountID() && !m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED).empty())
|
||||
@@ -3581,7 +3597,7 @@ void Aura::HandleModTaunt(bool apply, bool Real)
|
||||
/*********************************************************/
|
||||
/*** MODIFY SPEED ***/
|
||||
/*********************************************************/
|
||||
void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
@@ -3590,7 +3606,7 @@ void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)
|
||||
m_target->UpdateSpeed(MOVE_RUN, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
@@ -3629,7 +3645,7 @@ void Aura::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
|
||||
m_target->UpdateSpeed(MOVE_FLY, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
@@ -3638,7 +3654,7 @@ void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)
|
||||
m_target->UpdateSpeed(MOVE_SWIM, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
@@ -3649,7 +3665,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
|
||||
m_target->UpdateSpeed(MOVE_FLY, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
@@ -4334,7 +4350,7 @@ void Aura::HandleModPercentStat(bool apply, bool Real)
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4345,7 +4361,7 @@ void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)
|
||||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4363,7 +4379,7 @@ void Aura::HandleAuraModDispelResist(bool apply, bool Real)
|
||||
m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID());
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4374,7 +4390,7 @@ void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)
|
||||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4383,7 +4399,7 @@ void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)
|
||||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModHealingDone(bool apply, bool Real)
|
||||
void Aura::HandleModHealingDone(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4423,7 +4439,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool Real)
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4558,7 +4574,7 @@ void Aura::HandleModPowerRegen(bool apply, bool Real) // drinking
|
||||
((Player*)m_target)->UpdateManaRegen();
|
||||
}
|
||||
|
||||
void Aura::HandleModPowerRegenPCT(bool apply, bool Real)
|
||||
void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
@@ -4572,7 +4588,7 @@ void Aura::HandleModPowerRegenPCT(bool apply, bool Real)
|
||||
((Player*)m_target)->UpdateManaRegen();
|
||||
}
|
||||
|
||||
void Aura::HandleModManaRegen(bool apply, bool Real)
|
||||
void Aura::HandleModManaRegen(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
@@ -4659,7 +4675,7 @@ void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool Real)
|
||||
/*** FIGHT ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModParryPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4667,7 +4683,7 @@ void Aura::HandleAuraModParryPercent(bool apply, bool Real)
|
||||
((Player*)m_target)->UpdateParryPercentage();
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDodgePercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4676,7 +4692,7 @@ void Aura::HandleAuraModDodgePercent(bool apply, bool Real)
|
||||
//sLog.outError("BONUS DODGE CHANCE: + %f", float(m_modifier.m_amount));
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModBlockPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4685,7 +4701,7 @@ void Aura::HandleAuraModBlockPercent(bool apply, bool Real)
|
||||
//sLog.outError("BONUS BLOCK CHANCE: + %f", float(m_modifier.m_amount));
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
@@ -4753,7 +4769,7 @@ void Aura::HandleModSpellCritChance(bool apply, bool Real)
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellCritChanceShool(bool apply, bool Real)
|
||||
void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
@@ -4835,39 +4851,6 @@ void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real)
|
||||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraAttackPowerAttacker(bool apply, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
return;
|
||||
Unit *caster = GetCaster();
|
||||
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
// Hunter's Mark
|
||||
if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)
|
||||
{
|
||||
// Check Improved Hunter's Mark bonus on caster
|
||||
Unit::AuraList const& mOverrideClassScript = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for(Unit::AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
Modifier* mod = (*i)->GetModifier();
|
||||
// mproved Hunter's Mark script from 5236 to 5240
|
||||
if (mod->m_miscvalue >= 5236 && mod->m_miscvalue <= 5240)
|
||||
{
|
||||
// Get amount of ranged bonus for this spell..
|
||||
int32 ranged_bonus = caster->CalculateSpellDamage(m_spellProto, 1, m_spellProto->EffectBasePoints[1], m_target);
|
||||
// Set melee attack power bonus % from ranged depends from Improved mask aura
|
||||
m_modifier.m_amount = mod->m_amount * ranged_bonus / 100;
|
||||
m_currentBasePoints = m_modifier.m_amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModAttackPowerPercent(bool apply, bool Real)
|
||||
{
|
||||
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
|
||||
@@ -5315,7 +5298,7 @@ void Aura::HandleForceMoveForward(bool apply, bool Real)
|
||||
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModExpertise(bool apply, bool Real)
|
||||
void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -5340,17 +5323,6 @@ void Aura::HandleModTargetResistance(bool apply, bool Real)
|
||||
m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
//HandleNoImmediateEffect auras implementation to support new stat system
|
||||
void Aura::HandleAuraHealing(bool apply, bool Real)
|
||||
{
|
||||
//m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraHealingPct(bool apply, bool Real)
|
||||
{
|
||||
//m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleShieldBlockValue(bool apply, bool Real)
|
||||
{
|
||||
BaseModType modType = FLAT_MOD;
|
||||
|
||||
Reference in new issue
Block a user