mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)
This commit is contained in:
@@ -876,7 +876,8 @@ public:
|
||||
despawnTimer = 0;
|
||||
me->UpdatePosition(CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ()+18.0f, 0.0f, true);
|
||||
me->StopMovingOnCurrentPos();
|
||||
me->GetVehicleKit()->RemoveAllPassengers();
|
||||
if (Vehicle* vehicle = me->GetVehicleKit())
|
||||
vehicle->RemoveAllPassengers();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -778,9 +778,12 @@ class spell_oculus_rider_aura : public SpellScriptLoader
|
||||
void HandleOnEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
Creature* drake = caster->GetVehicleCreatureBase();
|
||||
|
||||
if (!drake || !caster)
|
||||
if (!drake)
|
||||
return;
|
||||
|
||||
switch (aurEff->GetEffIndex())
|
||||
|
||||
Reference in New Issue
Block a user