Core/Creatures: Compute CombatReach and BoundingRadius using DisplayScale
Port From (https://github.com/TrinityCore/TrinityCore/commit/81ea6f54d93ee10b03e6432c6071e0d0983796a2)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1036,8 +1036,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
creature.SetDisplayId(displayId);
|
||||
creature.SetNativeDisplayId(displayId);
|
||||
creature.SetDisplayId(displayId, true);
|
||||
|
||||
creature.SaveToDB();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user