mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Added BARD to available class Bot stop_melee_level criteria
This commit is contained in:
parent
2c8b51fcda
commit
e050534378
@ -573,6 +573,20 @@ bool IsNonSpellFighterClass(uint8 class_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsHybridClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case PALADIN:
|
||||||
|
case RANGER:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case BARD:
|
||||||
|
case BEASTLORD:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool IsCasterClass(uint8 class_id)
|
bool IsCasterClass(uint8 class_id)
|
||||||
{
|
{
|
||||||
switch (class_id) {
|
switch (class_id) {
|
||||||
|
|||||||
@ -135,6 +135,7 @@ uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit);
|
|||||||
bool IsFighterClass(uint8 class_id);
|
bool IsFighterClass(uint8 class_id);
|
||||||
bool IsSpellFighterClass(uint8 class_id);
|
bool IsSpellFighterClass(uint8 class_id);
|
||||||
bool IsNonSpellFighterClass(uint8 class_id);
|
bool IsNonSpellFighterClass(uint8 class_id);
|
||||||
|
bool IsHybridClass(uint8 class_id);
|
||||||
bool IsCasterClass(uint8 class_id);
|
bool IsCasterClass(uint8 class_id);
|
||||||
bool IsINTCasterClass(uint8 class_id);
|
bool IsINTCasterClass(uint8 class_id);
|
||||||
bool IsWISCasterClass(uint8 class_id);
|
bool IsWISCasterClass(uint8 class_id);
|
||||||
|
|||||||
@ -1822,7 +1822,7 @@ sub quest_files_fetch {
|
|||||||
print "[Update] No Quest Updates found... \n\n";
|
print "[Update] No Quest Updates found... \n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
rmtree("updates_staged/");
|
rmtree("updates_staged/");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub lua_modules_fetch {
|
sub lua_modules_fetch {
|
||||||
|
|||||||
12
zone/bot.cpp
12
zone/bot.cpp
@ -2481,7 +2481,7 @@ void Bot::SetTarget(Mob* mob) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Bot::SetStopMeleeLevel(uint8 level) {
|
void Bot::SetStopMeleeLevel(uint8 level) {
|
||||||
if (IsCasterClass(GetClass()) || IsSpellFighterClass(GetClass()))
|
if (IsCasterClass(GetClass()) || IsHybridClass(GetClass()))
|
||||||
_stopMeleeLevel = level;
|
_stopMeleeLevel = level;
|
||||||
else
|
else
|
||||||
_stopMeleeLevel = 255;
|
_stopMeleeLevel = 255;
|
||||||
@ -2506,10 +2506,10 @@ void Bot::SetHoldMode() {
|
|||||||
// AI Processing for the Bot object
|
// AI Processing for the Bot object
|
||||||
|
|
||||||
constexpr float MAX_CASTER_DISTANCE[PLAYER_CLASS_COUNT] = {
|
constexpr float MAX_CASTER_DISTANCE[PLAYER_CLASS_COUNT] = {
|
||||||
0, (34 * 34), (24 * 24), (28 * 28), (26 * 26), (42 * 42), 0, 0, 0, (38 * 38), (54 * 54), (48 * 48), (52 * 52), (50 * 50), (30 * 30), 0
|
0, (34 * 34), (24 * 24), (28 * 28), (26 * 26), (42 * 42), 0, (30 * 30), 0, (38 * 38), (54 * 54), (48 * 48), (52 * 52), (50 * 50), (32 * 32), 0
|
||||||
// W C P R S D M B R S N W M E B B
|
// W C P R S D M B R S N W M E B B
|
||||||
// A L A N H R N R O H E I A N S E
|
// A L A N H R N R O H E I A N S E
|
||||||
// R R L G D U K D G M C Z G C T R
|
// R R L G D U K D G M C Z G C T R
|
||||||
};
|
};
|
||||||
|
|
||||||
void Bot::AI_Process()
|
void Bot::AI_Process()
|
||||||
@ -3390,7 +3390,7 @@ void Bot::AI_Process()
|
|||||||
BotRangedAttack(tar);
|
BotRangedAttack(tar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!IsBotArcher() && (IsBotNonSpellFighter() || GetLevel() < GetStopMeleeLevel())) {
|
else if (!IsBotArcher() && GetLevel() < GetStopMeleeLevel()) {
|
||||||
|
|
||||||
// We can't fight if we don't have a target, are stun/mezzed or dead..
|
// We can't fight if we don't have a target, are stun/mezzed or dead..
|
||||||
// Stop attacking if the target is enraged
|
// Stop attacking if the target is enraged
|
||||||
|
|||||||
@ -6145,7 +6145,7 @@ void bot_subcommand_bot_stop_melee_level(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
if (helper_is_help_or_usage(sep->arg[1])) {
|
if (helper_is_help_or_usage(sep->arg[1])) {
|
||||||
c->Message(m_usage, "usage: <target_bot> %s [current | reset | sync | value: 0-255]", sep->arg[0]);
|
c->Message(m_usage, "usage: <target_bot> %s [current | reset | sync | value: 0-255]", sep->arg[0]);
|
||||||
c->Message(m_note, "note: Only caster and spell-casting fighter class bots may be modified");
|
c->Message(m_note, "note: Only caster or hybrid class bots may be modified");
|
||||||
c->Message(m_note, "note: Use [reset] to set stop melee level to server rule");
|
c->Message(m_note, "note: Use [reset] to set stop melee level to server rule");
|
||||||
c->Message(m_note, "note: Use [sync] to set stop melee level to current bot level");
|
c->Message(m_note, "note: Use [sync] to set stop melee level to current bot level");
|
||||||
return;
|
return;
|
||||||
@ -6156,8 +6156,8 @@ void bot_subcommand_bot_stop_melee_level(Client *c, const Seperator *sep)
|
|||||||
c->Message(m_fail, "You must <target> a bot that you own to use this command");
|
c->Message(m_fail, "You must <target> a bot that you own to use this command");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!IsCasterClass(my_bot->GetClass()) && !IsSpellFighterClass(my_bot->GetClass())) {
|
if (!IsCasterClass(my_bot->GetClass()) && !IsHybridClass(my_bot->GetClass())) {
|
||||||
c->Message(m_fail, "You must <target> a caster or spell-casting fighter class bot to use this command");
|
c->Message(m_fail, "You must <target> a caster or hybrid class bot to use this command");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user