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

This commit is contained in:
Discover-
2013-08-06 13:26:52 +02:00
parent 5164caa9ff
commit 7f744de746
6 changed files with 61 additions and 11 deletions
@@ -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;
}