aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-05-26 11:34:37 +0200
committerclick <none@none>2010-05-26 11:34:37 +0200
commit7a13839178847c682666e507651c49939681365a (patch)
tree73692e329ac38a71e29d2d6ef580f9bc796e6ce9 /src/game/GameObject.cpp
parente4c03aa55ab1934c89786c271e31317f7bc75687 (diff)
Add support for random battlegrounds - port by n0n4me, original code by Vladimir and Griffonheart (Big thanks to all of you!)
--HG-- branch : trunk
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index d8d376c0608..3aaac5afe31 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -865,7 +865,7 @@ bool GameObject::ActivateToQuest(Player *pTarget) const
//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())))
+ if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattleGroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(),pTarget->GetTeam())))
return false;
return true;
}
@@ -1441,15 +1441,15 @@ void GameObject::Use(Unit* user)
{
case 179785: // Silverwing Flag
// check if it's correct bg
- if (bg->GetTypeID() == BATTLEGROUND_WS)
+ if (bg->GetTypeID(true) == BATTLEGROUND_WS)
bg->EventPlayerClickedOnFlag(player, this);
break;
case 179786: // Warsong Flag
- if (bg->GetTypeID() == BATTLEGROUND_WS)
+ if (bg->GetTypeID(true) == BATTLEGROUND_WS)
bg->EventPlayerClickedOnFlag(player, this);
break;
case 184142: // Netherstorm Flag
- if (bg->GetTypeID() == BATTLEGROUND_EY)
+ if (bg->GetTypeID(true) == BATTLEGROUND_EY)
bg->EventPlayerClickedOnFlag(player, this);
break;
}