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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 03-08-2008, 09:00 AM
LordKahel
Fire Beetle
 
Join Date: Sep 2007
Posts: 22
Default Item Avoidance Cap

Here the code to add a cap to Item Avoidance bonus .


Add the blod line to ruletypes.h
Code:
RULE_INT ( Character, ItemManaRegenCap, 15)
RULE_INT ( Character, ItemHealthRegenCap, 35)
RULE_INT ( Character, ItemShieldingCap, 30)
RULE_INT ( Character, ItemAvoidanceCap, 100)
RULE_CATEGORY_END()
And in Mob::CheckHitChance in the file attack.cpp .

Change
Code:
	bonus = defender->spellbonuses.AvoidMeleeChance + defender->itembonuses.AvoidMeleeChance;
TO

Code:
	int itemAvoidance = (RuleI(Character,ItemAvoidanceCap) < defender->itembonuses.AvoidMeleeChance) ? RuleI(Character,ItemAvoidanceCap) : defender->itembonuses.AvoidMeleeChance;
	bonus = defender->spellbonuses.AvoidMeleeChance + itemAvoidance;
Reply With Quote
  #3  
Old 03-08-2008, 07:12 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Nice work! I was hoping to see something like this soon. Hope it makes it into the next release

This and your lore aug fix would both be great things to see in a future update
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 03-09-2008, 06:07 AM
Jibbatwinkers
Sarnak
 
Join Date: May 2006
Location: Cincinnati
Posts: 73
Default

Awesome! I hope this goes in on the next patch as well. I have been looking for a way to cap my shielding and didn't really want to go through so many items to make sure players weren't mitigating too much damage. Awesome work!
__________________
Lead GM ~ Zeb
Zeb Server
ZebServer.com
Reply With Quote
  #5  
Old 03-10-2008, 01:59 PM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

We at Jest Server are trying to help out best we can.

We're also very lucky to have Pyronis on our development team.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
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 01:24 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