mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/DataStores: Use ResSicknessSpellID from ChrRaces instead of hardcoding it (#24504)
(cherry picked from commit f1ad04b31b)
This commit is contained in:
@@ -4375,18 +4375,19 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
//for each level they are above 10.
|
||||
//Characters level 20 and up suffer from ten minutes of sickness.
|
||||
int32 startLevel = sWorld->getIntConfig(CONFIG_DEATH_SICKNESS_LEVEL);
|
||||
ChrRacesEntry const* raceEntry = sChrRacesStore.AssertEntry(GetRace());
|
||||
|
||||
if (int32(GetLevel()) >= startLevel)
|
||||
{
|
||||
// set resurrection sickness
|
||||
CastSpell(this, 15007, true);
|
||||
CastSpell(this, raceEntry->ResSicknessSpellID, true);
|
||||
|
||||
// not full duration
|
||||
if (int32(GetLevel()) < startLevel+9)
|
||||
{
|
||||
int32 delta = (int32(GetLevel()) - startLevel + 1)*MINUTE;
|
||||
|
||||
if (Aura* aur = GetAura(15007, GetGUID()))
|
||||
if (Aura* aur = GetAura(raceEntry->ResSicknessSpellID, GetGUID()))
|
||||
{
|
||||
aur->SetDuration(delta*IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user