Core/Creature: Remove empty spell ids from CreatureAddon.auras
Port From (https://github.com/TrinityCore/TrinityCore/commit/64eb65cd45d1704831e3342bb7fcb8ff5df2df4e)
This commit is contained in:
@@ -2020,9 +2020,6 @@ namespace Game
|
|||||||
creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read<byte>(9);
|
creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read<byte>(9);
|
||||||
|
|
||||||
var tokens = new StringArray(result.Read<string>(10), ' ');
|
var tokens = new StringArray(result.Read<string>(10), ' ');
|
||||||
|
|
||||||
creatureAddon.auras = new uint[tokens.Length];
|
|
||||||
byte i = 0;
|
|
||||||
for (var c = 0; c < tokens.Length; ++c)
|
for (var c = 0; c < tokens.Length; ++c)
|
||||||
{
|
{
|
||||||
string id = tokens[c].Trim().Replace(",", "");
|
string id = tokens[c].Trim().Replace(",", "");
|
||||||
@@ -2051,7 +2048,7 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
creatureAddon.auras[i++] = spellId;
|
creatureAddon.auras.Add(spellId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creatureAddon.mount != 0)
|
if (creatureAddon.mount != 0)
|
||||||
@@ -2141,8 +2138,6 @@ namespace Game
|
|||||||
creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read<byte>(9);
|
creatureAddon.visibilityDistanceType = (VisibilityDistanceType)result.Read<byte>(9);
|
||||||
|
|
||||||
var tokens = new StringArray(result.Read<string>(10), ' ');
|
var tokens = new StringArray(result.Read<string>(10), ' ');
|
||||||
byte i = 0;
|
|
||||||
creatureAddon.auras = new uint[tokens.Length];
|
|
||||||
for (var c = 0; c < tokens.Length; ++c)
|
for (var c = 0; c < tokens.Length; ++c)
|
||||||
{
|
{
|
||||||
string id = tokens[c].Trim().Replace(",", "");
|
string id = tokens[c].Trim().Replace(",", "");
|
||||||
@@ -2171,7 +2166,7 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
creatureAddon.auras[i++] = spellId;
|
creatureAddon.auras.Add(spellId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creatureAddon.mount != 0)
|
if (creatureAddon.mount != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user