aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorSpp- <spp@jorge.gr>2011-08-30 13:46:36 +0200
committerSpp- <spp@jorge.gr>2011-08-30 13:46:36 +0200
commitaa85553bfd540084802d118ff6ef2062a88ed452 (patch)
tree6f3dc82f53ccafafe7468ef6694751bf7d0b4cc8 /src/server/game/Spells/Spell.cpp
parentfcf58e706280f0b0029908d9dce2e9c744227830 (diff)
Core: Crash fix (TemporarySummon), remove some warnings and some other minor changes
- "const uint64" and "uint64 const" --> uint64 - Add some info in LFGDungeonEntry - Move some definitions from ".h" files and move to ".cpp"
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 65d4fc361dc..f58bd72914d 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -551,8 +551,8 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
m_autoRepeat = m_spellInfo->IsAutoRepeatRangedSpell();
m_runesState = 0;
- m_powerCost = 0; // setup to correct value in Spell::prepare, don't must be used before.
- m_casttime = 0; // setup to correct value in Spell::prepare, don't must be used before.
+ m_powerCost = 0; // setup to correct value in Spell::prepare, must not be used before.
+ m_casttime = 0; // setup to correct value in Spell::prepare, must not be used before.
m_timer = 0; // will set to castime in prepare
m_channelTargetEffectMask = 0;
@@ -1237,18 +1237,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
}
// Do not take combo points on dodge and miss
- if (m_needComboPoints && m_targets.GetUnitTargetGUID() == target->targetGUID)
- if (missInfo != SPELL_MISS_NONE)
- {
- m_needComboPoints = false;
- // Restore spell mods for a miss/dodge/parry Cold Blood
- // TODO: check how broad this rule should be
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- if ((missInfo == SPELL_MISS_MISS) ||
- (missInfo == SPELL_MISS_DODGE) ||
- (missInfo == SPELL_MISS_PARRY))
- m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
- }
+ if (missInfo != SPELL_MISS_NONE && m_needComboPoints &&
+ m_targets.GetUnitTargetGUID() == target->targetGUID)
+ {
+ m_needComboPoints = false;
+ // Restore spell mods for a miss/dodge/parry Cold Blood
+ // TODO: check how broad this rule should be
+ if (m_caster->GetTypeId() == TYPEID_PLAYER && (missInfo == SPELL_MISS_MISS ||
+ missInfo == SPELL_MISS_DODGE || missInfo == SPELL_MISS_PARRY))
+ m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
+ }
// Trigger info was not filled in spell::preparedatafortriggersystem - we do it now
if (canEffectTrigger && !procAttacker && !procVictim)
@@ -1546,8 +1544,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
((UnitAura*)m_spellAura)->SetDiminishGroup(m_diminishGroup);
bool positive = m_spellAura->GetSpellInfo()->IsPositive();
- AuraApplication* aurApp = m_spellAura->GetApplicationOfTarget(m_originalCaster->GetGUID());
- if (aurApp)
+ if (AuraApplication* aurApp = m_spellAura->GetApplicationOfTarget(m_originalCaster->GetGUID()))
positive = aurApp->IsPositive();
duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive);