More cleanups of custom classes in favor of .NET runtime types.

This commit is contained in:
hondacrx
2021-11-15 18:04:57 -05:00
parent a9a51d0641
commit b026ee7ef8
132 changed files with 373 additions and 6833 deletions
+3 -3
View File
@@ -19,7 +19,6 @@ using Framework.Collections;
using Framework.Constants;
using Framework.Database;
using Framework.Dynamic;
using Framework.GameMath;
using Framework.IO;
using Game.Conditions;
using Game.DataStorage;
@@ -32,6 +31,7 @@ using Game.Spells;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
namespace Game
@@ -4257,10 +4257,10 @@ namespace Game
gameObjectAddon.invisibilityValue = 1;
}
if (!gameObjectAddon.ParentRotation.isUnit())
if (!(Math.Abs(Quaternion.Dot(gameObjectAddon.ParentRotation, gameObjectAddon.ParentRotation) - 1) < 1e-5))
{
Log.outError(LogFilter.Sql, $"GameObject (GUID: {guid}) has invalid parent rotation in `gameobject_addon`, set to default");
gameObjectAddon.ParentRotation = Quaternion.WAxis;
gameObjectAddon.ParentRotation = Quaternion.Identity;
}
if (gameObjectAddon.WorldEffectID != 0 && !CliDB.WorldEffectStorage.ContainsKey(gameObjectAddon.WorldEffectID))