diff options
author | megamage <none@none> | 2009-01-03 21:02:04 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-03 21:02:04 -0600 |
commit | 1172114a3ee4c78b07e756bfe224295c21f3d456 (patch) | |
tree | 6d57f1248c45933dcba1072ee272bb1602709ae6 /src | |
parent | 7422c2b9f6fa35f500ee1b249c64897829fd9e47 (diff) |
*Trigger dimnishing return when player is killed rather than when player releases spirit.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 15 |
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); |