Hello,
More than a year ago I was working on implementing GOMove and I noticed that we have an issue on our .gob move command. See here : https://github.com/azerothcore/azerothcore-wotlk/issues/1588
Fact it, .gob move is working as intended, but the problem is : client isn't notified of the update (new coords, rotation...).
This problem is coming from our guid system.
This is what our dear friend @Rochet2 explained to me (here is a part of our conversation) :
Rochet2 _18/03/2019_
that same issue was on TC before they moved to the new guid system
.gob move just relocates the existing object and does not change the in game guid.
however the game is coded so that a gameobject cannot be moved.
So the only way around this is to use different guids every time a gameobject is moved.
TC's system uses different guid in game and in DB.
on TC the gameobject's DB guid will not change, but in game guid will
so DB keeps having 1000, but the in game guid is something like 123, 124, 125 and so on
However AC (and the old TC guid system) uses same guid in game and in DB.
Shard _18/03/2019_
Isn't creatures using the same guid system ? Because .npc move works
Rochet2 _18/03/2019_
yes, but creatures can be moved.
gameobjects cannot
the game client was probably coded to assume all objects are static.
maybe its some kind of optimization
I think implementing TC's guid system will solve the issue, and some related too issues like this one (maybe?) https://github.com/azerothcore/azerothcore-wotlk/issues/2518
TC source code: https://github.com/TrinityCore/TrinityCore/tree/3.3.5
Check : https://github.com/azerothcore/azerothcore-wotlk/issues/1588
Player should be notified about his environment changes
Check https://github.com/azerothcore/azerothcore-wotlk/issues/1588
Here is Rochet's commit to adapt GOMove to the new TC guid system + some info he sent to me :)
here is the commit that removes the hack
https://github.com/Rochet2/TrinityCore/commit/1ad9187474649b1e28a33de1013e4f5fdf01c26d#diff-d8682ec190918750ac5c6535e5ab55f1
the way it worked was that when you move an object a new object is spawned with a guid that has a custom highguid value.
I guess the core could have tracked the custom guids, but the way I implemented it was that the server sends the fake guids to the client as hex. That way you can in client see what object is fake and what is real.
The fake objects were not saved. You had to click a save button to save them, which respawned them with a real guid.
the fake guid thing is in src/server/game/Entities/Object/ObjectGuid.h
Commit : Latest :kappa:
da304a76c9c74a4dcf0a38c88a860dc5f97f3c18
Win10/Debian9
None
There is a $150 open bounty on this issue. Add to the bounty at Bountysource.
That's the uint64/uint64-list/vector to ObjectGuid/ObjectList conversion, right?
That's the uint64/uint64-list/vector to ObjectGuid/ObjectList conversion, right?
Maybe such a change was done at the same time, but that change is not what this issue is about.
The point of the guid system improvement is not to just change to some class/struct/typedef instead of uin64, but to move away from using a single guid for the same spawn. See https://github.com/TrinityCore/TrinityCore/blame/5270ff58daf31ce10919d9da53e09f494956a5f2/src/server/game/Maps/Map.h#L622-L627 and the related commit https://github.com/TrinityCore/TrinityCore/commit/dcb7082277447c21b11c4a1d59f105fa342c172e for an example of what should be included in the change.
If no one is interested I will open a branch the next few days to back port this.
@FALL1N1 please do
starting wip in https://github.com/azerothcore/azerothcore-wotlk/pull/4002, it will close a lot more issues so any help is appreciated
Most helpful comment
If no one is interested I will open a branch the next few days to back port this.