Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-28-2003, 07:31 AM
velns
Fire Beetle
 
Join Date: Apr 2003
Posts: 10
Default 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.0
>...>...>...{
>...>...>...>...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;
>...>...>...}
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 10:40 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3