aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/4081_world.sql15
-rw-r--r--sql/world.sql7
-rw-r--r--sql/world_spell_full.sql5
-rw-r--r--src/game/StatSystem.cpp2
-rw-r--r--src/game/Unit.cpp6
5 files changed, 33 insertions, 2 deletions
diff --git a/sql/updates/4081_world.sql b/sql/updates/4081_world.sql
new file mode 100644
index 00000000000..4eb5898681a
--- /dev/null
+++ b/sql/updates/4081_world.sql
@@ -0,0 +1,15 @@
+DELETE FROM `spell_pet_auras` WHERE `spell` IN(56314, 56315, 56316, 56317, 56318);
+INSERT INTO `spell_pet_auras` VALUES
+(56314,0,57447),
+(56315,0,57482),
+(56316,0,57453),
+(56317,0,57457),
+(56318,0,57458);
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN(57447, 57482, 57453, 57457, 57458);
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(57447,57485,2,'Kindred Spirits'),
+(57482,57484,2,'Kindred Spirits'),
+(57453,57483,2,'Kindred Spirits'),
+(57457,57482,2,'Kindred Spirits'),
+(57458,57475,2,'Kindred Spirits'); \ No newline at end of file
diff --git a/sql/world.sql b/sql/world.sql
index 9915e83dc2a..5af5d424e8d 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -14318,7 +14318,12 @@ INSERT INTO `spell_pet_auras` VALUES
(23822,17252,35703),
(23823,17252,35704),
(23824,17252,35705),
-(23825,17252,35706);
+(23825,17252,35706),
+(56314,0,57447),
+(56315,0,57482),
+(56316,0,57453),
+(56317,0,57457),
+(56318,0,57458);
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index e0483161553..06188c6b934 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -74,6 +74,11 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
( -52610, -62071, 0, 'Savage Roar'),
(51209, 55095, 1, 'Hungering cold - frost fever'),
(50334, 58923, 2, 'Berserk - modify target number aura'),
+(57447,57485,2,'Kindred Spirits'),
+(57482,57484,2,'Kindred Spirits'),
+(57453,57483,2,'Kindred Spirits'),
+(57457,57482,2,'Kindred Spirits'),
+(57458,57475,2,'Kindred Spirits'),
-- Creature
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 7a0b6f285eb..8287ed2b2bf 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -378,7 +378,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
AuraEffectList const& mAPbyArmor = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR);
for(AuraEffectList::const_iterator iter = mAPbyArmor.begin(); iter != mAPbyArmor.end(); ++iter)
// always: ((*i)->GetModifier()->m_miscvalue == 1 == SPELL_SCHOOL_MASK_NORMAL)
- attPowerMod += int32(GetArmor() / (*iter)->GetMiscValue());
+ attPowerMod += int32(GetArmor() / (*iter)->GetAmount());
}
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 4cef59a9037..e12b7ecd7ca 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13340,6 +13340,12 @@ void Unit::AddPetAura(PetAura const* petSpell)
if(GetTypeId() != TYPEID_PLAYER)
return;
+ // Aura already added - not need to add it twice
+ // This check is to prevent existing pet having aura applied twice (passive auras can stack)
+ // if aura has more than 1 dummy effect
+ if (m_petAuras.find(petSpell)!= m_petAuras.end())
+ return;
+
m_petAuras.insert(petSpell);
if(Pet* pet = ((Player*)this)->GetPet())
pet->CastPetAura(petSpell);