From 32f0939fac82da99e4f8273761c8f9d530087c47 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 5 Jan 2022 18:03:38 -0500 Subject: [PATCH] Core/Creature: Remove empty spell ids from CreatureAddon.auras Port From (https://github.com/TrinityCore/TrinityCore/commit/64eb65cd45d1704831e3342bb7fcb8ff5df2df4e) --- Source/Game/Globals/ObjectManager.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index 366f489f1..3db69cc8e 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -2020,9 +2020,6 @@ namespace Game creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read(9); var tokens = new StringArray(result.Read(10), ' '); - - creatureAddon.auras = new uint[tokens.Length]; - byte i = 0; for (var c = 0; c < tokens.Length; ++c) { string id = tokens[c].Trim().Replace(",", ""); @@ -2051,7 +2048,7 @@ namespace Game continue; } - creatureAddon.auras[i++] = spellId; + creatureAddon.auras.Add(spellId); } if (creatureAddon.mount != 0) @@ -2141,8 +2138,6 @@ namespace Game creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read(9); var tokens = new StringArray(result.Read(10), ' '); - byte i = 0; - creatureAddon.auras = new uint[tokens.Length]; for (var c = 0; c < tokens.Length; ++c) { string id = tokens[c].Trim().Replace(",", ""); @@ -2171,7 +2166,7 @@ namespace Game continue; } - creatureAddon.auras[i++] = spellId; + creatureAddon.auras.Add(spellId); } if (creatureAddon.mount != 0)