aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2016_09_01_01_world.sql13
-rw-r--r--sql/updates/world/3.3.5/2016_09_02_00_world.sql2
-rw-r--r--sql/updates/world/3.3.5/2016_09_02_01_world.sql1
-rw-r--r--sql/updates/world/3.3.5/2016_09_02_02_world.sql5
-rw-r--r--sql/updates/world/3.3.5/2016_09_02_03_world.sql (renamed from sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql)0
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp8
-rw-r--r--src/server/game/Entities/Unit/Unit.h4
-rw-r--r--src/server/game/Spells/Spell.cpp8
8 files changed, 34 insertions, 7 deletions
diff --git a/sql/updates/world/3.3.5/2016_09_01_01_world.sql b/sql/updates/world/3.3.5/2016_09_01_01_world.sql
new file mode 100644
index 00000000000..7f361c68f1e
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_09_01_01_world.sql
@@ -0,0 +1,13 @@
+-- Fix Cabal Abjurist SAI even more
+UPDATE `smart_scripts` SET `action_param1`=34446,`action_param2`=0x40,`event_param3`=5500,`event_param4`=6500 WHERE `entryorguid`=21660 AND `source_type`=0 AND `id`=0;
+
+-- Same treatment for Bleeding Hollow Darkcaster
+DELETE FROM `smart_scripts` WHERE `entryorguid`=17269 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`event_type`,`event_chance`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
+(17269,0,0,0,100,300,450,1800,2100,11,15241,0x40,2,"Bleeding Hollow Darkcaster - In Combat - Cast 'Scorch' at Victim"),
+(17269,0,1,0,100,11600,23300,22700,33400,11,20754,0x41,6,"Bleeding Hollow Darkcaster - In Combat - Cast 'Rain of Fire' at Random Hostile");
+
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (15241,20754);
+INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES
+(15241,15241,36807),
+(20754,20754,36808);
diff --git a/sql/updates/world/3.3.5/2016_09_02_00_world.sql b/sql/updates/world/3.3.5/2016_09_02_00_world.sql
new file mode 100644
index 00000000000..32e9f51bbaa
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_09_02_00_world.sql
@@ -0,0 +1,2 @@
+-- Proper spellcast for Coldarra Spellweaver
+UPDATE `smart_scripts` SET `action_param1`=34446, `event_param3`=5250, `event_param4`=5750 WHERE `entryorguid`=25722 AND `source_type`=0 AND `id`=0;
diff --git a/sql/updates/world/3.3.5/2016_09_02_01_world.sql b/sql/updates/world/3.3.5/2016_09_02_01_world.sql
new file mode 100644
index 00000000000..08571cd4ea4
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_09_02_01_world.sql
@@ -0,0 +1 @@
+UPDATE `smart_scripts` SET `action_param1`=52755 WHERE `entryorguid`=28580 AND `source_type`=0 AND `id`=3;
diff --git a/sql/updates/world/3.3.5/2016_09_02_02_world.sql b/sql/updates/world/3.3.5/2016_09_02_02_world.sql
new file mode 100644
index 00000000000..14076c60b5d
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_09_02_02_world.sql
@@ -0,0 +1,5 @@
+DELETE FROM `player_factionchange_spells` WHERE `horde_id` IN (23248,35018,35028);
+INSERT INTO `player_factionchange_spells` (`horde_id`, `alliance_id`) VALUES
+(23248, 17454), -- Great Gray Kodo <-> Unpainted Mechanostrider
+(35018, 49908), -- Purple Hawkstrider <-> Pink Elekk
+(35028, 48027); -- Swift Warstrider <-> Black War Elekk
diff --git a/sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql b/sql/updates/world/3.3.5/2016_09_02_03_world.sql
index 435919c5071..435919c5071 100644
--- a/sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql
+++ b/sql/updates/world/3.3.5/2016_09_02_03_world.sql
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 499237d294d..e9bb3b5b92b 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10102,12 +10102,12 @@ int32 Unit::SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask) const
return TakenAdvertisedBenefit;
}
-bool Unit::IsSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType /*= BASE_ATTACK*/, Spell* spell /*= nullptr*/) const
+bool Unit::IsSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType /*= BASE_ATTACK*/) const
{
- return roll_chance_f(GetUnitSpellCriticalChance(victim, spellProto, schoolMask, attackType, spell));
+ return roll_chance_f(GetUnitSpellCriticalChance(victim, spellProto, schoolMask, attackType));
}
-float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType /*= BASE_ATTACK*/, Spell* spell /*= nullptr*/) const
+float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType /*= BASE_ATTACK*/) const
{
//! Mobs can't crit with spells. Player Totems can
//! Fire Elemental (from totem) can too - but this part is a hack and needs more research
@@ -10301,7 +10301,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
// percent done
// only players use intelligence for critical chance computations
if (Player* modOwner = GetSpellModOwner())
- modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance, spell);
+ modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance);
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
if (spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE && spellProto->DmgClass != SPELL_DAMAGE_CLASS_RANGED)
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index f30ab1d77b1..3f6ea205563 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1998,8 +1998,8 @@ class TC_GAME_API Unit : public WorldObject
bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK);
bool isBlockCritical();
- bool IsSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK, Spell* spell = nullptr) const;
- float GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK, Spell* spell = nullptr) const;
+ bool IsSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const;
+ float GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const;
uint32 SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim);
uint32 SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 02640931965..fe42b517780 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -6938,7 +6938,13 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
}
}
- targetInfo.crit = m_caster->IsSpellCrit(unit, m_spellInfo, m_spellSchoolMask, m_attackType, this);
+ if (Player* modOwner = m_caster->GetSpellModOwner())
+ modOwner->SetSpellModTakingSpell(this, true);
+
+ targetInfo.crit = m_caster->IsSpellCrit(unit, m_spellInfo, m_spellSchoolMask, m_attackType);
+
+ if (Player* modOwner = m_caster->GetSpellModOwner())
+ modOwner->SetSpellModTakingSpell(this, false);
}
SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& skillId, int32& reqSkillValue, int32& skillValue)