diff options
| -rw-r--r-- | sql/FULL/world_spell_full.sql | 7 | ||||
| -rw-r--r-- | sql/updates/4610_world.sql | 4 | ||||
| -rw-r--r-- | src/game/Object.h | 11 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index c2cbc55293a..85d602ca07f 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -32,7 +32,8 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm (-27068, 27069, 0, 'Wyvern Sting'), (-49011, 49009, 0, 'Wyvern Sting'), (-49012, 49010, 0, 'Wyvern Sting'), -( 47585, 60069, 0, 'Dispersion (transform/regen)'), +( 47585, 60069, 2, 'Dispersion (transform/regen)'), +( 47585, 63230, 2, 'Dispersion (immunity)'), ( 61847, 61848, 2, 'Aspect of te dragonhawk'), ( 61846, 61848, 2, 'Aspect of te dragonhawk'), ( 47988, 54501, 2, 'Consume Shadows - Rank 9'), @@ -1645,6 +1646,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus` (25742, 0.07, -1, 0.039, -1, 'Paladin - Seal of Righteousness Dummy Proc'), (53719, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Enemy'), (53718, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Self'), +(62124, 0.085, -1, -1, -1, 'Paladin - Hand of Reckoning'), (50256, -1, -1, 0.08, -1, 'Pet Skills - Bear (Swipe)'), (32546, 0.8068, -1, -1, -1, 'Priest - Binding Heal'), (27813, 0, 0, 0, 0, 'Priest - Blessed Recovery Rank 1'), @@ -1797,7 +1799,8 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus` (20253, -1, -1, 0.12, -1, 'Warrior - Intercept'), (61491, -1, -1, 0.12, -1, 'Warrior - Intercept'), (6572, -1, -1, 0.207, -1, 'Warrior - Revenge'), -(6343, -1, -1, 0.12, -1, 'Warrior - Thunder Clap'); +(6343, -1, -1, 0.12, -1, 'Warrior - Thunder Clap'), +(64382, -1, -1, 0.5, -1, 'Warrior - Shattering Throw'); -- -------- -- SPELL ELIXIR diff --git a/sql/updates/4610_world.sql b/sql/updates/4610_world.sql new file mode 100644 index 00000000000..ba05803139d --- /dev/null +++ b/sql/updates/4610_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_bonus_data` where `entry` IN(62124, 64382); +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +(62124, 0.085, -1, -1, -1, 'Paladin - Hand of Reckoning'), +(64382, -1, -1, 0.5, -1, 'Warrior - Shattering Throw'); diff --git a/src/game/Object.h b/src/game/Object.h index b7e5a6efa3e..3004601cd50 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -560,11 +560,12 @@ class TRINITY_DLL_SPEC WorldObject : public Object bool IsTempWorldObject; #ifdef MAP_BASED_RAND_GEN - int32 irand(int32 min, int32 max) const { return int32 (GetMap()->mtRand.randInt(max - min)) + min; } - uint32 urand(uint32 min, uint32 max) const { return GetMap()->mtRand.randInt(max - min) + min; } - int32 rand32() const { return GetMap()->mtRand.randInt(); } - double rand_norm() const { return GetMap()->mtRand.randExc(); } - double rand_chance() const { return GetMap()->mtRand.randExc(100.0); } + // Object may not have map assigned - use global scope rand in that case + int32 irand(int32 min, int32 max) const { return FindMap() ? int32 (GetMap()->mtRand.randInt(max - min)) + min : ::irand(min, max); } + uint32 urand(uint32 min, uint32 max) const { return FindMap() ? GetMap()->mtRand.randInt(max - min) + min : ::urand(min, max); } + int32 rand32() const { return FindMap() ? GetMap()->mtRand.randInt(): ::rand32(); } + double rand_norm() const { return FindMap() ? GetMap()->mtRand.randExc(): ::rand_norm(); } + double rand_chance() const { return FindMap() ? GetMap()->mtRand.randExc(100.0): ::rand_chance(); } #endif protected: diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 8f47a8252d4..dfa2687c72d 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4341,7 +4341,7 @@ SpellCastResult Spell::CheckCast(bool strict) if(m_spellInfo->excludeTargetAuraSpell && target->HasAura(m_spellInfo->excludeTargetAuraSpell)) return SPELL_FAILED_TARGET_AURASTATE; - if(target == m_caster && m_spellInfo->AttributesEx & SPELL_ATTR_EX_CANT_TARGET_SELF) + if(!m_IsTriggeredSpell && target == m_caster && m_spellInfo->AttributesEx & SPELL_ATTR_EX_CANT_TARGET_SELF) return SPELL_FAILED_BAD_TARGETS; if(target != m_caster) |
