mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Bots] Remove unused methods. (#2082)
- Remove Bot::BotTradeSwapItem(). - Remove Bot::ApplySpecialAttackMod().
This commit is contained in:
parent
c709a6aa8e
commit
b02008ec53
53
zone/bot.cpp
53
zone/bot.cpp
@ -2261,36 +2261,6 @@ bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Bot::ApplySpecialAttackMod(EQ::skills::SkillType skill, int32 &dmg, int32 &mindmg) {
|
||||
int item_slot = -1;
|
||||
//1: Apply bonus from AC (BOOT/SHIELD/HANDS) est. 40AC=6dmg
|
||||
switch (skill) {
|
||||
case EQ::skills::SkillFlyingKick:
|
||||
case EQ::skills::SkillRoundKick:
|
||||
case EQ::skills::SkillKick:
|
||||
item_slot = EQ::invslot::slotFeet;
|
||||
break;
|
||||
case EQ::skills::SkillBash:
|
||||
item_slot = EQ::invslot::slotSecondary;
|
||||
break;
|
||||
case EQ::skills::SkillDragonPunch:
|
||||
case EQ::skills::SkillEagleStrike:
|
||||
case EQ::skills::SkillTigerClaw:
|
||||
item_slot = EQ::invslot::slotHands;
|
||||
break;
|
||||
}
|
||||
|
||||
if (item_slot >= EQ::invslot::EQUIPMENT_BEGIN){
|
||||
const EQ::ItemInstance* inst = GetBotItem(item_slot);
|
||||
const EQ::ItemData* botweapon = nullptr;
|
||||
if(inst)
|
||||
botweapon = inst->GetItem();
|
||||
|
||||
if(botweapon)
|
||||
dmg += botweapon->AC * (RuleI(Combat, SpecialAttackACBonus))/100;
|
||||
}
|
||||
}
|
||||
|
||||
bool Bot::CanDoSpecialAttack(Mob *other) {
|
||||
//Make sure everything is valid before doing any attacks.
|
||||
if (!other) {
|
||||
@ -4150,29 +4120,6 @@ void Bot::BotRemoveEquipItem(int16 slot)
|
||||
SendAppearancePacket(AT_Light, GetActiveLightType());
|
||||
}
|
||||
|
||||
void Bot::BotTradeSwapItem(Client* client, int16 lootSlot, const EQ::ItemInstance* inst, const EQ::ItemInstance* inst_swap, uint32 equipableSlots, std::string* errorMessage, bool swap) {
|
||||
|
||||
if(!errorMessage->empty())
|
||||
return;
|
||||
|
||||
client->PushItemOnCursor(*inst_swap, true);
|
||||
|
||||
// Remove the item from the bot and from the bot's database records
|
||||
RemoveBotItemBySlot(lootSlot, errorMessage);
|
||||
|
||||
if(!errorMessage->empty())
|
||||
return;
|
||||
|
||||
this->BotRemoveEquipItem(lootSlot);
|
||||
|
||||
if(swap) {
|
||||
BotTradeAddItem(inst->GetItem()->ID, inst, inst->GetCharges(), equipableSlots, lootSlot, errorMessage);
|
||||
|
||||
if(!errorMessage->empty())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::BotTradeAddItem(uint32 id, const EQ::ItemInstance* inst, int16 charges, uint32 equipableSlots, uint16 lootSlot, std::string* errorMessage, bool addToDb)
|
||||
{
|
||||
if(addToDb) {
|
||||
|
||||
@ -194,7 +194,6 @@ public:
|
||||
virtual void RogueBackstab(Mob* other, bool min_damage = false, int ReuseTime = 10);
|
||||
virtual void RogueAssassinate(Mob* other);
|
||||
virtual void DoClassAttacks(Mob *target, bool IsRiposte=false);
|
||||
virtual void ApplySpecialAttackMod(EQ::skills::SkillType skill, int32 &dmg, int32 &mindmg);
|
||||
bool CanDoSpecialAttack(Mob *other);
|
||||
virtual int32 CheckAggroAmount(uint16 spellid);
|
||||
virtual void CalcBonuses();
|
||||
@ -345,7 +344,6 @@ public:
|
||||
virtual bool DoCastSpell(uint16 spell_id, uint16 target_id, EQ::spells::CastingSlot slot = EQ::spells::CastingSlot::Item, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 aa_id = 0);
|
||||
|
||||
// Bot Equipment & Inventory Class Methods
|
||||
void BotTradeSwapItem(Client* client, int16 lootSlot, const EQ::ItemInstance* inst, const EQ::ItemInstance* inst_swap, uint32 equipableSlots, std::string* errorMessage, bool swap = true);
|
||||
void BotTradeAddItem(uint32 id, const EQ::ItemInstance* inst, int16 charges, uint32 equipableSlots, uint16 lootSlot, std::string* errorMessage, bool addToDb = true);
|
||||
void EquipBot(std::string* errorMessage);
|
||||
bool CheckLoreConflict(const EQ::ItemData* item);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user