Merge branch 'master' into 303

Conflicts:
	contrib/extractor/System.cpp
	contrib/extractor/ad.exe
	src/game/WorldSocket.cpp
This commit is contained in:
tomrus88 2008-11-06 15:50:47 +03:00
commit 78ec66babc
78 changed files with 510 additions and 752 deletions

View file

@ -165,10 +165,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
@ -186,7 +186,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
@ -215,7 +215,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
@ -2257,6 +2257,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);
@ -3579,7 +3583,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)
@ -3588,7 +3592,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)
@ -3627,7 +3631,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)
@ -3636,7 +3640,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)
@ -3647,7 +3651,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)
@ -4327,7 +4331,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;
@ -4338,7 +4342,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;
@ -4356,7 +4360,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;
@ -4367,7 +4371,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;
@ -4376,7 +4380,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;
@ -4416,7 +4420,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;
@ -4551,7 +4555,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)
@ -4565,7 +4569,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)
@ -4666,7 +4670,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;
@ -4674,7 +4678,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;
@ -4683,7 +4687,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;
@ -4692,7 +4696,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)
@ -4760,7 +4764,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)
@ -4842,39 +4846,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
@ -5322,7 +5293,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;
@ -5347,17 +5318,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;