4

基本上我遇到了这个错误,没有匹配的构造函数来初始化“WorldSession”

        WorldSession _session(AHBplayerAccount, NULL, SEC_PLAYER, sWorld->getIntConfig(CONFIG_EXPANSION), 0, LOCALE_zhCN,0,false,false);
                     ^        
/home/djboxer/Projects/azerothcore/src/server/game/Server/WorldSession.h:188:9: note: candidate constructor not viable: requires 10 arguments, but 9 were provided
        WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter, bool skipQueue, ui...
        ^
/home/djboxer/Projects/azerothcore/src/server/game/Server/WorldSession.h:185:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 9 were provided
class WorldSession

我在这里列出文件以供参考:AuctionHouseBot.cpp https://github.com/azerothcore/mod-ah-bot/blob/master/src/AuctionHouseBot.cpp#L720

Worldsession.cpp https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/game/Server/WorldSession.cpp#L88

Worldsession.h https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/game/Server/WorldSession.h#L185

对此的任何帮助将不胜感激

4

1 回答 1

3

查找第 720 行 AuctionHouse.cpp

WorldSession _session(AHBplayerAccount, NULL, SEC_PLAYER, sWorld->getIntConfig(CONFIG_EXPANSION), 0, LOCALE_zhCN,0,false,false);

改成

WorldSession _session(AHBplayerAccount, NULL, SEC_PLAYER, sWorld->getIntConfig(CONFIG_EXPANSION), 0, LOCALE_zhCN,0,false,false,0);
于 2019-03-02T00:38:54.993 回答