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

+7 -1
View File
@@ -8773,13 +8773,19 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
/// @todo fix this big hack
if ((go->GetEntry() == BG_AV_OBJECTID_MINE_N || go->GetEntry() == BG_AV_OBJECTID_MINE_S))
{
if (Battleground* bg = GetBattleground())
{
if (bg->GetTypeID(true) == BATTLEGROUND_AV)
if (!(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(go->GetEntry(), GetTeam())))
{
if (!bg->ToBattlegroundAV()->PlayerCanDoMineQuest(go->GetEntry(), GetTeam()))
{
SendLootRelease(guid);
return;
}
}
}
}
if (lootid)
{