Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: jar0fair on August 11, 2015, 02:59:07 am

Title: [Question] Adding a gobject scale command
Post by: jar0fair on August 11, 2015, 02:59:07 am
Hello,

I've recently discovered that TrinityCore does not have a gobject scale command by default. Which was kind of surprising to me, as every server I have worked on before has had one. Does anyone know the best way to go about getting a command like that implimented? The command was something like .gob scale [guid] [scale]

Thanks in advance.
Title: Re: [Question] Adding a gobject scale command
Post by: Amaroth on August 11, 2015, 08:10:06 am
Table world.gameobject does not contain any field containing scale of gob. Gobs have scale set only in gameobject_template. So it is most likely not possible at all to set a scale to only one gob - you need to edit template value, and thus edit scale of all gobs in the world. Rescaling gobs also isn't anything I would like to do without restarting a server, because changing their scale means that their collisions ar also being rescaled and thats not something I would like to do when players are messing around.

This would be far more work to be done than just creating command itself - you would have to implement system which would be able to give gobs with same ID scales based on scale in gameobject table rather than one template scale from gameobject_template table. I am not sure if it is even possible. Probably yes, easy? Probably not at all.


Just btw, I have never seen scaling command for gobs anywhere. For characters, NPCs, sure, but never for gob. Well, I have always worked only on TC and mangos servers, whatever.
Title: Re: [Question] Adding a gobject scale command
Post by: Rochet2 on August 11, 2015, 10:41:48 am
It is possible to scale only one gameobject and only one NPC.
Neither is implemented so that you could save it. (you can scale NPCs but not save the scale)

This is some years old patch and not sure how it works these days:
http://community.trinitycore.org/topic/ ... ment-47056 (http://community.trinitycore.org/topic/7206-patch-scale-objects-and-creatures/#comment-47056" onclick="window.open(this.href);return false;)
The patch code might not be that great either.
Title: Re: [Question] Adding a gobject scale command
Post by: jar0fair on August 11, 2015, 01:40:27 pm
This looks like exactly what I need Rotchet. But, it is not compatible with the new trinity core. Several errors occur on the --check. Have you ever thought of updating this patch for the newer versions?

Just for your reference, below are the errors.

[spoiler:5ym7c47p]
Code: [Select]
warning: src/server/game/Entities/GameObject/GameObject.cpp has type 100644, exp                                                        ected 100755
error: patch failed: src/server/game/Entities/GameObject/GameObject.cpp:1152
error: src/server/game/Entities/GameObject/GameObject.cpp: patch does not apply
warning: src/server/game/Entities/GameObject/GameObject.h has type 100644, expec                                                        ted 100755
error: patch failed: src/server/game/Entities/GameObject/GameObject.h:593
error: src/server/game/Entities/GameObject/GameObject.h: patch does not apply
warning: src/server/game/Globals/ObjectMgr.cpp has type 100644, expected 100755
error: patch failed: src/server/game/Globals/ObjectMgr.cpp:1796
error: src/server/game/Globals/ObjectMgr.cpp: patch does not apply
error: patch failed: src/server/scripts/Commands/cs_gobject.cpp:46
error: src/server/scripts/Commands/cs_gobject.cpp: patch does not apply
warning: src/server/shared/Database/Implementation/WorldDatabase.cpp has type 10                                                        0644, expected 100755
error: patch failed: src/server/shared/Database/Implementation/WorldDatabase.cpp                                                        :87
error: src/server/shared/Database/Implementation/WorldDatabase.cpp: patch does n                                                        ot apply
[/spoiler:5ym7c47p]
Title: Re: [Question] Adding a gobject scale command
Post by: Rochet2 on August 11, 2015, 06:34:30 pm
I have updated the patch.
http://rochet2.github.io/Objscale.html (http://rochet2.github.io/Objscale.html" onclick="window.open(this.href);return false;)