fix(Scripts/Hunter): Bestial Wrath shoul not be castable on dead pets. (#9896)

Bestial Wrath should expire while pet is offline.
This commit is contained in:
UltraNix
2022-01-24 03:45:24 +01:00
committed by GitHub
parent 58507e2fe8
commit 2f8318fd58
4 changed files with 49 additions and 1 deletions

View File

@@ -1601,10 +1601,12 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
continue;
// negative effects should continue counting down after logout
if (remaintime != -1 && !spellInfo->IsPositive())
if (remaintime != -1 && (!spellInfo->IsPositive() || spellInfo->HasAttribute(SPELL_ATTR4_AURA_EXPIRES_OFFLINE)))
{
if (remaintime / IN_MILLISECONDS <= int32(timediff))
{
continue;
}
remaintime -= timediff * IN_MILLISECONDS;
}