mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
Cleanup bot logic in TryBackstab
This commit is contained in:
@@ -727,19 +727,15 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (IsBot()) {
|
else if (IsBot()) {
|
||||||
const EQ::ItemInstance* inst = CastToBot()->GetBotItem(EQ::invslot::slotPrimary);
|
auto bot = CastToBot();
|
||||||
const EQ::ItemData* botpiercer = nullptr;
|
auto inst = bot->GetBotItem(EQ::invslot::slotPrimary);
|
||||||
|
auto bot_piercer = inst ? inst->GetItem() : nullptr;
|
||||||
|
|
||||||
if (inst) {
|
if (!bot_piercer || bot_piercer->ItemType != EQ::item::ItemType1HPiercing) {
|
||||||
botpiercer = inst->GetItem();
|
if (!bot->GetCombatRoundForAlerts()) {
|
||||||
|
bot->SetCombatRoundForAlerts();
|
||||||
|
bot->RaidGroupSay(this, "I can't backstab with this weapon!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!botpiercer || (botpiercer->ItemType != EQ::item::ItemType1HPiercing)) {
|
|
||||||
if (!CastToBot()->GetCombatRoundForAlerts()) {
|
|
||||||
CastToBot()->SetCombatRoundForAlerts();
|
|
||||||
CastToBot()->RaidGroupSay(this, "I can't backstab with this weapon!");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user