aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2024-06-27 14:08:09 +0200
committerGitHub <noreply@github.com>2024-06-27 14:08:09 +0200
commite4caf52e5a3820399d7ddd5ea3963c36d1d71e28 (patch)
tree2ec7c1952611c1869df6346634196d1ee9801feb /src
parent8824889f53a9d11d5b943f844900e41456edddec (diff)
Core/Spells: Allow using SpellDifficulty.dbc on battleground maps (#30055)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp2
-rw-r--r--src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp15
2 files changed, 10 insertions, 7 deletions
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())