Jump to content
  • 0

653:NPC_EARTHQUAKE, divide per 0 avoided!


Question

6 answers to this question

Recommended Posts

Posted

please check the skill_db info of earthquake i think you make this to 0

653,0,8,4,0,0x6,5:7:9:11:13:5:7:9:11:13,10,1,no,0,0x2,0,magic,0,    NPC_EARTHQUAKE,Earthquake



if i'm wrong maybe on your src.because i encountered that also when change to 0 but when i restore it to normal no more errors of your occurs

  • Upvote 1
Posted

The damage of earthquake is the divided by the number of players hit by the skill. If there are no players hit by it, there is a division by 0.

 

It's in trunk/src/map/battle.c (line 4157)

 

		if (skill_id == NPC_EARTHQUAKE)
		{	//Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
			//Also divide the extra bonuses from atk2 based on the number in range [Kevin]
			if(mflag>0)
				ad.damage+= (sstatus->rhw.atk2*skillratio/100)/mflag;
			else
				ShowError("Zero range by %d:%s, divide per 0 avoided!\n", skill_id, skill_get_name(skill_id));
		}
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...