EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   Client freezes - clickable items (https://www.eqemulator.org/forums/showthread.php?t=24459)

AndMetal 02-23-2008 07:15 PM

Client freezes - clickable items
 
Original post (external link)

It seems that if there is an item that has a casttime less than -1, it causes the client to freeze (can't cast other spells, usually can't log out, etc). I believe it's because there isn't really a check against negative casting times.

I think I've narrowed it down to the following code:

zone/spells.cpp:
Code:

  257 bool Mob::DoCastSpell(int16 spell_id, int16 target_id, int16 slot,
  258                    sint32 cast_time, sint32 mana_cost, int32* oSpellWillFinish, int32 item_slot)

  298        if(cast_time == -1) {
  299                // save the non-reduced cast time to use in the packet
  300                cast_time = orgcasttime = spell.cast_time;
  301                // if there's a cast time, check if they have a modifier for it
  302                if(cast_time)
  303                {
  304                        cast_time = GetActSpellCasttime(spell_id, cast_time);
  305
  306                }
  307        }
  308        else
  309                orgcasttime = cast_time;

If I'm not mistaken, if line 298 is changed to
Code:

if(cast_time <= -1) {
that should fix the issue. Then again, the calculation for the casting time might be in GetActSpellCasttime(), which I think is in zone/mob.cpp.


All times are GMT -4. The time now is 11:50 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.