Fix for bot classes having skills they shouldn't. Please report any abnormalities.

Tweaked bot command 'itemuse' to exclude invalid dual-wield reporting
This commit is contained in:
Uleat 2019-12-10 20:19:43 -05:00
parent efd710855e
commit 1196abfda8
3 changed files with 43 additions and 45 deletions

View File

@ -8863,6 +8863,10 @@ void Bot::CalcBotStats(bool showtext) {
if(GetBotOwner()->GetLevel() != GetLevel()) if(GetBotOwner()->GetLevel() != GetLevel())
SetLevel(GetBotOwner()->GetLevel()); SetLevel(GetBotOwner()->GetLevel());
for (int sindex = 0; sindex <= EQEmu::skills::HIGHEST_SKILL; ++sindex) {
skills[sindex] = database.GetSkillCap(GetClass(), (EQEmu::skills::SkillType)sindex, GetLevel());
}
LoadAAs(); LoadAAs();
GenerateSpecialAttacks(); GenerateSpecialAttacks();

View File

@ -3644,38 +3644,31 @@ void bot_command_item_use(Client* c, const Seperator* sep)
for (auto slot_iter : equipable_slot_list) { for (auto slot_iter : equipable_slot_list) {
auto equipped_item = bot_iter->GetBotInv()[slot_iter]; // needs more failure criteria - this should cover the bulk for now
if (empty_only) { if (slot_iter == EQEmu::invslot::slotSecondary && item_data->Damage && !bot_iter->CanThisClassDualWield()) {
if (!equipped_item) { continue;
}
c->Message( auto equipped_item = bot_iter->GetBotInv()[slot_iter];
Chat::Say,
"[%s] says, 'I can use that for my %s!", if (equipped_item && !empty_only) {
text_link.c_str(),
EQEmu::invslot::GetInvPossessionsSlotName(slot_iter)
);
bot_iter->DoAnim(29);
}
}
else {
if (equipped_item) {
linker.SetItemInst(equipped_item); linker.SetItemInst(equipped_item);
c->Message( c->Message(
Chat::Say, Chat::Say,
"[%s] says, 'I can use that for my %s! (replaces: [%s])", "[%s] says, 'I can use that for my %s! (replaces: [%s])'",
text_link.c_str(), text_link.c_str(),
EQEmu::invslot::GetInvPossessionsSlotName(slot_iter), EQEmu::invslot::GetInvPossessionsSlotName(slot_iter),
linker.GenerateLink().c_str() linker.GenerateLink().c_str()
); );
bot_iter->DoAnim(29); bot_iter->DoAnim(29);
} }
else { else if (!equipped_item) {
c->Message( c->Message(
Chat::Say, Chat::Say,
"[%s] says, 'I can use that for my %s!", "[%s] says, 'I can use that for my %s!'",
text_link.c_str(), text_link.c_str(),
EQEmu::invslot::GetInvPossessionsSlotName(slot_iter) EQEmu::invslot::GetInvPossessionsSlotName(slot_iter)
); );
@ -3684,7 +3677,6 @@ void bot_command_item_use(Client* c, const Seperator* sep)
} }
} }
} }
}
void bot_command_levitation(Client *c, const Seperator *sep) void bot_command_levitation(Client *c, const Seperator *sep)
{ {

View File

@ -307,6 +307,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
// some overrides -- really we need to be able to set skills for mobs in the DB // some overrides -- really we need to be able to set skills for mobs in the DB
// There are some known low level SHM/BST pets that do not follow this, which supports // There are some known low level SHM/BST pets that do not follow this, which supports
// the theory of needing to be able to set skills for each mob separately // the theory of needing to be able to set skills for each mob separately
if (!IsBot()) {
if (moblevel > 50) { if (moblevel > 50) {
skills[EQEmu::skills::SkillDoubleAttack] = 250; skills[EQEmu::skills::SkillDoubleAttack] = 250;
skills[EQEmu::skills::SkillDualWield] = 250; skills[EQEmu::skills::SkillDualWield] = 250;
@ -318,6 +319,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
else { else {
skills[EQEmu::skills::SkillDoubleAttack] = moblevel * 5; skills[EQEmu::skills::SkillDoubleAttack] = moblevel * 5;
} }
}
ldon_trapped = false; ldon_trapped = false;
ldon_trap_type = 0; ldon_trap_type = 0;