*Fix hunter's tame beast.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-14 12:13:22 +01:00
parent c45fe6969c
commit 648a8d505f
3 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -3381,7 +3381,7 @@ void Spell::TakeRunePower()
} }
// you can gain some runic power when use runes // you can gain some runic power when use runes
float rp = src->runePowerGain;; float rp = src->runePowerGain;
rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME); rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME);
plr->ModifyPower(POWER_RUNIC_POWER, (int32)rp); plr->ModifyPower(POWER_RUNIC_POWER, (int32)rp);
} }
+6 -1
View File
@@ -433,7 +433,12 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
sLog.outDebug("Aura: construct Spellid : %u, Aura : %u Duration : %d Target : %d Damage : %d", m_spellProto->Id, m_spellProto->EffectApplyAuraName[eff], m_maxduration, m_spellProto->EffectImplicitTargetA[eff],damage); sLog.outDebug("Aura: construct Spellid : %u, Aura : %u Duration : %d Target : %d Damage : %d", m_spellProto->Id, m_spellProto->EffectApplyAuraName[eff], m_maxduration, m_spellProto->EffectImplicitTargetA[eff],damage);
m_effIndex = eff; m_effIndex = eff;
SetModifier(AuraType(m_spellProto->EffectApplyAuraName[eff]), damage, m_spellProto->EffectAmplitude[eff], m_spellProto->EffectMiscValue[eff]); int32 periodicTime = m_spellProto->EffectAmplitude[eff];
//apply casting time mods for channeled spells
if (caster && IsChanneledSpell(m_spellProto))
caster->ModSpellCastTime(m_spellProto, periodicTime);
SetModifier(AuraType(m_spellProto->EffectApplyAuraName[eff]), damage,periodicTime , m_spellProto->EffectMiscValue[eff]);
// Apply periodic time mod // Apply periodic time mod
if(modOwner && m_modifier.periodictime) if(modOwner && m_modifier.periodictime)
-10
View File
@@ -8715,16 +8715,11 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
{ {
// Damage Done from spell damage bonus // Damage Done from spell damage bonus
int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto); int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto);
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, CastingTime);
// Damage over Time spells bonus calculation // Damage over Time spells bonus calculation
float DotFactor = 1.0f; float DotFactor = 1.0f;
if(damagetype == DOT) if(damagetype == DOT)
{ {
int32 DotDuration = GetSpellDuration(spellProto); int32 DotDuration = GetSpellDuration(spellProto);
//apply casting time mods for channeled spells
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, DotDuration);
// 200% limit // 200% limit
if(DotDuration > 0) if(DotDuration > 0)
{ {
@@ -9211,16 +9206,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
{ {
// Damage Done from spell damage bonus // Damage Done from spell damage bonus
int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto); int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto);
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, CastingTime);
// Damage over Time spells bonus calculation // Damage over Time spells bonus calculation
float DotFactor = 1.0f; float DotFactor = 1.0f;
if(damagetype == DOT) if(damagetype == DOT)
{ {
int32 DotDuration = GetSpellDuration(spellProto); int32 DotDuration = GetSpellDuration(spellProto);
//apply casting time mods for channeled spells
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, DotDuration);
// 200% limit // 200% limit
if(DotDuration > 0) if(DotDuration > 0)
{ {