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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-07-2008, 07:12 AM
LordKahel
Fire Beetle
 
Join Date: Sep 2007
Posts: 22
Default Adding a Item Shielding Cap Rule

This will add a rule to cap Item Shielding to the amount needed . I think live capped it at 30. This is the default value.


In ruletypes.h add the bold line to the Character category

Code:
RULE_CATEGORY( Character )
RULE_INT ( Character, MaxLevel, 65 )
RULE_INT ( Character, DeathExpLossLevel, 10 )
RULE_INT ( Character, DeathItemLossLevel, 10 )
RULE_INT ( Character, CorpseDecayTimeMS, 10800000 )
RULE_BOOL( Character, LeaveCorpses, false )
RULE_BOOL( Character, LeaveNakedCorpses, false )
RULE_REAL( Character, ExpMultiplier, 1.0 )
RULE_INT ( Character, AutosaveIntervalS, 300 )	//0=disabled
RULE_INT ( Character, HPRegenMultiplier, 100)
RULE_INT ( Character, ManaRegenMultiplier, 100)
RULE_INT ( Character, EnduranceRegenMultiplier, 100)
RULE_INT ( Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow
RULE_BOOL( Character, HealOnLevel, false)
RULE_BOOL( Character, FeignKillsPet, false)
RULE_INT ( Character, ItemManaRegenCap, 15)
RULE_INT ( Character, ItemHealthRegenCap, 35)
RULE_INT ( Character, ItemShieldingCap, 30)
RULE_CATEGORY_END()

In attack.cpp change the following line from the void Mob::MeleeMitigation function

CHANGE
Code:
totalMit += (defender->spellbonuses.MeleeMitigation + defender->itembonuses.MeleeMitigation);
TO

Code:
	int itemMit = (RuleI(Character, ItemShieldingCap) < defender->itembonuses.MeleeMitigation) ? RuleI(Character, ItemShieldingCap) : defender->itembonuses.MeleeMitigation ;	
	totalMit += (defender->spellbonuses.MeleeMitigation + itemMit);
This will prevent players from getting a shielding too high and reduce nearly all damage. It can now be capped like on live.

--
Pyronis / kahel
Dev - Jest 3 Server

Last edited by LordKahel; 03-07-2008 at 03:14 PM.. Reason: typo
Reply With Quote
 


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