Skip to content

Commit

Permalink
Fix typo in Player.cpp (#29638)
Browse files Browse the repository at this point in the history
copseReclaimDelay -> corpseReclaimDelay

This should not break anything.
  • Loading branch information
Jan125 authored Feb 4, 2024
1 parent b4783d6 commit e7ff4fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ enum CharacterCustomizeFlags
#define DEATH_EXPIRE_STEP (5*MINUTE)
#define MAX_DEATH_COUNT 3

static uint32 copseReclaimDelay[MAX_DEATH_COUNT] = { 30, 60, 120 };
static uint32 corpseReclaimDelay[MAX_DEATH_COUNT] = { 30, 60, 120 };

uint32 const MAX_MONEY_AMOUNT = static_cast<uint32>(std::numeric_limits<int32>::max());

Expand Down Expand Up @@ -24099,7 +24099,7 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
if (pvp)
{
if (!sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP))
return copseReclaimDelay[0];
return corpseReclaimDelay[0];
}
else if (!sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE))
return 0;
Expand All @@ -24108,7 +24108,7 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
// 0..2 full period
// should be ceil(x)-1 but not floor(x)
uint64 count = (now < m_deathExpireTime - 1) ? (m_deathExpireTime - 1 - now) / DEATH_EXPIRE_STEP : 0;
return copseReclaimDelay[count];
return corpseReclaimDelay[count];
}

void Player::UpdateCorpseReclaimDelay()
Expand Down Expand Up @@ -24162,7 +24162,7 @@ int32 Player::CalculateCorpseReclaimDelay(bool load) const
count = MAX_DEATH_COUNT - 1;
}

time_t expected_time = corpse->GetGhostTime() + copseReclaimDelay[count];
time_t expected_time = corpse->GetGhostTime() + corpseReclaimDelay[count];
time_t now = GameTime::GetGameTime();

if (now >= expected_time)
Expand Down

0 comments on commit e7ff4fe

Please sign in to comment.