mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7597] Fixed crash at stealing single target auras (54648 for example)
This commit is contained in:
parent
4d42cd9e1a
commit
1ec8e1f24d
5 changed files with 46 additions and 27 deletions
|
|
@ -14391,15 +14391,17 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||
else
|
||||
remaincharges = 0;
|
||||
|
||||
//do not load single target auras (unless they were cast by the player)
|
||||
if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto))
|
||||
continue;
|
||||
|
||||
for(uint32 i=0; i<stackcount; i++)
|
||||
{
|
||||
Aura* aura = CreateAura(spellproto, effindex, NULL, this, NULL);
|
||||
if(!damage)
|
||||
damage = aura->GetModifier()->m_amount;
|
||||
|
||||
// reset stolen single target auras
|
||||
if (caster_guid != GetGUID() && aura->IsSingleTarget())
|
||||
aura->SetIsSingleTarget(false);
|
||||
|
||||
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
|
||||
AddAura(aura);
|
||||
sLog.outDetail("Added aura spellid %u, effect %u", spellproto->Id, effindex);
|
||||
|
|
@ -15449,7 +15451,7 @@ void Player::_SaveAuras()
|
|||
if (!(itr2->second->IsPassive() || itr2->second->IsRemovedOnShapeLost()))
|
||||
{
|
||||
//do not save single target auras (unless they were cast by the player)
|
||||
if (!(itr2->second->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(spellInfo)))
|
||||
if (!(itr2->second->GetCasterGUID() != GetGUID() && itr2->second->IsSingleTarget()))
|
||||
{
|
||||
uint8 i;
|
||||
// or apply at cast SPELL_AURA_MOD_SHAPESHIFT or SPELL_AURA_MOD_STEALTH auras
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue