Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2011, 01:08 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default COMMITTED: Bot enduring breath fix

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;
 			}
 		}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:00 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3