Created
May 21, 2011 18:25
-
-
Save SeTM/984754 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp | |
index 171632d..7e99476 100644 | |
--- a/src/game/SpellAuras.cpp | |
+++ b/src/game/SpellAuras.cpp | |
@@ -428,7 +428,7 @@ m_isPersistent(false), m_in_use(0), m_spellAuraHolder(holder) | |
if (modOwner && m_modifier.periodictime) | |
{ | |
modOwner->ApplySpellMod(spellproto->Id, SPELLMOD_ACTIVATION_TIME, m_modifier.periodictime); | |
- uint32 newperiodictime = modOwner->CalculateAuraPeriodicTimeWithHaste(spellproto, m_modifier.periodictime, eff); | |
+ uint32 newperiodictime = modOwner->CalculateAuraPeriodicTimeWithHaste(spellproto, m_modifier.periodictime); | |
if (newperiodictime != m_modifier.periodictime) | |
m_modifier.periodictime = newperiodictime; | |
} | |
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp | |
index 8d2e26f..ad17048 100644 | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -12333,7 +12333,7 @@ void Unit::SetVehicleId(uint32 entry) | |
} | |
} | |
-uint32 Unit::CalculateAuraPeriodicTimeWithHaste(SpellEntry const* spellProto, uint32 oldPeriodicTime, SpellEffectIndex eff_idx) | |
+uint32 Unit::CalculateAuraPeriodicTimeWithHaste(SpellEntry const* spellProto, uint32 oldPeriodicTime) | |
{ | |
if (!spellProto || oldPeriodicTime == 0) | |
return 0; | |
@@ -12356,14 +12356,9 @@ uint32 Unit::CalculateAuraPeriodicTimeWithHaste(SpellEntry const* spellProto, ui | |
if (!applyHaste) | |
return oldPeriodicTime; | |
- uint32 _periodicTime = oldPeriodicTime; | |
+ oldPeriodicTime = ceil(float(oldPeriodicTime) * GetFloatValue(UNIT_MOD_CAST_SPEED)); | |
- if(IsChanneledSpell(spellProto) && spellProto->EffectAmplitude[eff_idx]) | |
- _periodicTime = ceil(float(spellProto->EffectAmplitude[eff_idx]) * GetFloatValue(UNIT_MOD_CAST_SPEED)); | |
- else | |
- _periodicTime = ceil(float(oldPeriodicTime) * GetFloatValue(UNIT_MOD_CAST_SPEED)); | |
- | |
- return _periodicTime; | |
+ return oldPeriodicTime; | |
} | |
uint32 Unit::CalculateSpellDurationWithHaste(SpellEntry const* spellProto, uint32 oldduration) | |
diff --git a/src/game/Unit.h b/src/game/Unit.h | |
index 929b136..6b9e84a 100644 | |
--- a/src/game/Unit.h | |
+++ b/src/game/Unit.h | |
@@ -1964,7 +1964,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject | |
uint32 CalcNotIgnoreAbsorbDamage( uint32 damage, SpellSchoolMask damageSchoolMask, SpellEntry const* spellInfo = NULL); | |
uint32 CalcNotIgnoreDamageRedunction( uint32 damage, SpellSchoolMask damageSchoolMask); | |
int32 CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMask, int32 duration, Unit const* caster); | |
- uint32 CalculateAuraPeriodicTimeWithHaste(SpellEntry const* spellProto, uint32 periodicTime, SpellEffectIndex eff_idx); | |
+ uint32 CalculateAuraPeriodicTimeWithHaste(SpellEntry const* spellProto, uint32 periodicTime); | |
uint32 CalculateSpellDurationWithHaste(SpellEntry const* spellProto, uint32 duration); | |
float CalculateLevelPenalty(SpellEntry const* spellProto) const; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
зачем тогда вычисления и проверки)