This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [Question] Adding a gobject scale command  (Read 1506 times)

jar0fair

  • Registred Member
  • Race Changer
  • *****
  • Posts: 30
    • View Profile
[Question] Adding a gobject scale command
« 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [Question] Adding a gobject scale command
« Reply #1 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Rochet2

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
    • http://rochet2.github.io/
Re: [Question] Adding a gobject scale command
« Reply #2 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
The patch code might not be that great either.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

jar0fair

  • Registred Member
  • Race Changer
  • *****
  • Posts: 30
    • View Profile
Re: [Question] Adding a gobject scale command
« Reply #3 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]
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Rochet2

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
    • http://rochet2.github.io/
Re: [Question] Adding a gobject scale command
« Reply #4 on: August 11, 2015, 06:34:30 pm »
« Last Edit: January 01, 1970, 01:00:00 am by Admin »