Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-26-2020, 11:46 AM
Elysius
Sarnak
 
Join Date: Dec 2005
Posts: 43
Default Adding +crit chance to items

I'd like to change the advanced item effect of Accuracy to a % increase to melee Critical Hit. Here's my code edit on attack.cpp (my addition in bold):

Code:
//2: Try Melee Critical

	//Base critical rate for all classes is dervived from DEX stat, this rate is then augmented
	//by item,spell and AA bonuses allowing you a chance to critical hit. If the following rules
	//are defined you will have an innate chance to hit at Level 1 regardless of bonuses.
	//Warning: Do not define these rules if you want live like critical hits.
	critChance += RuleI(Combat, MeleeBaseCritChance);

	if(IsClient())
		critChance += RuleI(Combat, ClientBaseCritChance);
		
		int ItemCritChance = itembonuses.HitChance;	
	
		critChance += ItemCritChance;

	bool IsBerserk = false;
	if(((GetClass() == WARRIOR || GetClass() == BERSERKER) && GetLevel() >= 12 && IsClient()))
	{
		if(CastToClient()->berserk){
			critChance += RuleI(Combat, BerserkBaseCritChance);
			IsBerserk = true;
		}

		else
			critChance += RuleI(Combat, WarBerBaseCritChance);
	}

	if(skill == SkillArchery && GetClass() == RANGER && GetSkill(SkillArchery) >= 65)
		critChance += 25;

	if(skill == SkillThrowing && GetClass() == ROGUE && GetSkill(SkillThrowing) >= 65)
		critChance += 6;

	int CritChanceBonus = GetCriticalChanceBonus(skill);
It compiles no problem, but now zone.exe will crash upon loading. I can't zone in from character select. Here's the error it throws at me in the log file:

Code:
04.26. - 09:12:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77146A14) 
[04.26. - 09:12:14] 77146A14 (KERNEL32): (filename not available): BaseThreadInitThunk 
[04.26. - 09:12:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7751AB4F) 
[04.26. - 09:12:14] 7751AB4F (ntdll): (filename not available): RtlInitializeExceptionChain 
[04.26. - 09:12:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7751AB1A) 
[04.26. - 09:12:14] 7751AB1A (ntdll): (filename not available): RtlInitializeExceptionChain
Any ideas what I did wrong? Thanks
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 03:03 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