|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support::Windows Servers Support forum for Windows EQEMu users. |
|
|
|
04-26-2020, 11:46 AM
|
Sarnak
|
|
Join Date: Dec 2005
Posts: 43
|
|
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
|
|
|
|
|
|
|
04-27-2020, 12:27 PM
|
Sarnak
|
|
Join Date: Dec 2005
Posts: 43
|
|
It occurred to me maybe I should include the entire crash log file of zone.exe
Code:
---------------------------------------------
[04.26. - 21:25:21] Starting Log: logs/crash_zone_6564.log
[04.26. - 21:25:21] EXCEPTION_ACCESS_VIOLATION
[04.26. - 21:25:21] SymInit: Symbol-SearchPath: '.;C:\EQ\EQEmuServer;C:\EQ\EQEmuServer;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Jeff'
[04.26. - 21:25:21] OS-Version: 6.2.9200 () 0x100-0x1
[04.26. - 21:25:22] C:\EQ\EQEmuServer\zone.exe:zone.exe (00FE0000), size: 28889088 (result: 0), SymType: 'PDB', PDB: 'C:\EQ\EQEmuServer\zone.exe'
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (774C0000), size: 1503232 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 6.3.9600.19678
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\KERNEL32.DLL:KERNEL32.DLL (77130000), size: 1310720 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\KERNEL32.DLL', fileVersion: 6.3.9600.19538
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\KERNELBASE.dll:KERNELBASE.dll (76880000), size: 880640 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\KERNELBASE.dll', fileVersion: 6.3.9600.19671
[04.26. - 21:25:22] C:\WINDOWS\system32\apphelp.dll:apphelp.dll (70750000), size: 655360 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\apphelp.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\AppPatch\AcLayers.DLL:AcLayers.DLL (523A0000), size: 2584576 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\AppPatch\AcLayers.DLL', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\msvcrt.dll:msvcrt.dll (769B0000), size: 798720 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\msvcrt.dll', fileVersion: 7.0.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\USER32.dll:USER32.dll (76520000), size: 1392640 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\USER32.dll', fileVersion: 6.3.9600.19653
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\GDI32.dll:GDI32.dll (77280000), size: 1097728 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\GDI32.dll', fileVersion: 6.3.9600.19678
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\SHELL32.dll:SHELL32.dll (75020000), size: 19640320 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SHELL32.dll', fileVersion: 6.3.9600.19377
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\SHLWAPI.dll:SHLWAPI.dll (76C10000), size: 282624 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SHLWAPI.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\OLEAUT32.dll:OLEAUT32.dll (76F10000), size: 614400 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\OLEAUT32.dll', fileVersion: 6.3.9600.19556
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\MPR.dll:MPR.dll (71800000), size: 90112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MPR.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\SETUPAPI.dll:SETUPAPI.dll (74CA0000), size: 1773568 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SETUPAPI.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\sfc.dll:sfc.dll (6EE60000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\sfc.dll', fileVersion: 6.3.9600.16384
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\WINSPOOL.DRV:WINSPOOL.DRV (71160000), size: 413696 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINSPOOL.DRV', fileVersion: 6.3.9600.19293
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\RPCRT4.dll:RPCRT4.dll (76A80000), size: 761856 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\RPCRT4.dll', fileVersion: 6.3.9600.19538
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\combase.dll:combase.dll (76C60000), size: 1560576 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\combase.dll', fileVersion: 6.3.9600.19227
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\CFGMGR32.dll:CFGMGR32.dll (76840000), size: 245760 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CFGMGR32.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\SspiCli.dll:SspiCli.dll (76BF0000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SspiCli.dll', fileVersion: 6.3.9600.18454
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\sfc_os.DLL:sfc_os.DLL (6EE50000), size: 61440 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\sfc_os.DLL', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\CRYPTBASE.dll:CRYPTBASE.dll (74C90000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CRYPTBASE.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\sechost.dll:sechost.dll (762E0000), size: 266240 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\sechost.dll', fileVersion: 6.3.9600.17734
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll:bcryptPrimitives.dll (74C30000), size: 344064 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll', fileVersion: 6.3.9600.18895
[04.26. - 21:25:22] C:\WINDOWS\system32\IMM32.DLL:IMM32.DLL (74E60000), size: 159744 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\IMM32.DLL', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\MSCTF.dll:MSCTF.dll (76720000), size: 1122304 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSCTF.dll', fileVersion: 6.3.9600.19464
[04.26. - 21:25:22] C:\Perl\bin\perl512.dll:perl512.dll (28000000), size: 1273856 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\bin\perl512.dll', fileVersion: 5.12.3.1204
[04.26. - 21:25:22] C:\Program Files (x86)\Lua\5.1\lua51.dll:lua51.dll (10000000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Lua\5.1\lua51.dll', fileVersion: 5.1.4.0
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\WS2_32.dll:WS2_32.dll (76FB0000), size: 323584 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WS2_32.dll', fileVersion: 6.3.9600.18340
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (74700000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\VERSION.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\ADVAPI32.dll:ADVAPI32.dll (76E70000), size: 507904 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ADVAPI32.dll', fileVersion: 6.3.9600.18895
[04.26. - 21:25:22] C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.17810_none_7c5b6194aa0716f1\COMCTL32.dll:COMCTL32.dll (710D0000), size: 561152 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.17810_none_7c5b6194aa0716f1\COMCTL32.dll', fileVersion: 5.82.9600.17810
[04.26. - 21:25:22] C:\EQ\EQEmuServer\lua5.1.dll:lua5.1.dll (04860000), size: 167936 (result: 0), SymType: '-exported-', PDB: 'C:\EQ\EQEmuServer\lua5.1.dll', fileVersion: 5.1.4.0
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\NSI.dll:NSI.dll (76960000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\NSI.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.8428_none_d08a11e2442dc25d\MSVCR80.dll:MSVCR80.dll (70FE0000), size: 634880 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.8428_none_d08a11e2442dc25d\MSVCR80.dll', fileVersion: 8.0.50727.8428
[04.26. - 21:25:22] C:\WINDOWS\system32\napinsp.dll:napinsp.dll (71870000), size: 69632 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\napinsp.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\system32\pnrpnsp.dll:pnrpnsp.dll (71850000), size: 90112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\pnrpnsp.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\WINDOWS\system32\NLAapi.dll:NLAapi.dll (71830000), size: 81920 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\NLAapi.dll', fileVersion: 6.3.9600.18895
[04.26. - 21:25:22] C:\WINDOWS\System32\mswsock.dll:mswsock.dll (74470000), size: 307200 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\mswsock.dll', fileVersion: 6.3.9600.18340
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\DNSAPI.dll:DNSAPI.dll (71D00000), size: 516096 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DNSAPI.dll', fileVersion: 6.3.9600.19060
[04.26. - 21:25:22] C:\WINDOWS\System32\winrnr.dll:winrnr.dll (71820000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\winrnr.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\Program Files (x86)\Bonjour\mdnsNSP.dll:mdnsNSP.dll (718F0000), size: 135168 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Bonjour\mdnsNSP.dll', fileVersion: 3.0.0.10
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\Iphlpapi.DLL:Iphlpapi.DLL (747D0000), size: 131072 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\Iphlpapi.DLL', fileVersion: 6.3.9600.18264
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\WINNSI.DLL:WINNSI.DLL (746D0000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINNSI.DLL', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\Windows\System32\rasadhlp.dll:rasadhlp.dll (718E0000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\rasadhlp.dll', fileVersion: 6.3.9600.17415
[04.26. - 21:25:22] C:\Perl\lib\auto\Cwd\Cwd.dll:Cwd.dll (04960000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Cwd\Cwd.dll'
[04.26. - 21:25:22] C:\Perl\lib\auto\DBI\DBI.dll:DBI.dll (04AF0000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\DBI\DBI.dll'
[04.26. - 21:25:22] C:\Perl\lib\auto\List\Util\Util.dll:Util.dll (04970000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\List\Util\Util.dll'
[04.26. - 21:25:22] C:\Perl\lib\auto\Filter\Util\Call\Call.dll:Call.dll (04B10000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Filter\Util\Call\Call.dll'
[04.26. - 21:25:22] C:\Perl\lib\auto\IO\IO.dll:IO.dll (04B20000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\IO\IO.dll'
[04.26. - 21:25:22] C:\WINDOWS\System32\fwpuclnt.dll:fwpuclnt.dll (71890000), size: 286720 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\fwpuclnt.dll', fileVersion: 6.3.9600.19644
[04.26. - 21:25:22] C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (670D0000), size: 1314816 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dbghelp.dll', fileVersion: 6.3.9600.17787
[04.26. - 21:25:22] c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (1728): std::_Tree<std::_Tmap_traits<short,ItemInst *,std::less<short>,std::allocator<std::pair<short const ,ItemInst *> >,0> >::_Lbound
[04.26. - 21:25:22] c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (1455): std::_Tree<std::_Tmap_traits<short,ItemInst *,std::less<short>,std::allocator<std::pair<short const ,ItemInst *> >,0> >::lower_bound
[04.26. - 21:25:22] c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (1433): std::_Tree<std::_Tmap_traits<short,ItemInst *,std::less<short>,std::allocator<std::pair<short const ,ItemInst *> >,0> >::find
[04.26. - 21:25:22] c:\eq\source\common\item.cpp (1359): Inventory::_GetItem
[04.26. - 21:25:22] c:\eq\source\common\item.cpp (561): Inventory::GetItem
[04.26. - 21:25:22] c:\eq\source\zone\mob.cpp (1979): Mob::SetAttackTimer
[04.26. - 21:25:22] c:\eq\source\zone\bonuses.cpp (173): Client::CalcItemBonuses
[04.26. - 21:25:22] c:\eq\source\zone\bonuses.cpp (74): Client::CalcBonuses
[04.26. - 21:25:22] c:\eq\source\zone\client_packet.cpp (9057): Client::FinishConnState2
[04.26. - 21:25:22] c:\eq\source\zone\client_packet.cpp (8632): Client::DBAWComplete
[04.26. - 21:25:22] c:\eq\source\zone\zonedbasync.cpp (43): DispatchFinishedDBAsync
[04.26. - 21:25:22] c:\eq\source\zone\net.cpp (436): main
[04.26. - 21:25:22] f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (278): __tmainCRTStartup
[04.26. - 21:25:22] f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (189): mainCRTStartup
[04.26. - 21:25:22] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77146A14)
[04.26. - 21:25:22] 77146A14 (KERNEL32): (filename not available): BaseThreadInitThunk
[04.26. - 21:25:22] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7751AB4F)
[04.26. - 21:25:22] 7751AB4F (ntdll): (filename not available): RtlInitializeExceptionChain
[04.26. - 21:25:22] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7751AB1A)
[04.26. - 21:25:22] 7751AB1A (ntdll): (filename not available): RtlInitializeExceptionChain
Messed around the code a little further and tried to do some digging but still pretty lost. It seems other calculations within attack.cpp have no problem pulling up itembonuses.whatever so I really don't get why zone.exe crashes when I put a reference to it inside the critical chance formula.
|
|
|
|
05-01-2020, 10:22 PM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
How old is that source?
|
05-01-2020, 10:54 PM
|
Sarnak
|
|
Join Date: Dec 2005
Posts: 43
|
|
Circa 2013 baby!
|
05-02-2020, 02:33 PM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
Crash log doesn't really help when that code doesn't exist anymore when I go to look it up.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 10:15 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|