ZhengPeiRu21 / mod-playerbots

AzerothCore Playerbots Module
MIT License
194 stars 93 forks source link

Problem with compiling #99

Closed KaloyanDDimitrov closed 2 years ago

KaloyanDDimitrov commented 2 years ago

Hello This is the errors i get when i run Make

/root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:83:20: warning: moving a local objec t in a return statement prevents copy elision [-Wpessimizing-move] return std::move(keys); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:83:20: note: remove std::move call h ere return std::move(keys); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:145:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(keys); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:145:20: note: remove std::move call here return std::move(keys); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:217:20: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] return std::move(std::set()); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:217:20: note: remove std::move call here return std::move(std::set()); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:231:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(result); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:231:20: note: remove std::move call here return std::move(result); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:245:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(result); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:245:20: note: remove std::move call here return std::move(result); ^~~~~~ ~ In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:7: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/Playerbots.h:8: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/AiObjectContext.h:9: /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:83:20: warning: moving a local objec t in a return statement prevents copy elision [-Wpessimizing-move] return std::move(keys); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:83:20: note: remove std::move call h ere return std::move(keys); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:145:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(keys); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:145:20: note: remove std::move call here return std::move(keys); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:217:20: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] return std::move(std::set()); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:217:20: note: remove std::move call here return std::move(std::set()); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:231:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(result); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:231:20: note: remove std::move call here return std::move(result); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:245:20: warning: moving a local obje ct in a return statement prevents copy elision [-Wpessimizing-move] return std::move(result); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:245:20: note: remove std::move call here return std::move(result); ^~~~~~ ~ In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:7: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/Playerbots.h:15: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/SharedValueContext.h:11: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/QuestValues.h:9: /root/azerothcore-wotlk/modules/mod-playerbots/src/TravelMgr.h:85:9: warning: definition of implicit copy assignment operator for 'WorldPosition' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy] WorldPosition(WorldPosition const& pos) : WorldLocation(pos), visitors(pos.visitors) { } ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/TravelMgr.h:371:117: note: in implicit copy assignment operator fo r 'WorldPosition' first required here FindPointCreatureData(WorldPosition point1 = WorldPosition(), float radius1 = 0, uint32 entry1 = 0) { point = point1; radius = radius1; entry = entry1; } ^ In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/ChatFilter.cpp:7: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/Playerbots.h:15: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/SharedValueContext.h:11: In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/QuestValues.h:9: /root/azerothcore-wotlk/modules/mod-playerbots/src/TravelMgr.h:85:9: warning: definition of implicit copy assignment operator for 'WorldPosition' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy] WorldPosition(WorldPosition const& pos) : WorldLocation(pos), visitors(pos.visitors) { } ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/TravelMgr.h:371:117: note: in implicit copy assignment operator fo r 'WorldPosition' first required here FindPointCreatureData(WorldPosition point1 = WorldPosition(), float radius1 = 0, uint32 entry1 = 0) { point = point1; radius = radius1; entry = entry1; } ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:269:12: warning: moving a local object in a return s tatement prevents copy elision [-Wpessimizing-move] return std::move(specName); ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:269:12: note: remove std::move call here return std::move(specName); ^~~~~~ ~ /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:681:77: warning: unused parameter 'facade' [-Wunused -parameter] void AiFactory::AddDefaultDeadStrategies(Player player, PlayerbotAI const facade, Engine deadEngine) ^ In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/ChatFilter.cpp:8: /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/RtiTargetValue.h:16:117: warning: field 'type' wil l be initialized after base 'TargetValue' [-Wreorder-ctor] RtiTargetValue(PlayerbotAI botAI, std::string const type = "rti", std::string const name = "rti target") : t ype(type), TargetValue(botAI, name) { } ^ /root/azerothcore-wotlk/modules/mod-playerbots/src/ChatFilter.cpp:166:47: fatal error: no member named 'GetTargetIcon ' in 'Group' ObjectGuid rtiTarget = group->GetTargetIcon(RtiTargetValue::GetRtiIndex(rti.substr(1)));


7 warnings and 1 error generated.
make[2]: *** [modules/CMakeFiles/modules.dir/build.make:89: modules/CMakeFiles/modules.dir/mod-playerbots/src/ChatFil                                ter.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:5:
In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.h:8:
In file included from /root/azerothcore-wotlk/src/common/Common.h:22:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string:52:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algo.h:62:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tempbuf.h:60:
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h:98:7: warning: destructor calle                                d on non-final 'TalentSpec' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-                                dtor]
    { __pointer->~_Tp(); }
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h:108:11: note: in instantiation                                 of function template specialization 'std::_Destroy<TalentSpec>' requested here
            std::_Destroy(std::__addressof(*__first));
                 ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h:137:2: note: in instantiation o                                f function template specialization 'std::_Destroy_aux<false>::__destroy<TalentSpec *>' requested here
        __destroy(__first, __last);
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h:206:7: note: in instantiation o                                f function template specialization 'std::_Destroy<TalentSpec *>' requested here
      _Destroy(__first, __last);
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h:677:7: note: in instantiation of f                                unction template specialization 'std::_Destroy<TalentSpec *, TalentSpec>' requested here
        std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
             ^
/root/azerothcore-wotlk/modules/mod-playerbots/src/Talentspec.h:74:9: note: in instantiation of member function 'std:                                :vector<TalentSpec, std::allocator<TalentSpec> >::~vector' requested here
        TalentPath(uint32 pathId, std::string const pathName, uint32 pathProbability)
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h:98:19: note: qualify call to si                                lence this warning
    { __pointer->~_Tp(); }
                  ^
In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/AiFactory.cpp:7:
In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/Playerbots.h:8:
In file included from /root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/AiObjectContext.h:9:
/root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:112:21: warning: delete called on no                                n-final 'UntypedValue' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
                    delete i->second;
                    ^
/root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/NamedObjectContext.h:96:13: note: in instantiation of mem                                ber function 'NamedObjectContext<UntypedValue>::Clear' requested here
            Clear();
            ^
/root/azerothcore-wotlk/modules/mod-playerbots/src/strategy/values/SharedValueContext.h:19:9: note: in instantiation                                 of member function 'NamedObjectContext<UntypedValue>::~NamedObjectContext' requested here
        SharedValueContext() : NamedObjectContext(true)
        ^
10 warnings generated.
make[1]: *** [CMakeFiles/Makefile2:1197: modules/CMakeFiles/modules.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

if i can get some help or guidance
ZhengPeiRu21 commented 2 years ago

Please ensure you are compiling using the correct fork and branch of AzerothCore. It appears you are trying to compile with the master branch.

KaloyanDDimitrov commented 2 years ago

My bad i did compiled it with your version. But i dont know how to use it or check if it`s working. Some Guidance?

KaloyanDDimitrov commented 2 years ago

It is all working and i have to applaud you for the great work. Im still getting some errors in the console but for now all is fine.

ZhengPeiRu21 commented 2 years ago

I am happy it is working for you! Please report if you find any more issue.