mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 17:43:52 +00:00
[Cleanup] Change level to bot_level in Bot::DoClassAttacks() to not overlap member variable (#3239)
# Notes - Member variable is named `level`, change variable to `bot_level` so we don't cause issues.
This commit is contained in:
parent
0297045cc5
commit
3d20c0d6aa
@ -5145,12 +5145,12 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
||||
|
||||
float HasteModifier = (GetHaste() * 0.01f);
|
||||
uint16 skill_to_use = -1;
|
||||
int level = GetLevel();
|
||||
int bot_level = GetLevel();
|
||||
int reuse = (TauntReuseTime * 1000);
|
||||
bool did_attack = false;
|
||||
switch (GetClass()) {
|
||||
case WARRIOR:
|
||||
if (level >= RuleI(Combat, NPCBashKickLevel)) {
|
||||
if (bot_level >= RuleI(Combat, NPCBashKickLevel)) {
|
||||
bool canBash = false;
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQ::invslot::slotSecondary) && m_inv.GetItem(EQ::invslot::slotSecondary)->GetItem()->ItemType == EQ::item::ItemTypeShield) || (m_inv.GetItem(EQ::invslot::slotPrimary) && m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1))
|
||||
canBash = true;
|
||||
@ -5170,7 +5170,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
||||
case CLERIC:
|
||||
case SHADOWKNIGHT:
|
||||
case PALADIN:
|
||||
if (level >= RuleI(Combat, NPCBashKickLevel)) {
|
||||
if (bot_level >= RuleI(Combat, NPCBashKickLevel)) {
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQ::invslot::slotSecondary) && m_inv.GetItem(EQ::invslot::slotSecondary)->GetItem()->ItemType == EQ::item::ItemTypeShield) || (m_inv.GetItem(EQ::invslot::slotPrimary) && m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1))
|
||||
skill_to_use = EQ::skills::SkillBash;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user