aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-05 22:55:43 -0600
committermegamage <none@none>2009-02-05 22:55:43 -0600
commit944a1cec7315f482ee6de93c0ea18f97dc776042 (patch)
tree2db5f7e133a57232099444d2e76f9d3c9778a2bf /src
parente361e81b6f005ca10abf3538c38e3bb3f76f9bf3 (diff)
[7229] Add area limitation checks for battleground/arena spells.
Spell sorted by 2 list and map ids lists replaced by map type checking in patch. Author: GriffonHeart --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGround.cpp2
-rw-r--r--src/game/SpellMgr.cpp34
-rw-r--r--src/shared/revision_nr.h2
3 files changed, 34 insertions, 4 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 997c2dffb8b..9669f638fc3 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -976,7 +976,7 @@ void BattleGround::AddPlayer(Player *plr)
}
(plr)->RemovePet(NULL,PET_SAVE_NOT_IN_SLOT);
}
- else
+ else
(plr)->SetTemporaryUnsummonedPetNumber(0);
if(GetStatus() == STATUS_WAIT_JOIN) // not started yet
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 0a41444509a..6cef85b7fc5 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2696,11 +2696,41 @@ uint8 GetSpellAllowedInLocationError(SpellEntry const *spellInfo,uint32 map_id,u
case 54055: // Dominion Over Acherus
return area_id == 4281 || area_id == 4342 ? 0 : SPELL_FAILED_INCORRECT_AREA;
case 51852: // The Eye of Acherus
- {
return map_id == 609 ? 0 : SPELL_FAILED_REQUIRES_AREA;
- }
case 54119: // Mist of the Kvaldir
return area_id == 4028 || area_id == 4029 || area_id == 4106 || area_id == 4031 ? 0 : SPELL_FAILED_INCORRECT_AREA;
+ case 23333: // Warsong Flag
+ case 23335: // Silverwing Flag
+ return map_id == 489 ? 0 : SPELL_FAILED_REQUIRES_AREA;
+ case 34976: // Netherstorm Flag
+ return map_id == 566 ? 0 : SPELL_FAILED_REQUIRES_AREA;
+ case 2584: // Waiting to Resurrect
+ case 22011: // Spirit Heal Channel
+ case 22012: // Spirit Heal
+ case 24171: // Resurrection Impact Visual
+ case 42792: // Recently Dropped Flag
+ case 43681: // Inactive
+ case 44521: // Preparation
+ case 44535: // Spirit Heal (mana)
+ {
+ MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
+ if(!mapEntry)
+ return SPELL_FAILED_INCORRECT_AREA;
+
+ return mapEntry->IsBattleGround() ? 0 : SPELL_FAILED_REQUIRES_AREA;
+ }
+ case 32724: // Gold Team (Alliance)
+ case 32725: // Green Team (Alliance)
+ case 32727: // Arena Preparation
+ case 35774: // Gold Team (Horde)
+ case 35775: // Green Team (Horde)
+ {
+ MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
+ if(!mapEntry)
+ return SPELL_FAILED_INCORRECT_AREA;
+
+ return mapEntry->IsBattleArena() ? 0 : SPELL_FAILED_REQUIRES_AREA;
+ }
}
return 0;
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 813eb27444c..aaab6a93b76 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7228"
+ #define REVISION_NR "7229"
#endif // __REVISION_NR_H__