aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2012-08-26 19:38:05 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2012-08-26 19:38:05 +0200
commitfcd48335e8efc194d8c731eaf7fe39d7166dce52 (patch)
tree86b3327b6181407f2f77026a75c12c625b6f4105
parent8b939700e78aed23788b5a66738a58adb7e20d21 (diff)
Core/Spells: Implement Battleground - Dampening for wintergrasp
-rw-r--r--sql/updates/world/2012_08_26_03_world_spell_area.sql3
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp10
2 files changed, 13 insertions, 0 deletions
diff --git a/sql/updates/world/2012_08_26_03_world_spell_area.sql b/sql/updates/world/2012_08_26_03_world_spell_area.sql
new file mode 100644
index 00000000000..65072d2b4a7
--- /dev/null
+++ b/sql/updates/world/2012_08_26_03_world_spell_area.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_area` WHERE spell=74411 AND `area`=4197;
+INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
+(74411,4197,0,0,0,0,0,2,1);
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 2633fd8ea30..b580c5e2282 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1177,6 +1177,16 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return battlefieldWG->IsEnabled() && (player->GetTeamId() == battlefieldWG->GetDefenderTeam()) && !battlefieldWG->IsWarTime();
break;
}
+ case 74411: // Battleground - Dampening
+ {
+ if (!player)
+ return false;
+
+ if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetZoneId()))
+ return bf->IsWarTime();
+ break;
+ }
+
}
return true;