Reworked BotDatabase into a functional add-on for ZoneDatabase

This commit is contained in:
Uleat
2019-06-24 18:13:25 -04:00
parent 2e9cf7dbd7
commit ee49ad3ce9
11 changed files with 211 additions and 255 deletions
+51 -51
View File
@@ -59,7 +59,7 @@
#include "bot_command.h"
#include "bot_database.h"
#include "zonedb.h"
#include "guild_mgr.h"
#include "map.h"
#include "doors.h"
@@ -1422,7 +1422,7 @@ int bot_command_init(void)
}
std::map<std::string, std::pair<uint8, std::vector<std::string>>> bot_command_settings;
botdb.LoadBotCommandSettings(bot_command_settings);
database.botdb.LoadBotCommandSettings(bot_command_settings);
auto working_bcl = bot_command_list;
for (auto working_bcl_iter : working_bcl) {
@@ -1868,11 +1868,11 @@ namespace MyBots
std::string group_name = name;
uint32 botgroup_id = 0;
if (!botdb.LoadBotGroupIDForLoadBotGroup(bot_owner->CharacterID(), group_name, botgroup_id) || !botgroup_id)
if (!database.botdb.LoadBotGroupIDForLoadBotGroup(bot_owner->CharacterID(), group_name, botgroup_id) || !botgroup_id)
return;
std::map<uint32, std::list<uint32>> botgroup_list;
if (!botdb.LoadBotGroup(group_name, botgroup_list) || botgroup_list.find(botgroup_id) == botgroup_list.end() || !botgroup_list[botgroup_id].size())
if (!database.botdb.LoadBotGroup(group_name, botgroup_list) || botgroup_list.find(botgroup_id) == botgroup_list.end() || !botgroup_list[botgroup_id].size())
return;
std::list<Bot*> selectable_bot_list;
@@ -3456,7 +3456,7 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
else
c->SetBotOptionDeathMarquee(!c->GetBotOptionDeathMarquee());
botdb.SaveOwnerOptionDeathMarquee(c->CharacterID(), c->GetBotOptionDeathMarquee());
database.botdb.SaveOwnerOptionDeathMarquee(c->CharacterID(), c->GetBotOptionDeathMarquee());
c->Message(m_action, "Bot 'death marquee' is now %s.", (c->GetBotOptionDeathMarquee() == true ? "enabled" : "disabled"));
}
else if (!owner_option.compare("statsupdate")) {
@@ -3467,7 +3467,7 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
else
c->SetBotOptionStatsUpdate(!c->GetBotOptionStatsUpdate());
botdb.SaveOwnerOptionStatsUpdate(c->CharacterID(), c->GetBotOptionStatsUpdate());
database.botdb.SaveOwnerOptionStatsUpdate(c->CharacterID(), c->GetBotOptionStatsUpdate());
c->Message(m_action, "Bot 'stats update' is now %s.", (c->GetBotOptionStatsUpdate() == true ? "enabled" : "disabled"));
}
else {
@@ -4240,7 +4240,7 @@ void bot_subcommand_bot_clone(Client *c, const Seperator *sep)
std::string error_message;
bool available_flag = false;
if (!botdb.QueryNameAvailablity(bot_name, available_flag)) {
if (!database.botdb.QueryNameAvailablity(bot_name, available_flag)) {
c->Message(m_fail, "%s", BotDatabase::fail::QueryNameAvailablity());
return;
}
@@ -4252,7 +4252,7 @@ void bot_subcommand_bot_clone(Client *c, const Seperator *sep)
uint32 max_bot_count = RuleI(Bots, CreationLimit);
uint32 bot_count = 0;
if (!botdb.QueryBotCount(c->CharacterID(), bot_count)) {
if (!database.botdb.QueryBotCount(c->CharacterID(), bot_count)) {
c->Message(m_fail, "%s", BotDatabase::fail::QueryBotCount());
return;
}
@@ -4262,18 +4262,18 @@ void bot_subcommand_bot_clone(Client *c, const Seperator *sep)
}
uint32 clone_id = 0;
if (!botdb.CreateCloneBot(c->CharacterID(), my_bot->GetBotID(), bot_name, clone_id) || !clone_id) {
if (!database.botdb.CreateCloneBot(c->CharacterID(), my_bot->GetBotID(), bot_name, clone_id) || !clone_id) {
c->Message(m_fail, "%s '%s'", BotDatabase::fail::CreateCloneBot(), bot_name.c_str());
return;
}
int clone_stance = EQEmu::constants::stancePassive;
if (!botdb.LoadStance(my_bot->GetBotID(), clone_stance))
if (!database.botdb.LoadStance(my_bot->GetBotID(), clone_stance))
c->Message(m_fail, "%s for bot '%s'", BotDatabase::fail::LoadStance(), my_bot->GetCleanName());
if (!botdb.SaveStance(clone_id, clone_stance))
if (!database.botdb.SaveStance(clone_id, clone_stance))
c->Message(m_fail, "%s for clone '%s'", BotDatabase::fail::SaveStance(), bot_name.c_str());
if (!botdb.CreateCloneBotInventory(c->CharacterID(), my_bot->GetBotID(), clone_id))
if (!database.botdb.CreateCloneBotInventory(c->CharacterID(), my_bot->GetBotID(), clone_id))
c->Message(m_fail, "%s for clone '%s'", BotDatabase::fail::CreateCloneBotInventory(), bot_name.c_str());
c->Message(m_action, "Bot '%s' was successfully cloned to bot '%s'", my_bot->GetCleanName(), bot_name.c_str());
@@ -4521,11 +4521,11 @@ void bot_subcommand_bot_dye_armor(Client *c, const Seperator *sep)
if (ab_type == ActionableBots::ABT_All) {
if (dye_all) {
if (!botdb.SaveAllArmorColors(c->CharacterID(), rgb_value))
if (!database.botdb.SaveAllArmorColors(c->CharacterID(), rgb_value))
c->Message(m_fail, "%s", BotDatabase::fail::SaveAllArmorColors());
}
else {
if (!botdb.SaveAllArmorColorBySlot(c->CharacterID(), slot_id, rgb_value))
if (!database.botdb.SaveAllArmorColorBySlot(c->CharacterID(), slot_id, rgb_value))
c->Message(m_fail, "%s", BotDatabase::fail::SaveAllArmorColorBySlot());
}
}
@@ -4674,7 +4674,7 @@ void bot_subcommand_bot_follow_distance(Client *c, const Seperator *sep)
continue;
bot_iter->SetFollowDistance(bfd);
if (ab_type != ActionableBots::ABT_All && !botdb.SaveFollowDistance(c->CharacterID(), bot_iter->GetBotID(), bfd)) {
if (ab_type != ActionableBots::ABT_All && !database.botdb.SaveFollowDistance(c->CharacterID(), bot_iter->GetBotID(), bfd)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::SaveFollowDistance(), bot_iter->GetCleanName());
return;
}
@@ -4683,7 +4683,7 @@ void bot_subcommand_bot_follow_distance(Client *c, const Seperator *sep)
}
if (ab_type == ActionableBots::ABT_All) {
if (!botdb.SaveAllFollowDistances(c->CharacterID(), bfd)) {
if (!database.botdb.SaveAllFollowDistances(c->CharacterID(), bfd)) {
c->Message(m_fail, "%s", BotDatabase::fail::SaveAllFollowDistances());
return;
}
@@ -4852,7 +4852,7 @@ void bot_subcommand_bot_inspect_message(Client *c, const Seperator *sep)
if (set_flag)
memcpy(bot_message_struct, client_message_struct, sizeof(InspectMessage_Struct));
if (ab_type != ActionableBots::ABT_All && !botdb.SaveInspectMessage(bot_iter->GetBotID(), *bot_message_struct)) {
if (ab_type != ActionableBots::ABT_All && !database.botdb.SaveInspectMessage(bot_iter->GetBotID(), *bot_message_struct)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::SaveInspectMessage(), bot_iter->GetCleanName());
return;
}
@@ -4866,7 +4866,7 @@ void bot_subcommand_bot_inspect_message(Client *c, const Seperator *sep)
if (set_flag)
memcpy(&bot_message_struct, client_message_struct, sizeof(InspectMessage_Struct));
if (!botdb.SaveAllInspectMessages(c->CharacterID(), bot_message_struct)) {
if (!database.botdb.SaveAllInspectMessages(c->CharacterID(), bot_message_struct)) {
c->Message(m_fail, "%s", BotDatabase::fail::SaveAllInspectMessages());
return;
}
@@ -4922,7 +4922,7 @@ void bot_subcommand_bot_list(Client *c, const Seperator *sep)
}
std::list<BotsAvailableList> bots_list;
if (!botdb.LoadBotsList(c->CharacterID(), bots_list)) {
if (!database.botdb.LoadBotsList(c->CharacterID(), bots_list)) {
c->Message(m_fail, "%s", BotDatabase::fail::LoadBotsList());
return;
}
@@ -5079,7 +5079,7 @@ void bot_subcommand_bot_spawn(Client *c, const Seperator *sep)
if (RuleB(Bots, QuestableSpawnLimit) && !c->GetGM()) {
int allowed_bot_count = 0;
if (!botdb.LoadQuestableSpawnCount(c->CharacterID(), allowed_bot_count)) {
if (!database.botdb.LoadQuestableSpawnCount(c->CharacterID(), allowed_bot_count)) {
c->Message(m_fail, "%s", BotDatabase::fail::LoadQuestableSpawnCount());
return;
}
@@ -5100,7 +5100,7 @@ void bot_subcommand_bot_spawn(Client *c, const Seperator *sep)
std::string bot_name = sep->arg[1];
uint32 bot_id = 0;
if (!botdb.LoadBotID(c->CharacterID(), bot_name, bot_id)) {
if (!database.botdb.LoadBotID(c->CharacterID(), bot_name, bot_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotID(), bot_name.c_str());
return;
}
@@ -5273,7 +5273,7 @@ void bot_subcommand_bot_stop_melee_level(Client *c, const Seperator *sep)
// [reset] falls through with initialization value
my_bot->SetStopMeleeLevel(sml);
if (!botdb.SaveStopMeleeLevel(c->CharacterID(), my_bot->GetBotID(), sml))
if (!database.botdb.SaveStopMeleeLevel(c->CharacterID(), my_bot->GetBotID(), sml))
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::SaveStopMeleeLevel(), my_bot->GetCleanName());
c->Message(m_action, "Successfully set stop melee level for %s to %u", my_bot->GetCleanName(), sml);
@@ -5442,7 +5442,7 @@ void bot_subcommand_bot_toggle_helm(Client *c, const Seperator *sep)
bot_iter->SetShowHelm(helm_state);
if (ab_type != ActionableBots::ABT_All) {
if (!botdb.SaveHelmAppearance(c->CharacterID(), bot_iter->GetBotID(), bot_iter->GetShowHelm())) {
if (!database.botdb.SaveHelmAppearance(c->CharacterID(), bot_iter->GetBotID(), bot_iter->GetShowHelm())) {
c->Message(m_unknown, "%s for '%s'", bot_iter->GetCleanName());
return;
}
@@ -5464,11 +5464,11 @@ void bot_subcommand_bot_toggle_helm(Client *c, const Seperator *sep)
if (ab_type == ActionableBots::ABT_All) {
std::string query;
if (toggle_helm) {
if (!botdb.ToggleAllHelmAppearances(c->CharacterID()))
if (!database.botdb.ToggleAllHelmAppearances(c->CharacterID()))
c->Message(m_fail, "%s", BotDatabase::fail::ToggleAllHelmAppearances());
}
else {
if (!botdb.SaveAllHelmAppearances(c->CharacterID(), helm_state))
if (!database.botdb.SaveAllHelmAppearances(c->CharacterID(), helm_state))
c->Message(m_fail, "%s", BotDatabase::fail::SaveAllHelmAppearances());
}
@@ -5627,7 +5627,7 @@ void bot_subcommand_botgroup_add_member(Client *c, const Seperator *sep)
}
uint32 botgroup_id = 0;
if (!botdb.LoadBotGroupIDByMemberID(new_member->GetBotID(), botgroup_id)) {
if (!database.botdb.LoadBotGroupIDByMemberID(new_member->GetBotID(), botgroup_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDByMemberID(), new_member->GetCleanName());
return;
}
@@ -5657,7 +5657,7 @@ void bot_subcommand_botgroup_add_member(Client *c, const Seperator *sep)
}
botgroup_id = 0;
if (!botdb.LoadBotGroupIDByLeaderID(botgroup_leader->GetBotID(), botgroup_id)) {
if (!database.botdb.LoadBotGroupIDByLeaderID(botgroup_leader->GetBotID(), botgroup_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDByLeaderID(), botgroup_leader->GetCleanName());
return;
}
@@ -5673,14 +5673,14 @@ void bot_subcommand_botgroup_add_member(Client *c, const Seperator *sep)
database.SetGroupID(new_member->GetName(), group_inst->GetID(), new_member->GetBotID());
if (!botdb.AddMemberToBotGroup(botgroup_leader->GetBotID(), new_member->GetBotID())) {
if (!database.botdb.AddMemberToBotGroup(botgroup_leader->GetBotID(), new_member->GetBotID())) {
c->Message(m_fail, "%s - %s->%s", BotDatabase::fail::AddMemberToBotGroup(), new_member->GetCleanName(), botgroup_leader->GetCleanName());
Bot::RemoveBotFromGroup(new_member, botgroup_leader->GetGroup());
return;
}
std::string botgroup_name;
if (!botdb.LoadBotGroupNameByLeaderID(botgroup_leader->GetBotID(), botgroup_name))
if (!database.botdb.LoadBotGroupNameByLeaderID(botgroup_leader->GetBotID(), botgroup_name))
c->Message(m_fail, "%s", BotDatabase::fail::LoadBotGroupNameByLeaderID());
c->Message(m_action, "Successfully added %s to bot-group %s", new_member->GetCleanName(), botgroup_name.c_str());
@@ -5702,7 +5702,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep)
}
bool extant_flag = false;
if (!botdb.QueryBotGroupExistence(botgroup_name_arg, extant_flag)) {
if (!database.botdb.QueryBotGroupExistence(botgroup_name_arg, extant_flag)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::QueryBotGroupExistence(), botgroup_name_arg.c_str());
return;
}
@@ -5732,7 +5732,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep)
}
uint32 botgroup_id = 0;
if (!botdb.LoadBotGroupIDByLeaderID(botgroup_leader->GetBotID(), botgroup_id)) {
if (!database.botdb.LoadBotGroupIDByLeaderID(botgroup_leader->GetBotID(), botgroup_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDByLeaderID(), botgroup_leader->GetCleanName());
return;
}
@@ -5742,7 +5742,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep)
}
botgroup_id = 0;
if (!botdb.LoadBotGroupIDByMemberID(botgroup_leader->GetBotID(), botgroup_id)) {
if (!database.botdb.LoadBotGroupIDByMemberID(botgroup_leader->GetBotID(), botgroup_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDByMemberID(), botgroup_leader->GetCleanName());
return;
}
@@ -5757,7 +5757,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep)
return;
}
if (!botdb.CreateBotGroup(botgroup_name_arg, botgroup_leader->GetBotID())) {
if (!database.botdb.CreateBotGroup(botgroup_name_arg, botgroup_leader->GetBotID())) {
c->Message(m_fail, "%s '%s'", BotDatabase::fail::CreateBotGroup(), botgroup_name_arg.c_str());
safe_delete(group_inst);
return;
@@ -5787,7 +5787,7 @@ void bot_subcommand_botgroup_delete(Client *c, const Seperator *sep)
}
uint32 botgroup_id = 0;
if (!botdb.LoadBotGroupIDForLoadBotGroup(c->CharacterID(), botgroup_name_arg, botgroup_id)) {
if (!database.botdb.LoadBotGroupIDForLoadBotGroup(c->CharacterID(), botgroup_name_arg, botgroup_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDForLoadBotGroup(), botgroup_name_arg.c_str());
return;
}
@@ -5797,7 +5797,7 @@ void bot_subcommand_botgroup_delete(Client *c, const Seperator *sep)
}
uint32 leader_id = 0;
if (!botdb.LoadLeaderIDByBotGroupID(botgroup_id, leader_id)) {
if (!database.botdb.LoadLeaderIDByBotGroupID(botgroup_id, leader_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadLeaderIDByBotGroupID(), botgroup_name_arg.c_str());
return;
}
@@ -5811,7 +5811,7 @@ void bot_subcommand_botgroup_delete(Client *c, const Seperator *sep)
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
std::map<uint32, std::list<uint32>> member_list;
if (!botdb.LoadBotGroup(botgroup_name_arg, member_list)) {
if (!database.botdb.LoadBotGroup(botgroup_name_arg, member_list)) {
c->Message(m_fail, "%s '%s'", BotDatabase::fail::LoadBotGroup(), botgroup_name_arg.c_str());
return;
}
@@ -5835,7 +5835,7 @@ void bot_subcommand_botgroup_delete(Client *c, const Seperator *sep)
Bot::RemoveBotFromGroup(group_member, group_member->GetGroup());
}
if (!botdb.DeleteBotGroup(leader_id)) {
if (!database.botdb.DeleteBotGroup(leader_id)) {
c->Message(m_fail, "%s '%s'", BotDatabase::fail::DeleteBotGroup(), botgroup_name_arg.c_str());
return;
}
@@ -5853,7 +5853,7 @@ void bot_subcommand_botgroup_list(Client *c, const Seperator *sep)
}
std::list<std::pair<std::string, std::string>> botgroups_list;
if (!botdb.LoadBotGroupsListByOwnerID(c->CharacterID(), botgroups_list)) {
if (!database.botdb.LoadBotGroupsListByOwnerID(c->CharacterID(), botgroups_list)) {
c->Message(m_fail, "%s", BotDatabase::fail::LoadBotGroupsListByOwnerID());
return;
}
@@ -5885,7 +5885,7 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
}
bool extant_flag = false;
if (!botdb.QueryBotGroupExistence(botgroup_name_arg, extant_flag)) {
if (!database.botdb.QueryBotGroupExistence(botgroup_name_arg, extant_flag)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::QueryBotGroupExistence(), botgroup_name_arg.c_str());
return;
}
@@ -5915,13 +5915,13 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
}
uint32 botgroup_id = 0;
if (!botdb.LoadBotGroupIDForLoadBotGroup(c->CharacterID(), botgroup_name_arg, botgroup_id) || !botgroup_id) {
if (!database.botdb.LoadBotGroupIDForLoadBotGroup(c->CharacterID(), botgroup_name_arg, botgroup_id) || !botgroup_id) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroupIDForLoadBotGroup(), botgroup_name_arg.c_str());
return;
}
std::map<uint32, std::list<uint32>> member_list;
if (!botdb.LoadBotGroup(botgroup_name_arg, member_list)) {
if (!database.botdb.LoadBotGroup(botgroup_name_arg, member_list)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadBotGroup(), botgroup_name_arg.c_str());
return;
}
@@ -5934,7 +5934,7 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
if (RuleB(Bots, QuestableSpawnLimit)) {
int allowed_bot_count = 0;
if (!botdb.LoadQuestableSpawnCount(c->CharacterID(), allowed_bot_count)) {
if (!database.botdb.LoadQuestableSpawnCount(c->CharacterID(), allowed_bot_count)) {
c->Message(m_fail, "%s", BotDatabase::fail::LoadQuestableSpawnCount());
return;
}
@@ -5957,7 +5957,7 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
}
uint32 leader_id = 0;
if (!botdb.LoadLeaderIDByBotGroupName(botgroup_name_arg, leader_id)) {
if (!database.botdb.LoadLeaderIDByBotGroupName(botgroup_name_arg, leader_id)) {
c->Message(m_fail, "%s for '%s'", BotDatabase::fail::LoadLeaderIDByBotGroupName(), botgroup_name_arg.c_str());
return;
}
@@ -6042,7 +6042,7 @@ void bot_subcommand_botgroup_remove_member(Client *c, const Seperator *sep)
return;
}
if (!botdb.RemoveMemberFromBotGroup(group_member->GetBotID())) {
if (!database.botdb.RemoveMemberFromBotGroup(group_member->GetBotID())) {
c->Message(m_fail, "%s - '%s'", BotDatabase::fail::RemoveMemberFromBotGroup(), group_member->GetCleanName());
return;
}
@@ -6664,7 +6664,7 @@ void bot_subcommand_heal_rotation_create(Client *c, const Seperator *sep)
bool member_fail = false;
bool target_fail = false;
if (!botdb.LoadHealRotation(creator_member, member_list, target_list, load_flag, member_fail, target_fail))
if (!database.botdb.LoadHealRotation(creator_member, member_list, target_list, load_flag, member_fail, target_fail))
c->Message(m_fail, "%s", BotDatabase::fail::LoadHealRotation());
if (!load_flag) {
@@ -6737,7 +6737,7 @@ void bot_subcommand_heal_rotation_delete(Client *c, const Seperator *sep)
}
if (all_flag) {
if (botdb.DeleteAllHealRotations(c->CharacterID()))
if (database.botdb.DeleteAllHealRotations(c->CharacterID()))
c->Message(m_action, "Succeeded in deleting all heal rotations");
else
c->Message(m_fail, "%s", BotDatabase::fail::DeleteAllHealRotations());
@@ -6760,7 +6760,7 @@ void bot_subcommand_heal_rotation_delete(Client *c, const Seperator *sep)
return;
}
if (!botdb.DeleteHealRotation(current_member->GetBotID())) {
if (!database.botdb.DeleteHealRotation(current_member->GetBotID())) {
c->Message(m_fail, "%s", BotDatabase::fail::DeleteHealRotation());
return;
}
@@ -7047,7 +7047,7 @@ void bot_subcommand_heal_rotation_save(Client *c, const Seperator *sep)
bool member_fail = false;
bool target_fail = false;
if (!botdb.SaveHealRotation(current_member, member_fail, target_fail)) {
if (!database.botdb.SaveHealRotation(current_member, member_fail, target_fail)) {
c->Message(m_fail, "%s", BotDatabase::fail::SaveHealRotation());
return;
}
@@ -7264,7 +7264,7 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep)
}
uint32 database_count = 0;
if (!botdb.QueryInventoryCount(my_bot->GetBotID(), database_count))
if (!database.botdb.QueryInventoryCount(my_bot->GetBotID(), database_count))
c->Message(m_unknown, "%s", BotDatabase::fail::QueryInventoryCount());
if (inventory_count != database_count)
@@ -7684,7 +7684,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
}
bool available_flag = false;
if (!botdb.QueryNameAvailablity(bot_name, available_flag)) {
if (!database.botdb.QueryNameAvailablity(bot_name, available_flag)) {
bot_owner->Message(m_fail, "%s for '%s'", BotDatabase::fail::QueryNameAvailablity(), bot_name.c_str());
return bot_id;
}
@@ -7726,7 +7726,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
uint32 max_bot_count = RuleI(Bots, CreationLimit);
uint32 bot_count = 0;
if (!botdb.QueryBotCount(bot_owner->CharacterID(), bot_count)) {
if (!database.botdb.QueryBotCount(bot_owner->CharacterID(), bot_count)) {
bot_owner->Message(m_fail, "%s", BotDatabase::fail::QueryBotCount());
return bot_id;
}