Core/Misc: Implement reinterpret casts for all battleground classes and use them.

This commit is contained in:
Discover- committed 2013-08-06 13:26:52 +02:00
1 parent 5164caa9ff
commit 7f744de746
6 files changed
+61 -11

No files matched your search

@@ -952,7 +952,7 @@ bool GameObject::ActivateToQuest(Player* target) 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 = target->GetBattleground())
if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(), target->GetTeam())))
if (bg->GetTypeID(true) == BATTLEGROUND_AV && !bg->ToBattlegroundAV()->PlayerCanDoMineQuest(GetEntry(), target->GetTeam()))
return false;
return true;
}