Randymarsh9
01-03-2014, 02:03 AM
I have been working on trying to manipulate spells through the source, and I have run into some issues. For now, all of my changes are done through modifying the spell_effects.cpp; however, I would really like to be able to consolidate my changes in the mod_functions.cpp.
I tried to move some of my changes over to the mod_effect_value function in mod_functions, but I cannot get it to work properly. For one, if I do IsDamageSpell(spell_id), it never returns as true, so I cannot modify damage spells. Additionally, if I do IsEffectInSpell(spell_id, SE_DamageShield), it will hit that section multiple times and has even caused some zone crashes when checking if the caster was a client in that section.
Finally, in mod_buff_duration, if I make any changes to the "res" variable that is returned, it has strange side effects. For instance, I made a shaman to test out buff durations increased by wisdom, and it worked; however, I noticed that when I cast multiple buffs, they would change each others' values. For instance, a dex buff would put my dex to 97, then a strength buff would put my str to 77 and my dex to 92. Recasting the dex buff would put it back at 97 and my str at 72.
Overall, I am seeing strange behavior from using the spell mod functions in the mod_functions.cpp, and I am curious if anyone has any better suggestions for handling changes to spell effects.
Randymarsh9
08-27-2015, 10:22 PM
I'm sorry to necro an old thread, but I recently started screwing around with an emulator server again and have recently ran into difficulties using the mod_effect_value function again, namely for heal over time spells.
Here is my rough draft of my mod_effect_value function I have been playing around with to try to iron out bugs.
int Mob::mod_effect_value(int effect_value, uint16 spell_id, int effect_type, Mob* caster)
{
if (IsDamageSpell(spell_id) )
{
if (!(this == caster))
{
effect_value *= (caster->GetINT() / 100.0);
}
}
else if (IsEffectHitpointsSpell(spell_id) || IsHealOverTimeSpell(spell_id))
{
effect_value *= (caster->GetWIS() / 100.0);
}
else if (IsRuneSpell(spell_id))
{
effect_value *= (STA / 100.0);
}
return(effect_value);
}
After some testing, it appears that Nukes, DoTs, lifetaps, and direct heals seem to be working as intended. Also, to get IsDamageSpell to include DoTs as well, I just modified the function like so...
bool IsDamageSpell(uint16 spellid)
{
for (int o = 0; o < EFFECT_COUNT; o++) {
uint32 tid = spells[spellid].effectid[o];
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP || tid == SE_BardAEDot ) &&
spells[spellid].targettype != ST_Tap && //Removed && spells[spellid].buffduration < 1 after ST_TAP
spells[spellid].base[o] < 0)
return true;
}
return false;
}
I included that just in case that check was more important than I realized.
My problem is, whenever I cast a heal over time spell, I get the following exception when debugging the zone in Visual Studio
First-chance exception at 0x01B237A0 in zone.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x01B237A0 in zone.exe: 0xC0000005: Access violation reading location 0x00000000.
Also, in the crash log there is the following
(I shortened the path to my executables and source just for clarity since they're long)
[08-27-2015 :: 21:15:03] [Crash] EXCEPTION_ACCESS_VIOLATION
[08-27-2015 :: 21:15:03] [Crash] SymInit: Symbol-SearchPath: '.;[Path]\EQEmuServer;[Path]\EQEmuServer;C:\Windows;C:\Windows\system32;SRV*C: \websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Leonard'
[08-27-2015 :: 21:15:03] [Crash] OS-Version: 6.1.7601 (Service Pack 1) 0x100-0x1
[08-27-2015 :: 21:15:03] [Crash] [Path]\EQEmuServer\zone.exe:zone.exe (013C0000), size: 19853312 (result: 0), SymType: 'PDB', PDB: '[Path]\EQEmuServer\zone.exe'
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\SysWOW64\ntdll.dll:ntdll.dll (772E0000), size: 1572864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\ntdll.dll', fileVersion: 6.1.7601.18869
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\kernel32.dll:kernel32.dll (75B10000), size: 1114112 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\kernel32.dll', fileVersion: 6.1.7601.18869
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\KERNELBASE.dll:KERNELBASE.dll (76100000), size: 290816 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\KERNELBASE.dll', fileVersion: 6.1.7601.18869
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\bin\perl512.dll:perl512.dll (28000000), size: 1273856 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\bin\perl512.dll', fileVersion: 5.12.4.1205
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\USER32.dll:USER32.dll (76190000), size: 1048576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USER32.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\GDI32.dll:GDI32.dll (75A30000), size: 589824 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\GDI32.dll', fileVersion: 6.1.7601.18898
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\LPK.dll:LPK.dll (75310000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\LPK.dll', fileVersion: 6.1.7601.18923
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\USP10.dll:USP10.dll (75800000), size: 643072 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USP10.dll', fileVersion: 1.626.7601.18454
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\msvcrt.dll:msvcrt.dll (75490000), size: 704512 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\msvcrt.dll', fileVersion: 7.0.7601.17744
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\ADVAPI32.dll:ADVAPI32.dll (75260000), size: 659456 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\ADVAPI32.dll', fileVersion: 6.1.7601.18869
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\SysWOW64\sechost.dll:sechost.dll (759D0000), size: 102400 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\sechost.dll', fileVersion: 6.1.7601.18869
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\RPCRT4.dll:RPCRT4.dll (755A0000), size: 983040 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\RPCRT4.dll', fileVersion: 6.1.7601.18912
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\SspiCli.dll:SspiCli.dll (74C50000), size: 393216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SspiCli.dll', fileVersion: 6.1.7601.18912
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\CRYPTBASE.dll:CRYPTBASE.dll (74C40000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\CRYPTBASE.dll', fileVersion: 6.1.7601.18912
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec8 6b8d6858ec0bc\COMCTL32.dll:COMCTL32.dll (68790000), size: 540672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec8 6b8d6858ec0bc\COMCTL32.dll', fileVersion: 5.82.7601.18837
[08-27-2015 :: 21:15:03] [Crash] [Path]\EQEmuServer\lua51.dll:lua51.dll (0F640000), size: 356352 (result: 0), SymType: '-exported-', PDB: '[Path]\EQEmuServer\lua51.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\MSVCR110.dll:MSVCR110.dll (0FBF0000), size: 876544 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSVCR110.dll', fileVersion: 11.0.51106.1
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\WS2_32.dll:WS2_32.dll (76150000), size: 217088 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\WS2_32.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\NSI.dll:NSI.dll (75A20000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\NSI.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\VERSION.dll:VERSION.dll (74B20000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\VERSION.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\apphelp.dll:apphelp.dll (73B60000), size: 311296 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\apphelp.dll', fileVersion: 6.1.7601.18777
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\AppPatch\AcLayers.DLL:AcLayers.DLL (5F140000), size: 577536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\AppPatch\AcLayers.DLL', fileVersion: 6.1.7601.17974
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\SHELL32.dll:SHELL32.dll (76290000), size: 12890112 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SHELL32.dll', fileVersion: 6.1.7601.18762
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\SHLWAPI.dll:SHLWAPI.dll (75430000), size: 356352 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SHLWAPI.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\ole32.dll:ole32.dll (756A0000), size: 1425408 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\ole32.dll', fileVersion: 6.1.7601.18915
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\OLEAUT32.dll:OLEAUT32.dll (758D0000), size: 585728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\OLEAUT32.dll', fileVersion: 6.1.7601.18679
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\USERENV.dll:USERENV.dll (75A00000), size: 94208 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USERENV.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\profapi.dll:profapi.dll (75D40000), size: 45056 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Windows\syswow64\profapi.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\WINSPOOL.DRV:WINSPOOL.DRV (74AC0000), size: 331776 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINSPOOL.DRV', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\MPR.dll:MPR.dll (715C0000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MPR.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\IMM32.DLL:IMM32.DLL (75540000), size: 393216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IMM32.DLL', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\MSCTF.dll:MSCTF.dll (74CC0000), size: 835584 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\MSCTF.dll', fileVersion: 6.1.7601.18731
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\NLAapi.dll:NLAapi.dll (713D0000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\NLAapi.dll', fileVersion: 6.1.7601.18685
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\napinsp.dll:napinsp.dll (713E0000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\napinsp.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\pnrpnsp.dll:pnrpnsp.dll (71390000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\pnrpnsp.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\System32\mswsock.dll:mswsock.dll (74460000), size: 245760 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\mswsock.dll', fileVersion: 6.1.7601.18254
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\DNSAPI.dll:DNSAPI.dll (71570000), size: 278528 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DNSAPI.dll', fileVersion: 6.1.7601.17570
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\System32\winrnr.dll:winrnr.dll (713C0000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\winrnr.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Program Files (x86)\Bonjour\mdnsNSP.dll:mdnsNSP.dll (71360000), size: 135168 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Bonjour\mdnsNSP.dll', fileVersion: 3.0.0.10
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\Iphlpapi.DLL:Iphlpapi.DLL (74260000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\Iphlpapi.DLL', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\WINNSI.DLL:WINNSI.DLL (74250000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINNSI.DLL', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] c:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL:WLIDNSP.DLL (71330000), size: 147456 (result: 0), SymType: '-exported-', PDB: 'c:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL', fileVersion: 6.500.3165.0
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\syswow64\PSAPI.DLL:PSAPI.DLL (75D60000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\PSAPI.DLL', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\rasadhlp.dll:rasadhlp.dll (73C70000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\rasadhlp.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\System32\wshtcpip.dll:wshtcpip.dll (74450000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\wshtcpip.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\lib\auto\Cwd\Cwd.dll:Cwd.dll (10000000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Cwd\Cwd.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\lib\auto\DBI\DBI.dll:DBI.dll (008F0000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\DBI\DBI.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\lib\auto\List\Util\Util.dll:Util.dll (000D0000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\List\Util\Util.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\lib\auto\Filter\Util\Call\Call.dll:Call.dl l (00290000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Filter\Util\Call\Call.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\lib\auto\IO\IO.dll:IO.dll (00320000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\IO\IO.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\site\lib\auto\DBD\mysql\mysql.dll:mysql.dl l (00910000), size: 94208 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\site\lib\auto\DBD\mysql\mysql.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Perl\site\lib\auto\DBD\mysql\LIBMYSQL.dll:LIBMY SQL.dll (0DBA0000), size: 2375680 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\site\lib\auto\DBD\mysql\LIBMYSQL.dll'
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\WSOCK32.dll:WSOCK32.dll (723B0000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WSOCK32.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\System32\fwpuclnt.dll:fwpuclnt.dll (741E0000), size: 229376 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\fwpuclnt.dll', fileVersion: 6.1.7601.18283
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\dbghelp.dll:dbghelp.dll (744A0000), size: 962560 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dbghelp.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\mod_functions.cpp (137): Mob::mod_effect_value
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3050): Mob::CalcSpellEffectValue
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3456): Mob::DoBuffTic
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3347): Mob::BuffProcess
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\client_process.cpp (530): Client::Process
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\entity.cpp (481): EntityList::MobProcess
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\net.cpp (467): main
[08-27-2015 :: 21:15:03] [Crash] f:\dd\vctools\crt\crtw32\startup\crt0.c (255): __tmainCRTStartup
[08-27-2015 :: 21:15:03] [Crash] f:\dd\vctools\crt\crtw32\startup\crt0.c (165): mainCRTStartup
[08-27-2015 :: 21:15:03] [Crash] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 75B2337A)
[08-27-2015 :: 21:15:03] [Crash] 75B2337A (kernel32): (filename not available): BaseThreadInitThunk
[08-27-2015 :: 21:15:03] [Crash] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 773192E2)
[08-27-2015 :: 21:15:03] [Crash] 773192E2 (ntdll): (filename not available): RtlInitializeExceptionChain
[08-27-2015 :: 21:15:03] [Crash] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 773192B5)
[08-27-2015 :: 21:15:03] [Crash] 773192B5 (ntdll): (filename not available): RtlInitializeExceptionChain
Does anyone have an idea what these errors mean other than some filename is not available? I'm just confused why this error only occurs on heal over time spells as well. It seemed to be crashing on the line which causes no issues on regular heals.
effect_value *= (caster->GetWIS() / 100.0);
Uleat
08-27-2015, 10:49 PM
You really only need about this much of a crash dump:
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\WSOCK32.dll:WSOCK32.dll (723B0000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WSOCK32.dll', fileVersion: 6.1.7600.16385
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\System32\fwpuclnt.dll:fwpuclnt.dll (741E0000), size: 229376 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\fwpuclnt.dll', fileVersion: 6.1.7601.18283
[08-27-2015 :: 21:15:03] [Crash] C:\Windows\system32\dbghelp.dll:dbghelp.dll (744A0000), size: 962560 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dbghelp.dll', fileVersion: 6.1.7601.17514
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\mod_functions.cpp (137): Mob::mod_effect_value
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3050): Mob::CalcSpellEffectValue
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3456): Mob::DoBuffTic
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\spell_effects.cpp (3347): Mob::BuffProcess
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\client_process.cpp (530): Client::Process
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\entity.cpp (481): EntityList::MobProcess
[08-27-2015 :: 21:15:03] [Crash] [PathToSource]\zone\net.cpp (467): main
and this top line:
[08-27-2015 :: 21:15:03] [Crash] EXCEPTION_ACCESS_VIOLATION
The rest of it, essentially, is the program unwinding itself.
These two lines:
First-chance exception at 0x01B237A0 in zone.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x01B237A0 in zone.exe: 0xC0000005: Access violation reading location 0x00000000.
are what is echoed by the top line of the crash dump and tells me that you have a null pointer..most likely for 'caster.'
You can/should put a null check in there to avoid crashes..though, you will still need to figure out why you are getting a null value there.
(i.e.,):
if (caster) { ... }
-or-
if (caster != nullptr) { ... }
-for complete bypass, put this at the beginning-
if (!caster) { return; }
-or-
if (caster == nullptr) { return; }
Always do a validity check on a pointer before attempting to dereference it (i.e., caster->do_something())
In a non-static method, the 'instantiated' mob object itself should never be null. It can consist of invalid data..but, it should always have a memory reference.
However, since you are passing in another mob object by pointer reference, that object can be a nullptr.
In the case of your mod_effect_value(), you would need to determine a baseline 'no effect' value and return that when bypassing
the function's methodology.
EDIT: For those filename unavailables, that just means that the debugger didn't have access to symbol data for that particular object/method.
(Probably something running at a lower level than the debugger itself.)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.