Logging Spell Usage Bug
The following are changes to zone/spells.cpp to fix the misorder of output in the spell logging code. The name of the castee and the name of the spell had been incorrectly inversed. I believe there may also be an issue with the spell power logic, as I haven't seen any spells logged at usage other than 50%. I will need to do more debugging to figure out exactly why.
>...>...>...if (partial && (random > chance - 0.10)) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: 50%% Hit!", caster?caster->GetName():"unknown", spells[spell_id].name, GetName()); >...>...>...>...return 50; >...>...>...} >...>...>...else if (partial && random > chance - 0.08) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: 60%% Hit!", caster?caster->GetName():"unknown", spells[spell_id].name, GetName()); >...>...>...>...return 60; >...>...>...} >...>...>...else if (partial && random > chance - 0.06) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: 70%% Hit!", caster?caster->GetName():"unknown", spells[spell_id].name, GetName()); >...>...>...>...return 70; >...>...>...} >...>...>...else if (partial && random > chance - 0.04) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: 80%% Hit!", caster?caster->GetName():"unknown", spells[spell_id].name, GetName()); >...>...>...>...return 80; >...>...>...} >...>...>...else if (partial && random > chance - 0.02) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: 90%% Hit!", caster?caster->GetName():"unknown", >... spells[spell_id].name, GetName()); >...>...>...>...return 90; >...>...>...} >...>...>...else if (random > chance) >...>...>...{ >...>...>...>...LogFile->write(EQEMuLog::Normal, "%s casted %s on %s: Full Hit!", caster?caster->GetName():"unknown", spells[spell_id].name, GetName()); >...>...>...>...return 100; >...>...>...} |
Modifications to latest 0.5 code, various zone files (including better formatting of the above code change)
makefile change to use "common" mysql library / include paths rather than /usr/local path => Code:
--- makefile 25 Jul 2003 12:01:08 -0000 1.1.1.2 Code:
--- parser.cpp 29 Jul 2003 00:30:19 -0000 1.2 Code:
--- spells.cpp 29 Jul 2003 00:30:20 -0000 1.2 |
moved this to the Development forum. Looks good , though Im hestitate to alter the makefiles. Mysql doesnt install to the same location based on your distro. I'll take a look though, I thought BP had modified it to dynamic work that out....
|
Automake is the devil, if someone wants to do it, go for it.. a configure script would be good aswell..
|
Hmm dunno how i missed this post.. yeah i had fixed the makefile to use mysql_config, someone likely copied an older makefile in the merge
|
All times are GMT -4. The time now is 10:11 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.