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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2010, 01:48 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default COMMITTED: SE_EndurancePool

Pretty simple effect, increases or decreases the endurance pool, Spirit of Determination.

client mobs.cpp
Code:
Index: client_mods.cpp
===================================================================
--- client_mods.cpp	(revision 1604)
+++ client_mods.cpp	(working copy)
@@ -1773,9 +1773,26 @@
 void Client::CalcMaxEndurance()
 {
 	max_end = CalcBaseEndurance() + spellbonuses.Endurance + itembonuses.Endurance;
+	
+	int slot = GetBuffSlotFromType(SE_EndurancePool);
+	if(slot >= 0)
+	{
+		for(int i = 0; i < EFFECT_COUNT; i++)
+		{
+			if (spells[buffs[slot].spellid].effectid[i] == SE_EndurancePool)
+			{
+				max_end += spells[buffs[slot].spellid].base[i];
+			}
+		}
+	}
+	
 	if (cur_end > max_end) {
 		cur_end = max_end;
 	}
+	if (max_end < 0) {
+		max_end = 0;
+	}
+	
 }
 
 sint32 Client::CalcBaseEndurance()
Reply With Quote
  #2  
Old 07-16-2010, 07:58 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

forgot the requisite spell effects change...

Code:
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp	(revision 1604)
+++ spell_effects.cpp	(working copy)
@@ -2812,6 +2812,7 @@
 			case SE_LimitCastTime:
 			case SE_NoCombatSkills:
 			case SE_TriggerOnCast:
+			case SE_EndurancePool:
 			{
 				break;
 			}
Reply With Quote
  #3  
Old 11-04-2010, 07:39 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

Updated like the previous effect so that it uses the bonuses system so multiple spells will stack.

Code:
Index: bonuses.cpp
===================================================================
--- bonuses.cpp	(revision 1713)
+++ bonuses.cpp	(working copy)
@@ -1206,7 +1206,12 @@
 					newbon->Accuracy = effect_value;
 				break;
 			}
-
+			case SE_EndurancePool:
+			{
+				newbon->Endurance += effect_value;
+				break;
+			}
 		}
 	}
Index: client_mods.cpp
===================================================================
--- client_mods.cpp	(revision 1713)
+++ client_mods.cpp	(working copy)
@@ -1790,25 +1790,12 @@
 {
 	max_end = CalcBaseEndurance() + spellbonuses.Endurance + itembonuses.Endurance;
 	
-	int slot = GetBuffSlotFromType(SE_EndurancePool);
-	if(slot >= 0)
-	{
-		for(int i = 0; i < EFFECT_COUNT; i++)
-		{
-			if (spells[buffs[slot].spellid].effectid[i] == SE_EndurancePool)
-			{
-				max_end += spells[buffs[slot].spellid].base[i];
-			}
-		}
-	}
-	
 	if (cur_end > max_end) {
 		cur_end = max_end;
 	}
 	if (max_end < 0) {
 		max_end = 0;
 	}
-	
 }
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 10:32 PM.


 

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