Misc fixes

This commit is contained in:
Hondacrx
2025-09-01 22:41:28 -04:00
parent 7faf096ba9
commit 100a9d74e7
3 changed files with 25 additions and 26 deletions
+6 -6
View File
@@ -362,17 +362,17 @@ namespace Game.Combat
public void TauntUpdate()
{
var tauntEffects = _owner.GetAuraEffectsByType(AuraType.ModTaunt);
TauntState state = TauntState.Taunt;
Dictionary<ObjectGuid, TauntState> tauntStates = new();
uint tauntPriority = 0; // lowest is highest
Dictionary<ObjectGuid, uint> tauntStates = new();
// Only the last taunt effect applied by something still on our threat list is considered
foreach (var auraEffect in tauntEffects)
tauntStates[auraEffect.GetCasterGUID()] = state++;
foreach (AuraEffect tauntEffect in tauntEffects)
tauntStates[tauntEffect.GetCasterGUID()] = ++tauntPriority;
foreach (var pair in _myThreatListEntries)
{
if (tauntStates.TryGetValue(pair.Key, out TauntState tauntState))
pair.Value.UpdateTauntState(tauntState);
if (tauntStates.TryGetValue(pair.Key, out uint tauntState))
pair.Value.UpdateTauntState((TauntState)((uint)TauntState.Taunt + tauntStates.Count - tauntState));
else
pair.Value.UpdateTauntState();
}