[9878] Set for client battleground weekend event world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
GriffonHeart 2010-05-12 05:58:17 +04:00 committed by VladimirMangos
parent 2edc375e48
commit c4247ece32
5 changed files with 21 additions and 3 deletions

View file

@ -8369,6 +8369,23 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
break;
}
GetSession()->SendPacket(&data);
SendBGWeekendWorldStates();
}
void Player::SendBGWeekendWorldStates()
{
for(uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i)
{
BattlemasterListEntry const * bl = sBattlemasterListStore.LookupEntry(i);
if (bl && bl->HolidayWorldStateId)
{
if (BattleGroundMgr::IsBGWeekend(BattleGroundTypeId(bl->id)))
SendUpdateWorldState(bl->HolidayWorldStateId,1);
else
SendUpdateWorldState(bl->HolidayWorldStateId,0);
}
}
}
uint32 Player::GetXPRestBonus(uint32 xp)