*Trigger dimnishing return when player is killed rather than when player releases spirit.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-03 21:02:04 -06:00
parent 7422c2b9f6
commit 1172114a3e
+10 -5
View File
@@ -3798,7 +3798,7 @@ void Player::BuildPlayerRepop()
// BG - remove insignia related
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
SendCorpseReclaimDelay();
// SendCorpseReclaimDelay();
// to prevent cheating
corpse->ResetGhostTime();
@@ -3906,6 +3906,7 @@ void Player::KillPlayer()
m_deathTimer = 6*MINUTE*1000;
UpdateCorpseReclaimDelay(); // dependent at use SetDeathPvP() call before kill
SendCorpseReclaimDelay();
// don't create corpse at this moment, player might be falling
@@ -18820,17 +18821,21 @@ void Player::UpdateCorpseReclaimDelay()
void Player::SendCorpseReclaimDelay(bool load)
{
Corpse* corpse = GetCorpse();
if(!corpse)
if(load && !corpse)
return;
bool pvp;
if(corpse)
pvp = (corpse->GetType() == CORPSE_RESURRECTABLE_PVP);
else
pvp = (m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH);
uint32 delay;
if(load)
{
if(corpse->GetGhostTime() > m_deathExpireTime)
return;
bool pvp = corpse->GetType()==CORPSE_RESURRECTABLE_PVP;
uint32 count;
if( pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP) ||
!pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE) )
@@ -18851,7 +18856,7 @@ void Player::SendCorpseReclaimDelay(bool load)
delay = expected_time-now;
}
else
delay = GetCorpseReclaimDelay(corpse->GetType()==CORPSE_RESURRECTABLE_PVP);
delay = GetCorpseReclaimDelay(pvp);
//! corpse reclaim delay 30 * 1000ms or longer at often deaths
WorldPacket data(SMSG_CORPSE_RECLAIM_DELAY, 4);