mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
Bots- added out of combat bard songs & #bot bardoutofcombat on|off command to turn them on/off.
This commit is contained in:
@@ -66,6 +66,7 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, 0, 0, 0, 0,
|
||||
SetHealRotationNextHealTime(0);
|
||||
SetHealRotationTimer(0);
|
||||
SetNumHealRotationMembers(0);
|
||||
SetBardUseOutOfCombatSongs(GetClass() == BARD);
|
||||
CalcChanceToCast();
|
||||
rest_timer.Disable();
|
||||
|
||||
@@ -11691,6 +11692,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
// c->Message(0, "#bot illusion <bot/client name or target> - Enchanter Bot cast an illusion buff spell on you or your target.");
|
||||
c->Message(0, "#bot pull [<bot name>] [target] - Bot Pulling Target NPC's");
|
||||
c->Message(0, "#bot setinspectmessage - Copies your inspect message to a targeted bot that you own");
|
||||
c->Message(0, "#bot bardoutofcombat [on|off] - Determines wheter bard bots use out of combat songs.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15980,6 +15982,39 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "bardoutofcombat")) {
|
||||
bool useOutOfCombatSongs = false;
|
||||
|
||||
if(sep->arg[2] && sep->arg[3]){
|
||||
if(!strcasecmp(sep->arg[2], "on"))
|
||||
useOutOfCombatSongs = true;
|
||||
else if (!strcasecmp(sep->arg[2], "off"))
|
||||
useOutOfCombatSongs = false;
|
||||
else {
|
||||
c->Message(0, "Usage #bot bardoutofcombat [on|off]");
|
||||
return;
|
||||
}
|
||||
|
||||
Mob *target = c->GetTarget();
|
||||
|
||||
if(target->IsBot() && (c == target->GetOwner()->CastToClient())) {
|
||||
Bot* bardBot = target->CastToBot();
|
||||
|
||||
if(bardBot) {
|
||||
bardBot->SetBardUseOutOfCombatSongs(useOutOfCombatSongs);
|
||||
c->Message(0, "Bard use of out of combat songs updated.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(0, "Your target must be a bot that you own.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(0, "Usage #bot bardoutofcombat [on|off]");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// franck: EQoffline
|
||||
|
||||
@@ -464,6 +464,7 @@ public:
|
||||
uint8 GetNumHealRotationMembers () { return _numHealRotationMembers; }
|
||||
uint32 GetHealRotationNextHealTime() { return _healRotationNextHeal; }
|
||||
uint32 GetHealRotationTimer () { return _healRotationTimer; }
|
||||
bool GetBardUseOutOfCombatSongs() { return _bardUseOutOfCombatSongs;}
|
||||
inline virtual int16 GetAC() const { return AC; }
|
||||
inline virtual int16 GetSTR() const { return STR; }
|
||||
inline virtual int16 GetSTA() const { return STA; }
|
||||
@@ -548,6 +549,7 @@ public:
|
||||
void SetHealRotationNextHealTime( uint32 nextHealTime ) { _healRotationNextHeal = nextHealTime; }
|
||||
void SetHealRotationTimer( uint32 timer ) { _healRotationTimer = timer; }
|
||||
void SetNumHealRotationMembers( uint8 numMembers ) { _numHealRotationMembers = numMembers; }
|
||||
void SetBardUseOutOfCombatSongs(bool useOutOfCombatSongs) { _bardUseOutOfCombatSongs = useOutOfCombatSongs;}
|
||||
|
||||
// Class Destructors
|
||||
virtual ~Bot();
|
||||
@@ -621,6 +623,7 @@ private:
|
||||
uint8 _numHealRotationMembers;
|
||||
std::map<uint32, BotAA> botAAs;
|
||||
InspectMessage_Struct _botInspectMessage;
|
||||
bool _bardUseOutOfCombatSongs;
|
||||
|
||||
// Private "base stats" Members
|
||||
int16 _baseMR;
|
||||
|
||||
@@ -1025,7 +1025,7 @@ bool Bot::AI_IdleCastCheck() {
|
||||
// bard bots
|
||||
if(!AICastSpell(this, 100, SpellType_Cure)) {
|
||||
if(!AICastSpell(this, 100, SpellType_Heal)) {
|
||||
if(!RuleB(Bots, BotBardUseOutOfCombatSongs) || !AICastSpell(this, 100, SpellType_Buff)) { // skips if rule is false
|
||||
if((!RuleB(Bots, BotBardUseOutOfCombatSongs) || !GetBardUseOutOfCombatSongs()) || !AICastSpell(this, 100, SpellType_Buff)) { // skips if rule is false
|
||||
if(!AICastSpell(this, 100, SpellType_InCombatBuff)) { // this tries to keep some combat buffs on the group until engaged code can pick up the buffing
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user