aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/2013_world.sql8
-rw-r--r--sql/updates/2685_world_spell_proc_event.sql5
-rw-r--r--sql/updates/2774_world_spell_proc_event.sql12
-rw-r--r--src/game/Spell.cpp13
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/SpellMgr.cpp5
-rw-r--r--src/game/Unit.cpp3
7 files changed, 25 insertions, 23 deletions
diff --git a/sql/updates/2013_world.sql b/sql/updates/2013_world.sql
index ac1179bd2c5..ae697a245e3 100644
--- a/sql/updates/2013_world.sql
+++ b/sql/updates/2013_world.sql
@@ -2,10 +2,4 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 58426, 31221, 31222, 31223);
INSERT INTO `spell_proc_event` VALUES
(44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0002000, 0.000000, 0.000000, 0),
-(54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0002000, 0.000000, 0.000000, 0),
--- Overkill
-(58426, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
--- Master of subtlety
-(31221, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
-(31222, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
-(31223, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0); \ No newline at end of file
+(54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0002000, 0.000000, 0.000000, 0), \ No newline at end of file
diff --git a/sql/updates/2685_world_spell_proc_event.sql b/sql/updates/2685_world_spell_proc_event.sql
deleted file mode 100644
index 9c4ea8c1d43..00000000000
--- a/sql/updates/2685_world_spell_proc_event.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-DELETE FROM `spell_proc_event` WHERE `entry` IN (56337, 56336, 56333);
-INSERT INTO `spell_proc_event` VALUES
-(56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00022200, 0x0000000, 0.000000, 0.000000, 0),
-(56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00022200, 0x0000000, 0.000000, 0.000000, 0),
-(56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00022200, 0x0000000, 0.000000, 0.000000, 0); \ No newline at end of file
diff --git a/sql/updates/2774_world_spell_proc_event.sql b/sql/updates/2774_world_spell_proc_event.sql
new file mode 100644
index 00000000000..343d908a568
--- /dev/null
+++ b/sql/updates/2774_world_spell_proc_event.sql
@@ -0,0 +1,12 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (56337, 56336, 56333, 58426, 31221, 31222, 31223);
+INSERT INTO `spell_proc_event` VALUES
+(56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x0000000, 0.000000, 0.000000, 0),
+(56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x0000000, 0.000000, 0.000000, 0),
+(56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x0000000, 0.000000, 0.000000, 0);
+
+-- Overkill
+(58426, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0006001, 0.000000, 0.000000, 0),
+-- Master of subtlety
+(31221, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0006001, 0.000000, 0.000000, 0),
+(31222, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0006001, 0.000000, 0.000000, 0),
+(31223, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0006001, 0.000000, 0.000000, 0);
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);