Jump to content
  • 0

Player Invincibility upon Teleport...gone?


Mumbles

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

I recently made a modification to my source in skill.c, where I allowed a menu bypass for Level 2 Teleport. I made this simple modification:

-	   	 if( sd->state.autocast || ( (sd->skillitem == AL_TELEPORT || battle_config.skip_teleport_lv1_menu) && skilllv == 1 ) || skilllv == 3 )
+		 if( sd->state.autocast || ( (sd->skillitem == AL_TELEPORT || battle_config.skip_teleport_lv1_menu) && skilllv == 1 ) || skilllv > 1 )

My goal of having the Level 2 menu skip was achieved; however, I managed to break the configuration for player invincibility upon spawn. As it is, my player_invincible_time in player.conf no longer works; I have set to 6000 milliseconds, but you can now be hit upon spawn - likely before your client even fully loads the map. Here's the remaining section of the code:

if( sd->state.autocast || ( (sd->skillitem == AL_TELEPORT || battle_config.skip_teleport_lv1_menu) && skilllv == 1 ) || skilllv > 1 )
		{
			if( skilllv == 1 )
				pc_randomwarp(sd,CLR_TELEPORT);
			else
				pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
			break;
		}

		clif_skill_nodamage(src,bl,skillid,skilllv,1);
		if( skilllv == 1 )
			clif_skill_warppoint(sd,skillid,skilllv, (unsigned short)-1,0,0,0);
		else
			clif_skill_warppoint(sd,skillid,skilllv, (unsigned short)-1,sd->status.save_point.map,0,0);

Now, I figured at this line -

   	 clif_skill_nodamage(src,bl,skillid,skilllv,1);

- it checks the timer for the player invincibility. Do I need to add this line within the first condition's output, or...? I'm at a bit of a loss. Any help is appreciated; thanks in advance.

Edited by Via
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  02/20/12
  • Last Seen:  

 I don't think you're on the right track here. The if statement you altered is (I'm sure you know) meant to catch usage of teleport level 1, flywing (level 1), and butterflywing (level 3). The only effect of the change you made should be that teleport level 2 will be treated like butterflywing. Teleport level 1, flywing, and butterflywing will not be processed any differently.

 

You can read about clif_skill_nodamage here. It is not directly related to player invulnerability. Regardless, this section of code is part of a switch statement. The nested break statement there means (I believe) that after flywing, bwing, and tele 1 w/ no menu option, this case ends and the remainder is not executed.

 

The issue must be coming from somewhere else. I'd look closely at the following files:

monster.conf (I know you know; try with an unmodified copy)

pc.c, and clif.c (If you made changes around 'pc_invincible_time' anywhere.)

battle.c (Review all changes)

 

You can try to narrow the issue down by swapping out one modified file for an unaltered copy at a time.

 

If you've got any questions just let me know.

Edited by Bob the Builder
Link to comment
Share on other sites

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.

×
×
  • Create New...