diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Spell.cpp | 13 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
| -rw-r--r-- | src/game/SpellMgr.cpp | 5 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 3 |
4 files changed, 12 insertions, 11 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index abd97af18b0..b7f67f63501 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5631,12 +5631,15 @@ void Spell::CalculateDamageDoneForAllTargets() } } - bool usesAmmo=true; - Unit::AuraEffectList const& Auras = m_caster->GetAurasByType(SPELL_AURA_ABILITY_CONSUME_NO_AMMO); - for(Unit::AuraEffectList::const_iterator j = Auras.begin();j != Auras.end(); ++j) + bool usesAmmo = !m_IsTriggeredSpell; + if (usesAmmo) { - if((*j)->isAffectedOnSpell(m_spellInfo)) - usesAmmo=false; + Unit::AuraEffectList const& Auras = m_caster->GetAurasByType(SPELL_AURA_ABILITY_CONSUME_NO_AMMO); + for(Unit::AuraEffectList::const_iterator j = Auras.begin();j != Auras.end(); ++j) + { + if((*j)->isAffectedOnSpell(m_spellInfo)) + usesAmmo=false; + } } for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d321d2d6e31..c08e1bea198 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4937,7 +4937,7 @@ void Spell::EffectScriptEffect(uint32 effIndex) // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. if (familyFlag[1] & 0x00000080) { - int32 tickCount = (aura->GetAuraMaxDuration() - aura->GetAuraDuration()) / aura->GetPartAura(0)->GetAuraAmplitude(); + int32 tickCount = aura->GetPartAura(0)->GetTickNumber(); spellId = 53358; // 53358 Chimera Shot - Viper // Amount of one aura tick basePoint = aura->GetPartAura(0)->GetAmount() * aura->GetTarget()->GetMaxPower(POWER_MANA) / 100 ; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index af8a04740f8..9b6e785ab52 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2519,9 +2519,8 @@ void SpellMgr::LoadPetLevelupSpellMap() // not exist if(!spell) continue; - if (!spell->spellLevel) - continue; - if (!spell->SpellFamilyName) + // Make sure that triggered spells aren't learned + if (!spell->SpellFamilyName && !spell->StartRecoveryCategory) continue; mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id ))); count++; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6d613333ce3..19d4068eaf3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3957,10 +3957,9 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags[1] & 0x0100)) { int32 damage = aur->GetPartAura(0)->GetAmount()*9; - uint64 caster_guid = aur->GetCasterGUID(); RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL); // backfire damage and silence - dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,caster_guid); + dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,dispeler->GetGUID()); return; } RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL); |
