Skip to content

Commit

Permalink
Don't save charm, possess and sight auras to db.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed May 20, 2024
1 parent e3cb599 commit 1ba3b85
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/game/Objects/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17064,6 +17064,17 @@ bool Player::SaveAura(SpellAuraHolder const* holder, AuraSaveStruct& saveStruct)

for (uint8 i = 0; i < MAX_EFFECT_INDEX; ++i)
{
// don't save some types of auras
switch (holder->GetSpellProto()->EffectApplyAuraName[i])
{
case SPELL_AURA_BIND_SIGHT:
case SPELL_AURA_MOD_POSSESS:
case SPELL_AURA_MOD_CHARM:
case SPELL_AURA_FAR_SIGHT:
case SPELL_AURA_AOE_CHARM:
return false;
}

saveStruct.damage[i] = 0;
saveStruct.periodicTime[i] = 0;

Expand Down Expand Up @@ -17091,8 +17102,10 @@ bool Player::SaveAura(SpellAuraHolder const* holder, AuraSaveStruct& saveStruct)
saveStruct.maxDuration = holder->GetAuraMaxDuration();
for (uint8 i = 0; i < MAX_EFFECT_INDEX; ++i)
saveStruct.charges = holder->GetAuraCharges();

return true;
}

return false;
}

Expand Down

0 comments on commit 1ba3b85

Please sign in to comment.