diff --git a/common/crash.cpp b/common/crash.cpp index 2c720715e..d432d9116 100644 --- a/common/crash.cpp +++ b/common/crash.cpp @@ -27,7 +27,7 @@ void SendCrashReport(const std::string &crash_report) // "http://localhost:3010/api/v1/server-crash-report", // development }; - auto config = EQEmuConfig::get(); + auto config = EQEmuConfig::get(); for (auto &e: endpoints) { uri u(e); diff --git a/zone/attack.cpp b/zone/attack.cpp index 5d6d2350b..8136fe5e0 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2770,7 +2770,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy } } - if (killer_mob->IsBot()) { + if (killer_mob && killer_mob->IsBot()) { parse->EventBot(EVENT_NPC_SLAY, killer_mob->CastToBot(), this, "", 0); killer_mob->TrySpellOnKill(killed_level, spell); } diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 1b3c66348..f812c4d6c 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -7192,7 +7192,13 @@ void bot_subcommand_botgroup_add_member(Client *c, const Seperator *sep) std::list sbl; MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]); if (sbl.empty()) { - c->Message(Chat::White, "You must name a new member as a bot that you own to use this command."); + c->Message( + Chat::White, + fmt::format( + "Usage: () {} [member_name]", + sep->arg[0] + ).c_str() + ); return; } diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 1bac31359..28c62b541 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -2358,7 +2358,7 @@ bool BotDatabase::LoadLeaderIDByBotGroupID(const uint32 group_id, uint32& leader bool BotDatabase::LoadBotGroupNameByBotGroupID(const uint32 group_id, std::string& botgroup_name) { if (!group_id) { - false; + return false; } query = fmt::format( @@ -2624,7 +2624,7 @@ bool BotDatabase::LoadBotGroupsListByOwnerID(const uint32 owner_id, std::listGetMaxHP() * effect_value / 1000); + if (caster) { + effect_value = spells[spell_id].limit_value[i]; + int64 amt = std::abs(caster->GetMaxHP() * effect_value / 1000); - if (effect_value < 0) { - Damage(caster, amt, spell_id, spell.skill, false, buffslot, false); - } - else { - HealDamage(amt, caster); + if (effect_value < 0) { + Damage(caster, amt, spell_id, spell.skill, false, buffslot, false); + } + else { + HealDamage(amt, caster); + } } break; }