Merge commit 'origin/master' into 310

This commit is contained in:
VladimirMangos 2009-03-27 03:22:41 +03:00
commit bb9e2ab658
46 changed files with 410 additions and 386 deletions

View file

@ -343,8 +343,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_DailyQuestChanged = false;
m_lastDailyQuestTime = 0;
m_regenTimer = 0;
m_weaponChangeTimer = 0;
for (int i=0; i<MAX_TIMERS; i++)
m_MirrorTimer[i] = DISABLED_MIRROR_TIMER;
@ -1098,8 +1096,6 @@ void Player::Update( uint32 p_time )
UpdateAfkReport(now);
CheckExploreSystem();
// Update items that have just a limited lifetime
if (now>m_Last_tick)
UpdateItemDuration(uint32(now- m_Last_tick));
@ -17454,13 +17450,14 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
{
if(BattleGround *bg = GetBattleGround())
{
bool need_debuf = bg->isBattleGround() && (bg->GetStatus() == STATUS_IN_PROGRESS) && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER);
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
// call after remove to be sure that player resurrected for correct cast
if(need_debuf)
CastSpell(this, 26013, true); // Deserter
if( bg->isBattleGround() && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER) )
{
if( bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN )
CastSpell(this, 26013, true); // Deserter
}
}
}