From 7921e2fd6bb6e398c25dc171f9d99dc5048336f3 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 5 Jan 2009 19:48:02 +0100 Subject: [PATCH] *Implemented faction acces for special zones --HG-- branch : trunk --- sql/updates/783_world.sql | 4 ++++ src/game/Language.h | 2 ++ src/game/Player.cpp | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 sql/updates/783_world.sql diff --git a/sql/updates/783_world.sql b/sql/updates/783_world.sql new file mode 100644 index 0000000000..24a8481e24 --- /dev/null +++ b/sql/updates/783_world.sql @@ -0,0 +1,4 @@ +DELETE FROM trinity_string where entry IN (10056, 10057); +INSERT INTO trinity_string (entry, content_default) VALUES +(10056, 'You must be a member of the Horde to enter the Hall of Legends.'), +(10057, 'You must be a member of the Alliance to enter the Champion\'s Hall.'); \ No newline at end of file diff --git a/src/game/Language.h b/src/game/Language.h index 490435bbb9..3875ac092c 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -858,6 +858,8 @@ enum TrinityStrings LANG_OPVP_EP_FLIGHT_CGT = 10053, LANG_OPVP_ZM_GOSSIP_ALLIANCE = 10054, LANG_OPVP_ZM_GOSSIP_HORDE = 10055, + LANG_NO_ENTER_HALL_OF_LEGENDS = 10056, + LANG_NO_ENTER_CHAMPIONS_HALL = 10057, // Use for custom patches 11000-11999 diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 7096118f02..81ebb45a92 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1575,6 +1575,19 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati if(!InBattleGround() && mEntry->IsBattleGroundOrArena()) return false; + // 449 - Champions' Hall (Alliance) // 450 - Hall of Legends (Horde) + if(mapid == 449 && GetTeam()==HORDE) + { + GetSession()->SendNotification(LANG_NO_ENTER_CHAMPIONS_HALL); + return false; + } + + if(mapid == 450 && GetTeam() == ALLIANCE) + { + GetSession()->SendNotification(LANG_NO_ENTER_HALL_OF_LEGENDS); + return false; + } + // client without expansion support if(GetSession()->Expansion() < mEntry->Expansion()) {