diff options
author | megamage <none@none> | 2008-11-21 19:45:49 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-21 19:45:49 -0600 |
commit | fa667cf4507e5635d597b878119ce20f2836cc8c (patch) | |
tree | 34a1b3a70db2d8ba86be680bb341f1e499b0d672 /src/game/GameObject.cpp | |
parent | b2ba78e57a7c1895d1bacf950a3705eedd01c256 (diff) |
*Alterac Valley. By Bogie and Balrok. Note: some core contents are modified. Will fix them later. Some sql are disabled because of possible conflict with offical DB. Use them at your own risk.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r-- | src/game/GameObject.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index f6f89f482e5..3a11bf95c35 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -37,8 +37,9 @@ #include "CellImpl.h" #include "InstanceData.h" #include "BattleGround.h" -#include "OutdoorPvPMgr.h" #include "Util.h" +#include "OutdoorPvPMgr.h" +#include "BattleGroundAV.h" GameObject::GameObject() : WorldObject() { @@ -754,7 +755,15 @@ bool GameObject::ActivateToQuest( Player *pTarget)const case GAMEOBJECT_TYPE_CHEST: { if(LootTemplates_Gameobject.HaveQuestLootForPlayer(GetLootId(), pTarget)) + { + //TODO: fix this hack + //look for battlegroundAV for some objects which are only activated after mine gots captured by own team + if(GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S) + if(BattleGround *bg = pTarget->GetBattleGround()) + if(bg->GetTypeID() == BATTLEGROUND_AV && !(((BattleGroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(),pTarget->GetTeam()))) + return false; return true; + } break; } case GAMEOBJECT_TYPE_GOOBER: |