azerothcore / mod-cfbg

Cross-faction Battleground for AzerothCore
MIT License
13 stars 42 forks source link

Not compatible with AzerothCore after ObjectGuid PR #52

Closed Helias closed 3 years ago

Helias commented 3 years ago

I didn't make a lot of tests and investigation so far but I can't compile the latest azerothcore version with this module, I think it's related to the ObjectGuid PR so I ask help to @UltraNix for this :pray: .

Errors:

 99%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/__/__/__/modules/mod-cfbg/src/CFBG.cpp.o
[ 99%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/__/__/__/modules/mod-cfbg/src/CFBG_SC.cpp.o
/home/helias/Documenti/sources/azth-helias/modules/mod-cfbg/src/CFBG.cpp:528:58: fatal error: no viable conversion from 'unsigned long' to 'ObjectGuid'
        if (Player* _player = ObjectAccessor::FindPlayer(itr.second))
                                                         ^~~~~~~~~~
/home/helias/Documenti/sources/azth-helias/src/server/game/Entities/Object/ObjectGuid.h:109:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned long' to 'const ObjectGuid &' for 1st argument
class ObjectGuid
      ^
/home/helias/Documenti/sources/azth-helias/src/server/game/Entities/Object/ObjectGuid.h:109:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned long' to 'ObjectGuid &&' for 1st argument
/home/helias/Documenti/sources/azth-helias/src/server/game/Entities/Object/ObjectGuid.h:123:18: note: explicit constructor is not a candidate
        explicit ObjectGuid(uint64 guid) : _guid(guid) { }
                 ^
/home/helias/Documenti/sources/azth-helias/src/server/game/Entities/Object/ObjectGuid.h:234:18: note: explicit constructor is not a candidate
        explicit ObjectGuid(uint32 const&) = delete;                // no implementation, used to catch wrong type assignment
                 ^
/home/helias/Documenti/sources/azth-helias/src/server/game/Globals/ObjectAccessor.h:71:41: note: passing argument to parameter 'guid' here
    Player* FindPlayer(ObjectGuid const guid);
                                        ^
1 error generated.
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/build.make:8344: src/server/scripts/CMakeFiles/scripts.dir/__/__/__/modules/mod-cfbg/src/CFBG.cpp.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
/home/helias/Documenti/sources/azth-helias/modules/mod-cfbg/src/CFBG_SC.cpp:149:169: fatal error: non-virtual member function marked 'override' hides virtual member function
    bool CanJoinInBattlegroundQueue(Player* player, uint64 /*BattlemasterGuid*/ , BattlegroundTypeId /*BGTypeID*/, uint8 joinAsGroup, GroupJoinBattlegroundResult& err) override
                                                                                                                                                                        ^
/home/helias/Documenti/sources/azth-helias/src/server/game/Scripting/ScriptMgr.h:974:32: note: hidden overloaded virtual function 'PlayerScript::CanJoinInBattlegroundQueue' declared here: type mismatch at 2nd parameter ('ObjectGuid' vs 'uint64' (aka 'unsigned long'))
    [[nodiscard]] virtual bool CanJoinInBattlegroundQueue(Player* /*player*/, ObjectGuid /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, GroupJoinBattlegroundResult& /*err*/) { return true; }
                               ^
1 error generated.
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/build.make:8359: src/server/scripts/CMakeFiles/scripts.dir/__/__/__/modules/mod-cfbg/src/CFBG_SC.cpp.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:1363: src/server/scripts/CMakeFiles/scripts.dir/all] Errore 2
make: *** [Makefile:130: all] Errore 2
FrancescoBorzi commented 3 years ago

@Ultranix can you please fix this? we are using it in production

poryagholami1374 commented 3 years ago

I have exactly the same problem after updating the source of all modules Signals an error

UltraNix commented 3 years ago

I'll fix it.