Core/DataStores: Use ResSicknessSpellID from ChrRaces instead of hardcoding it (#24504)

(cherry picked from commit f1ad04b31b)
This commit is contained in:
HelloKitty
2020-04-27 10:55:25 -05:00
committed by Shauren
parent 567b26e0c7
commit a20526077d

View File

@@ -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);
}