View Single Post
  #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