aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 4ae14a2e4a3..36d261827e3 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -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);