Fixed issue where levels were off by one.
Added Beastlord to classes able to cast enduring breath
Removed outside only check that looks like it was copy/pasted from sow.
Code:
Index: trunk/EQEmuServer/zone/bot.cpp
===================================================================
--- trunk/EQEmuServer/zone/bot.cpp (revision 1994)
+++ trunk/EQEmuServer/zone/bot.cpp (working copy)
@@ -12260,7 +12260,7 @@
int32 EndurerClass = 0;
Group *g = c->GetGroup();
if(g) {
- for(int i=0; i<MAX_GROUP_MEMBERS; i++){
+ for(int i=0; i<MAX_GROUP_MEMBERS; i++) {
if(g->members[i] && g->members[i]->IsBot()) {
switch(g->members[i]->GetClass()) {
case DRUID:
@@ -12268,13 +12268,13 @@
EndurerClass = DRUID;
break;
case SHAMAN:
- if (EndurerClass != DRUID){
+ if (EndurerClass != DRUID) {
Endurer = g->members[i];
EndurerClass = SHAMAN;
}
break;
case ENCHANTER:
- if(EndurerClass == 0){
+ if(EndurerClass == 0) {
Endurer = g->members[i];
EndurerClass = ENCHANTER;
}
@@ -12285,6 +12285,12 @@
EndurerClass = RANGER;
}
break;
+ case BEASTLORD:
+ if(EndurerClass == 0) {
+ Endurer = g->members[i];
+ EndurerClass = BEASTLORD;
+ }
+ break;
default:
break;
}
@@ -12292,48 +12298,52 @@
}
switch(EndurerClass) {
case DRUID:
-
- if (c->GetLevel() <= 6) {
+ if (c->GetLevel() < 6) {
Endurer->Say("I'm not level 6 yet.");
}
- else if (zone->CanCastOutdoor()) {
+ else {
Endurer->Say("Casting Enduring Breath...");
Endurer->CastSpell(86, c->GetID(), 1, -1, -1);
- break;
}
break;
case SHAMAN:
-
- if ((zone->CanCastOutdoor()) && (c->GetLevel() >= 12)) {
+ if (c->GetLevel() < 12) {
+ Endurer->Say("I'm not level 12 yet.");
+ }
+ else {
Endurer->Say("Casting Enduring Breath...");
- Endurer->CastToClient()->CastSpell(86, c->GetID(), 1, -1, -1);
+ Endurer->CastSpell(86, c->GetID(), 1, -1, -1);
}
- else if (c->GetLevel() <= 12) {
- Endurer->Say("I'm not level 12 yet.");
- }
break;
case RANGER:
-
- if((zone->CanCastOutdoor()) && (c->GetLevel() >= 20)){
+ if (c->GetLevel() < 20) {
+ Endurer->Say("I'm not level 20 yet.");
+ }
+ else {
Endurer->Say("Casting Enduring Breath...");
- Endurer->CastToClient()->CastSpell(86, c->GetID(), 1, -1, -1);
+ Endurer->CastSpell(86, c->GetID(), 1, -1, -1);
}
- else if (c->GetLevel() <= 20) {
- Endurer->Say("I'm not level 20 yet.");
- }
break;
case ENCHANTER:
-
- if((zone->CanCastOutdoor()) && (c->GetLevel() >= 12)) {
+ if (c->GetLevel() < 12) {
+ Endurer->Say("I'm not level 12 yet.");
+ }
+ else {
Endurer->Say("Casting Enduring Breath...");
- Endurer->CastToClient()->CastSpell(86, c->GetID(), 1, -1, -1);
+ Endurer->CastSpell(86, c->GetID(), 1, -1, -1);
}
- else if (c->GetLevel() <= 12) {
- Endurer->Say("I'm not level 12 yet.");
+ break;
+ case BEASTLORD:
+ if (c->GetLevel() < 25) {
+ Endurer->Say("I'm not level 25 yet.");
}
+ else {
+ Endurer->Say("Casting Enduring Breath...");
+ Endurer->CastSpell(86, c->GetID(), 1, -1, -1);
+ }
break;
default:
- c->Message(15, "You must have a Druid, Shaman, Ranger, or Enchanter in your group.");
+ c->Message(15, "You must have a Druid, Shaman, Ranger, Enchanter, or Beastlord in your group.");
break;
}
}