diff options
| author | Gildor <gildor55@gmail.com> | 2024-06-27 14:08:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-27 14:08:09 +0200 |
| commit | e4caf52e5a3820399d7ddd5ea3963c36d1d71e28 (patch) | |
| tree | 2ec7c1952611c1869df6346634196d1ee9801feb | |
| parent | 8824889f53a9d11d5b943f844900e41456edddec (diff) | |
Core/Spells: Allow using SpellDifficulty.dbc on battleground maps (#30055)
| -rw-r--r-- | sql/updates/world/3.3.5/9999_99_99_99_world.sql | 5 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp | 15 |
3 files changed, 15 insertions, 7 deletions
diff --git a/sql/updates/world/3.3.5/9999_99_99_99_world.sql b/sql/updates/world/3.3.5/9999_99_99_99_world.sql new file mode 100644 index 00000000000..712e9a98f78 --- /dev/null +++ b/sql/updates/world/3.3.5/9999_99_99_99_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_ioc_seaforium_blast_credit' AND `spell_id` IN (67813,67814); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(67813, 'spell_ioc_seaforium_blast_credit'), +(67814, 'spell_ioc_seaforium_blast_credit'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 66f690903d4..a789836277e 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -177,7 +177,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, WorldObject const* cast if (!GetSpellInfo(spellId)) return spellId; - if (!caster || !caster->GetMap() || !caster->GetMap()->IsDungeon()) + if (!caster || !caster->GetMap() || (!caster->GetMap()->IsDungeon() && !caster->GetMap()->IsBattleground())) return spellId; uint32 mode = uint32(caster->GetMap()->GetSpawnMode()); diff --git a/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp b/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp index dca25b593ae..29ec0598bdd 100644 --- a/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp @@ -215,10 +215,12 @@ class spell_ioc_launch : public SpellScript enum SeaforiumBombSpells { - SPELL_SEAFORIUM_BLAST = 66676, - SPELL_HUGE_SEAFORIUM_BLAST = 66672, - SPELL_A_BOMB_INABLE_CREDIT = 68366, - SPELL_A_BOMB_INATION_CREDIT = 68367 + SPELL_SEAFORIUM_BLAST = 66676, + SPELL_SEAFORIUM_BLAST_H = 67814, + SPELL_HUGE_SEAFORIUM_BLAST = 66672, + SPELL_HUGE_SEAFORIUM_BLAST_H = 67813, + SPELL_A_BOMB_INABLE_CREDIT = 68366, + SPELL_A_BOMB_INATION_CREDIT = 68367 }; // 66672 - Huge Seaforium Blast @@ -239,9 +241,10 @@ class spell_ioc_seaforium_blast_credit : public SpellScript if (!caster) return; - if (GetSpellInfo()->Id == SPELL_SEAFORIUM_BLAST) + uint32 spellId = GetSpellInfo()->Id; + if (spellId == SPELL_SEAFORIUM_BLAST || spellId == SPELL_SEAFORIUM_BLAST_H) _creditSpell = SPELL_A_BOMB_INABLE_CREDIT; - else if (GetSpellInfo()->Id == SPELL_HUGE_SEAFORIUM_BLAST) + else if (spellId == SPELL_HUGE_SEAFORIUM_BLAST || spellId == SPELL_HUGE_SEAFORIUM_BLAST_H) _creditSpell = SPELL_A_BOMB_INATION_CREDIT; if (GetHitGObj() && GetHitGObj()->IsDestructibleBuilding()) |
