Core/Creatures: Compute CombatReach and BoundingRadius using DisplayScale

Port From (https://github.com/TrinityCore/TrinityCore/commit/81ea6f54d93ee10b03e6432c6071e0d0983796a2)
This commit is contained in:
hondacrx
2023-04-21 18:21:08 -04:00
parent d3297b96a2
commit 19c484dc5a
10 changed files with 50 additions and 58 deletions
+4 -8
View File
@@ -196,16 +196,12 @@ namespace Game.Chat
[Command("scale", RBACPermissions.CommandModifyScale)]
static bool HandleModifyScaleCommand(CommandHandler handler, StringArguments args)
{
float Scale;
float scale;
Unit target = handler.GetSelectedUnit();
if (CheckModifySpeed(args, handler, target, out Scale, 0.1f, 10.0f, false))
if (CheckModifySpeed(args, handler, target, out scale, 0.1f, 10.0f, false))
{
NotifyModification(handler, target, CypherStrings.YouChangeSize, CypherStrings.YoursSizeChanged, Scale);
Creature creatureTarget = target.ToCreature();
if (creatureTarget)
creatureTarget.SetDisplayId(creatureTarget.GetDisplayId(), Scale);
else
target.SetObjectScale(Scale);
NotifyModification(handler, target, CypherStrings.YouChangeSize, CypherStrings.YoursSizeChanged, scale);
target.SetObjectScale(scale);
return true;
}
return false;
+1 -2
View File
@@ -1036,8 +1036,7 @@ namespace Game.Chat
return false;
}
creature.SetDisplayId(displayId);
creature.SetNativeDisplayId(displayId);
creature.SetDisplayId(displayId, true);
creature.SaveToDB();