Rochet2 / TrinityCore

Rochet2's stuff for TC
https://rochet2.github.io
90 stars 143 forks source link

GOMove.cpp need update #11

Closed Magnifikator closed 9 years ago

Magnifikator commented 9 years ago

This:

    std::vector<ChatCommand> GetCommands() const override
    {
        static std::vector<ChatCommand> GOMoveCommandTable =
        {
            { "gomove", rbac::RBAC_PERM_COMMAND_GOBJECT_ADD_TEMP, false, &GOMove_Command, "" },
            { nullptr, 0, false, nullptr, "" }
        };
        return GOMoveCommandTable;
    }
Rochet2 commented 9 years ago

note to self: ChatCommand* GetCommands() const override to std::vector<ChatCommand> GetCommands() const override

For the other error see that the changes required exist in ObjectGuid.h for example https://github.com/Rochet2/TrinityCore/blob/0e227a166ad77b1731efaf6db120f032594d4df4/src/server/game/Entities/Object/ObjectGuid.h#L62 https://github.com/TrinityCore/TrinityCore/compare/3.3.5...Rochet2:gomove#diff-9c020567862320c687975d6a258d21a2

Magnifikator commented 9 years ago

just have seen with ObjectGuid.h, thanks.

The chat snippet has more than one change. 2 lines goes with vector and the last parameter in the gomove line can be deleted.

btw is this line necessary ? { nullptr, 0, false, nullptr, "" }

And btw: Really great tool !

Rochet2 commented 9 years ago

is not since the code most likely now handles it with vector length. The null stuff is an old "hack" to determine whether the array ended or not. Its pretty common way.