Gameobject refactoring #4968

wants to merge 12 commits into from

8 participants


I ported the new rotation code to tc from Silverice.

Venugh added some commits Jan 7, 2012
Venugh Core/Globals: Check rotation0 and rotation1 fields at gameobject data…
… loading. Thx SilverIce
Venugh Merge branch 'master' of git:// int…
…o gameobject
Venugh Pack and send to client all gameobject's quaternion components which …
…allows place gameobjects cornerwise.

Update '.gobject turn' command, now you have to specify 3 rotations to turn gameobject: rotation angles around z, y and x axes.
Note to DB devs: use QuaternionCompressed::Unpack to extract rotations from the data that came with UPDATEFLAG_ROTATION.

Based from SilverIce.
Venugh Implement transport path rotation
Transport rotation transforms transport path - this makes possible to have few transports with same entry but with modified paths.
This also solvers problems with some transports (like deeprun tram).
TODO: some transports has non standart rotations, that must be stored in db

Signed-off-by: SilverIce <>
Venugh A bit gameobject code refactoring. based from SilverIce. 1cec44c
Venugh Add gameobject_addon table
table holds additional per-guid gameobject data.
currently it contains path rotation info that required for some elevators and transports

based from Silverice.
Venugh Typo in last commit. 973ee09
Venugh Core/Gameobjects: Use new rotation method in AddGoData. b477702
Venugh Use new rotation code in battlegroundsa. d557075
Venugh Correct size of animprogress for GO Create()
Add a default define and use it instead of hard coded value.
Some additional minor corrections for transport GO's

Signed-off-by: NoFantasy <>
Venugh Merge branch 'master' of git:// int…
…o gameobject

+100500 man thanks


small suggestion to change gameobject_addon into transport_addon or something like that, as apparently the data is only set for transports and not gameobjects in general?

709227e also seems to be similar to the b4fc8d9 commit


can you explain me for what it is good?

TrinityCore member

To allow malcrom fixing quests :P

TrinityCore member

Or Naxxramas Teleporter at Maexxna


Transport System Fix?


@Expecto what?


Think he said sorry.

@FilipLukac FilipLukac and 2 others commented on an outdated diff Feb 4, 2012
+ do
+ {
+ Field* fields = result->Fetch();
+ uint32 guid = fields[0].GetUInt32();
+ if (mGameObjectDataMap.find(guid) == mGameObjectDataMap.end())
+ {
+ sLog->outErrorDb("Gameobject (GUID: %u) does not exist but has a record in `gameobject_addon`", guid);
+ continue;
+ }
+ GameObjectDataAddon& gameObjectAddon = GameObjectAddonStore[guid];
+ gameObjectAddon.path_rotation.x = fields[1].GetUInt32();
+ gameObjectAddon.path_rotation.y = fields[2].GetUInt32();

Not GetFloat() ?

ghost added a note Feb 4, 2012

yes correct ^^

Subv added a note Feb 5, 2012

@Venugh use GetFloat instead of GetUInt32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@FilipLukac FilipLukac commented on the diff Feb 4, 2012
@@ -1866,6 +1878,61 @@ void ObjectMgr::LoadGameobjects()
+void ObjectMgr::LoadGameObjectAddon()
+ uint32 oldMSTime = getMSTime();
+ // 0 1 2 3 4
+ QueryResult result = WorldDatabase.Query("SELECT guid, path_rotation0, path_rotation1, path_rotation2, path_rotation3, FROM gameobject_addon");
+ if (!result)
+ {
+ sLog->outErrorDb(">> Loaded 0 gameobjects addon definitions. DB table `gameobject_addon` is empty.");
+ sLog->outString();
+ return;
+ }
+ uint32 count = 0;

Unused variable, missing ++count at do loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Fixed :)


why this is not on master yet?

TrinityCore member

PR with merges are evil :) plz remake the PR with a single commit better than 10 :)

@ghost ghost closed this Feb 24, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment