Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2003, 04:39 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default Code for Healing Adept and Healing Gift cleric AAs - UPDATED

The following are additions to the SE_CurrentHP code in spells.cpp to allow players to increase their heal values by a certain percentage permenantly, as well as crit their heals for double the value of the spell on occasion.

zone/spells.cpp ~line 1907 change:

Code:
		else if (spells[spell_id].effectid[i] == SE_CurrentHP && dmg > 0) {
			if (caster && caster->IsClient()) {
				dmg = caster->CastToClient()->GetActSpellValue(spell_id, dmg);
			}
		}
To:

Code:
		else if (spells[spell_id].effectid[i] == SE_CurrentHP && dmg > 0) {
			if (caster && caster->IsClient()) {
				dmg = caster->CastToClient()->GetActSpellValue(spell_id, dmg);
				
				/*healing adept*/

                uint8 *aa_item = &(((uint8 *)&caster->CastToClient()->aa)[18]);

				if(*aa_item == 1) { dmg = dmg*1.02; }
            if(*aa_item == 2) { dmg = dmg*1.05; }
				if(*aa_item == 3) { dmg = dmg*1.10; }

				int chance =0;float ratio =1.0;

				/*healing gift*/

                uint8 *aa_item2 = &(((uint8 *)&caster->CastToClient()->aa)[19]);

				if(*aa_item2 == 1) {chance+=3; ratio += 1.0;}

				if(*aa_item2 == 2) {chance+=6; ratio += 1.0;}

				if(*aa_item2 == 3) {chance+=10; ratio += 1.0;}

				if(rand()%100 <= chance) { dmg*= ratio; 				
				
				CastToClient()->Message(0, "You perform an exceptional heal! (%d)", dmg); // crit message
				}
			}
		}
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #2  
Old 07-07-2003, 02:17 PM
Jong3503
Fire Beetle
 
Join Date: Feb 2003
Posts: 19
Default

toss me an email at callieaoem@yahoo.com bud.
Reply With Quote
  #3  
Old 07-07-2003, 02:26 PM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default

That would also effect any cleric or whatever direct damage spells, through a if(beneficial) in there
__________________
++[>++++++<-]>[<++++++>-]<.>++++[>+++++<-]>[<
+++++>-]<+.+++++++..+++.>>+++++[<++++++>-]<+
+.<<+++++++++++++++.>.+++.------.--------.>+.
Reply With Quote
  #4  
Old 07-08-2003, 03:08 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Ok, thanks kathgar for reminding me about the beneficial check - here's updated code with a beneficial check so it only improves heals.


zone/spells.cpp ~line 1907 change:

Code:
      else if (spells[spell_id].effectid[i] == SE_CurrentHP && dmg > 0) { 
         if (caster && caster->IsClient()) { 
            dmg = caster->CastToClient()->GetActSpellValue(spell_id, dmg); 
         } 
      }
To:

Code:
      else if (spells[spell_id].effectid[i] == SE_CurrentHP && dmg > 0) { 
         if (caster && caster->IsClient() && spells[spell_id].goodEffect == 1) { 
            dmg = caster->CastToClient()->GetActSpellValue(spell_id, dmg); 
             
            /*healing adept*/ 

                uint8 *aa_item = &(((uint8 *)&caster->CastToClient()->aa)[18]); 

            if(*aa_item == 1) { dmg = dmg*1.02; } 
            if(*aa_item == 2) { dmg = dmg*1.05; } 
            if(*aa_item == 3) { dmg = dmg*1.10; } 

            int chance =0;float ratio =1.0; 

            /*healing gift*/ 

                uint8 *aa_item2 = &(((uint8 *)&caster->CastToClient()->aa)[19]); 

            if(*aa_item2 == 1) {chance+=3; ratio += 1.0;} 

            if(*aa_item2 == 2) {chance+=6; ratio += 1.0;} 

            if(*aa_item2 == 3) {chance+=10; ratio += 1.0;} 

            if(rand()%100 <= chance) { dmg*= ratio; }
         } 
      }
Took out the crit message for now.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:34 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3