Fix for class Bot not honoring NPCType data reference

This commit is contained in:
Uleat
2019-01-26 22:30:49 -05:00
parent 2f3cd45c4a
commit 16036ab492
6 changed files with 311 additions and 176 deletions
+1 -10
View File
@@ -7707,16 +7707,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
return bot_id;
}
auto DefaultNPCTypeStruct = Bot::CreateDefaultNPCTypeStructForBot(
bot_name.c_str(),
"",
bot_owner->GetLevel(),
bot_race,
bot_class,
bot_gender
);
auto my_bot = new Bot(DefaultNPCTypeStruct, bot_owner);
auto my_bot = new Bot(Bot::CreateDefaultNPCTypeStructForBot(bot_name.c_str(), "", bot_owner->GetLevel(), bot_race, bot_class, bot_gender), bot_owner);
if (!my_bot->Save()) {
bot_owner->Message(m_unknown, "Failed to create '%s' due to unknown cause", my_bot->GetCleanName());