From fa667cf4507e5635d597b878119ce20f2836cc8c Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 21 Nov 2008 19:45:49 -0600 Subject: *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 --- src/game/GameObject.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/game/GameObject.cpp') 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: -- cgit v1.2.3