Misc fixes

This commit is contained in:
hondacrx
2022-05-30 14:09:03 -04:00
parent 496b1e0c46
commit 0cccf91411
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -980,7 +980,19 @@ namespace Game.Entities
if (charm.ToCreature().HasUnitTypeMask(UnitTypeMask.Puppet))
((Puppet)charm).UnSummon();
else if (charm.IsVehicle())
{
ExitVehicle();
// Temporary for issue https://github.com/TrinityCore/TrinityCore/issues/24876
if (!GetCharmedGUID().IsEmpty() && !charm.HasAuraTypeWithCaster(AuraType.ControlVehicle, GetGUID()))
{
Log.outFatal(LogFilter.Player, $"Player::StopCastingCharm Player '{GetName()}' ({GetGUID()}) is not able to uncharm vehicle ({GetCharmedGUID()}) because of missing SPELL_AURA_CONTROL_VEHICLE");
// attempt to recover from missing HandleAuraControlVehicle unapply handling
// THIS IS A HACK, NEED TO FIND HOW IS IT EVEN POSSBLE TO NOT HAVE THE AURA
_ExitVehicle();
}
}
}
if (!GetCharmedGUID().IsEmpty())
charm.RemoveCharmAuras();
@@ -16,6 +16,7 @@
*/
using Framework.Constants;
using Game.Entities;
using Game.Scenarios;
using System.Collections.Generic;