Merge and compile fixes (non-bot, will do bots later)

This commit is contained in:
KimLS
2018-04-16 14:15:08 -07:00
184 changed files with 11873 additions and 4474 deletions
+25 -20
View File
@@ -3046,13 +3046,7 @@ void bot_command_guard(Client *c, const Seperator *sep)
sbl.remove(nullptr);
for (auto bot_iter : sbl) {
bot_iter->WipeHateList();
bot_iter->SetFollowID(0);
if (!bot_iter->GetPet())
continue;
bot_iter->GetPet()->WipeHateList();
bot_iter->GetPet()->SetFollowID(0);
bot_iter->SetGuardMode();
}
if (sbl.size() == 1)
Bot::BotGroupSay(sbl.front(), "Guarding this position");
@@ -5054,7 +5048,11 @@ void bot_subcommand_bot_spawn(Client *c, const Seperator *sep)
return;
}
my_bot->Spawn(c);
if (!my_bot->Spawn(c)) {
c->Message(m_fail, "Failed to spawn bot '%s' (id: %i)", bot_name.c_str(), bot_id);
safe_delete(my_bot);
return;
}
static const char* bot_spawn_message[16] = {
"A solid weapon is my ally!", // WARRIOR / 'generic'
@@ -5145,10 +5143,10 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep)
if (!bot_iter)
continue;
Bot::BotGroupSay(bot_iter, "Whee!");
//Bot::BotGroupSay(bot_iter, "Whee!");
bot_iter->WipeHateList();
bot_iter->SetTarget(bot_iter->GetBotOwner());
bot_iter->SetTarget(nullptr);
bot_iter->Warp(glm::vec3(c->GetPosition()));
bot_iter->DoAnim(0);
@@ -5156,7 +5154,7 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep)
continue;
bot_iter->GetPet()->WipeHateList();
bot_iter->GetPet()->SetTarget(bot_iter);
bot_iter->GetPet()->SetTarget(nullptr);
bot_iter->GetPet()->Warp(glm::vec3(c->GetPosition()));
}
@@ -5810,18 +5808,22 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
return;
}
if (!leader_id) {
c->Message(m_fail, "Can not locate bot-group leader id for '%s'", botgroup_name_arg.c_str());
c->Message(m_fail, "Cannot locate bot-group leader id for '%s'", botgroup_name_arg.c_str());
return;
}
auto botgroup_leader = Bot::LoadBot(leader_id);
if (!botgroup_leader) {
c->Message(m_fail, "Could not spawn bot-group leader for '%s'", botgroup_name_arg.c_str());
c->Message(m_fail, "Could not load bot-group leader for '%s'", botgroup_name_arg.c_str());
safe_delete(botgroup_leader);
return;
}
botgroup_leader->Spawn(c);
if (!botgroup_leader->Spawn(c)) {
c->Message(m_fail, "Could not spawn bot-group leader %s for '%s'", botgroup_leader->GetName(), botgroup_name_arg.c_str());
safe_delete(botgroup_leader);
return;
}
Group* group_inst = new Group(botgroup_leader);
@@ -5840,7 +5842,12 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
return;
}
botgroup_member->Spawn(c);
if (!botgroup_member->Spawn(c)) {
c->Message(m_fail, "Could not spawn bot '%s' (id: %i)", botgroup_member->GetName(), member_iter);
safe_delete(botgroup_member);
return;
}
Bot::AddBotToGroup(botgroup_member, group_inst);
}
@@ -7077,7 +7084,6 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep)
const EQEmu::ItemData* item = nullptr;
bool is2Hweapon = false;
std::string item_link;
EQEmu::SayLinkEngine linker;
linker.SetLinkType(EQEmu::saylink::SayLinkItemInst);
@@ -7098,8 +7104,7 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep)
}
linker.SetItemInst(inst);
item_link = linker.GenerateLink();
c->Message(m_message, "Using %s in my %s (slot %i)", item_link.c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i));
c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i));
++inventory_count;
}
@@ -7242,8 +7247,8 @@ void bot_subcommand_inventory_window(Client *c, const Seperator *sep)
std::string window_text;
//std::string item_link;
//Client::TextLink linker;
//linker.SetLinkType(linker.linkItemInst);
//EQEmu::SayLinkEngine linker;
//linker.SetLinkType(EQEmu::saylink::SayLinkItemInst);
for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) {
const EQEmu::ItemData* item = nullptr;