aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-06-23 11:20:13 +0200
committerShauren <shauren.trinity@gmail.com>2013-06-23 11:20:13 +0200
commit89466f76acd9fc8562f80d5c6df75eac84bfdae2 (patch)
treef3561b36bcf3437fca33776982ca7c3017b046d7
parent78916e2fa43a4659471595e02f725617d7002263 (diff)
Core/Auras: Fixed crashes introduced in 1addad4dbd38d4690c24ad9c07456e06e443c78e
Closes #10081
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index aad567e942f..6fb3ef18462 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -3266,7 +3266,13 @@ void Unit::_AddAura(UnitAura* aura, Unit* caster)
aura->SetIsSingleTarget(caster && (aura->GetSpellInfo()->IsSingleTarget() || aura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE)));
if (aura->IsSingleTarget())
{
- ASSERT((IsInWorld() && !IsDuringRemoveFromWorld()) || (aura->GetCasterGUID() == GetGUID()));
+ ASSERT((IsInWorld() && !IsDuringRemoveFromWorld()) || (aura->GetCasterGUID() == GetGUID()) ||
+ (isBeingLoaded() && aura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE)));
+ /* @HACK: Player is not in world during loading auras.
+ * Single target auras are not saved or loaded from database
+ * but may be created as a result of aura links (player mounts with passengers)
+ */
+
// register single target aura
caster->GetSingleCastAuras().push_back(aura);
// remove other single target auras