c++ - 模块:AHBot(没有用于初始化“WorldSession”的匹配构造函数)
问题描述
基本上我遇到了这个错误,没有匹配的构造函数来初始化“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
对此的任何帮助将不胜感激
解决方案
查找第 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);
推荐阅读
- quasar-framework - Quasar:如何从 q-select “全屏”显示对话框的宽度?
- android - 片段 - 带有 DatePickerDialog 片段的 EditText
- android - 以编程方式显示android操作栏,需要帮助故障排除
- python - Python DataFrame - 像表格一样的格式
- arrays - 打印字符串的前 N 个字符 (C)
- django - djagno NotImplementedError:Django 没有为 AnonymousUser 提供数据库表示
- machine-learning - 分类模型预测的事件发生的实际概率是多少?
- reactjs - ReferenceError: setStatusBarColor Hook 在定义时未定义
- syntax - 如何在精益中使用求和符号?
- stata - 我需要一些帮助