mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9140] Let aura after seal do at least one finish tick for stealer.
* Set periodic to fit new aura max duration range for this * This also prevent crash for soem auras at steal.
This commit is contained in:
parent
22a60b9018
commit
7db0ab735b
2 changed files with 9 additions and 4 deletions
|
|
@ -4050,9 +4050,14 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
|
|||
// set its duration and maximum duration
|
||||
// max duration 2 minutes (in msecs)
|
||||
int32 dur = aur->GetAuraDuration();
|
||||
const int32 max_dur = 2*MINUTE*IN_MILISECONDS;
|
||||
new_aur->SetAuraMaxDuration( max_dur > dur ? dur : max_dur );
|
||||
new_aur->SetAuraDuration( max_dur > dur ? dur : max_dur );
|
||||
int32 max_dur = 2*MINUTE*IN_MILISECONDS;
|
||||
int32 new_max_dur = max_dur > dur ? dur : max_dur;
|
||||
new_aur->SetAuraMaxDuration( new_max_dur );
|
||||
new_aur->SetAuraDuration( new_max_dur );
|
||||
|
||||
// set periodic to do at least one tick (for case when original aura has been at last tick preparing)
|
||||
int32 periodic = aur->GetModifier()->periodictime;
|
||||
new_aur->GetModifier()->periodictime = periodic < new_max_dur ? periodic : new_max_dur;
|
||||
|
||||
// Unregister _before_ adding to stealer
|
||||
aur->UnregisterSingleCastAura();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue