diff options
-rw-r--r-- | sql/updates/9599_world_vehicle_accessory.sql (renamed from sql/updates/9599_vehicle_accessory.sql) | 0 | ||||
-rw-r--r-- | sql/updates/9600_world_script_texts.sql | 12 | ||||
-rw-r--r-- | src/server/game/Spells/SpellScript.h | 12 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp | 6 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp | 2 |
5 files changed, 19 insertions, 13 deletions
diff --git a/sql/updates/9599_vehicle_accessory.sql b/sql/updates/9599_world_vehicle_accessory.sql index 4eb84f71290..4eb84f71290 100644 --- a/sql/updates/9599_vehicle_accessory.sql +++ b/sql/updates/9599_world_vehicle_accessory.sql diff --git a/sql/updates/9600_world_script_texts.sql b/sql/updates/9600_world_script_texts.sql index 2233b74de39..c361533a44c 100644 --- a/sql/updates/9600_world_script_texts.sql +++ b/sql/updates/9600_world_script_texts.sql @@ -1,6 +1,6 @@ -DELETE FROM script_texts WHERE entry BETWEEN -1000578 AND -1000575; -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(19589,-1000575,'All systems on-line. Prepare yourself, we leave shortly.',0,0,0,0,'max_a_million SAY_START'), -(19589,-1000576,'Be careful in there and come back in one piece!',0,0,0,0,'bot-specialist_alley SAY_ALLEY_FAREWELL'), -(19589,-1000577,'Proceed.',0,0,0,0,'max_a_million SAY_CONTINUE'), -(19589,-1000578,'You are back! Were you able to get all of the machines?',0,0,0,0,'bot-specialist_alley SAY_ALLEY_FINISH'); +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000578 AND -1000575; +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +(19589,-1000575, 'All systems on-line. Prepare yourself, we leave shortly.',0,0,0,0, 'max_a_million SAY_START'), +(19589,-1000576, 'Be careful in there and come back in one piece!',0,0,0,0, 'bot-specialist_alley SAY_ALLEY_FAREWELL'), +(19589,-1000577, 'Proceed.',0,0,0,0, 'max_a_million SAY_CONTINUE'), +(19589,-1000578, 'You are back! Were you able to get all of the machines?',0,0,0,0, 'bot-specialist_alley SAY_ALLEY_FINISH'); diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 7a030614469..dea3ebbfc8d 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -280,11 +280,17 @@ class AuraScript : public _SpellScript public: bool _Validate(SpellEntry const * entry, const char * scriptname); bool _Load(Aura * aura); - void _ResetDefault() { m_defaultPreventedEffectsMask = 0; } - bool _IsDefaultActionPrevented(SpellEffIndex effIndex) { return m_defaultPreventedEffectsMask & (1 << effIndex); } - void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; } + void _ResetDefault() { m_defaultPreventedActionsMask = 0; } + bool _IsDefaultActionPrevented(SpellEffIndex effIndex) + { + uint8 effIndexMask = 1 << effIndex; + return (m_defaultPreventedActionsMask & effIndexMask) || (m_defaultPreventedEffectsMask & effIndexMask); + } + void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedActionsMask |= 1 << effIndex; } + void PreventDefaultEffect(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; } private: Aura * m_aura; + uint8 m_defaultPreventedActionsMask; uint8 m_defaultPreventedEffectsMask; public: // diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 1bb5c3b2587..f8d297b9c71 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -954,7 +954,7 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader void Register() { - PreventDefaultAction(EFFECT_1); + PreventDefaultEffect(EFFECT_1); OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY); } @@ -1040,13 +1040,13 @@ class spell_deathbringer_rune_of_blood : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { + PreventHitDefaultEffect(EFFECT_1); // make this the default handler if (GetCaster()->GetPower(POWER_ENERGY) != GetCaster()->GetMaxPower(POWER_ENERGY)) GetHitUnit()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, 1, GetCaster(), true); } void Register() { - PreventHitDefaultEffect(EFFECT_1); // make this the default handler OnEffect += SpellEffectFn(spell_deathbringer_rune_of_blood_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -1073,13 +1073,13 @@ class spell_deathbringer_blood_nova : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { + PreventHitDefaultEffect(EFFECT_1); // make this the default handler if (GetCaster()->GetPower(POWER_ENERGY) != GetCaster()->GetMaxPower(POWER_ENERGY)) GetHitUnit()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, 2, GetCaster(), true); } void Register() { - PreventHitDefaultEffect(EFFECT_1); // make this the default handler OnEffect += SpellEffectFn(spell_deathbringer_blood_nova_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 130cfe4f026..7c55d3ec977 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -757,7 +757,6 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader { void HandlePeriodicTick(AuraEffect const * aurEff, AuraApplication const * aurApp) { - PreventDefaultAction(EFFECT_0); Unit* caster = GetCaster(); int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth(); caster->ModifyHealth(missingHealth); @@ -766,6 +765,7 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader void Register() { + PreventDefaultEffect(EFFECT_0); OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathwhisper_mana_barrier_AuraScript::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); } }; |