Core/Units: Defined many UnitFlags3 and implemented UNIT_FLAG3_ALTERNATIVE_DEFAULT_LANGUAGE
Port From (https://github.com/TrinityCore/TrinityCore/commit/2a5329847636ddc080c461bda06375edfbf3815d)
This commit is contained in:
@@ -4615,6 +4615,25 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModAlternativeDefaultLanguage)]
|
||||
void HandleModAlternativeDefaultLanguage(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
|
||||
return;
|
||||
|
||||
Unit target = aurApp.GetTarget();
|
||||
|
||||
if (apply)
|
||||
target.SetUnitFlag3(UnitFlags3.AlternativeDefaultLanguage);
|
||||
else
|
||||
{
|
||||
if (target.HasAuraType(GetAuraType()))
|
||||
return;
|
||||
|
||||
target.RemoveUnitFlag3(UnitFlags3.AlternativeDefaultLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.Linked)]
|
||||
void HandleAuraLinked(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user