Jump to content
  • 0
Mumbles

Player Invincibility upon Teleport...gone?

Question

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.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thats wrong clif_skill_nodamage has nothing to do with the invincibility, it doesn't check for any timer either.


Whats responsible for teleport invincibility is clif_parse_LoadEndAck which is run when a player teleports or changes map

	if(battle_config.pc_invincible_time > 0) {		if(map_flag_gvg(sd->bl.m))			pc_setinvincibletimer(sd,battle_config.pc_invincible_time<<1);		else			pc_setinvincibletimer(sd,battle_config.pc_invincible_time);	}

Share this post


Link to post
Share on other sites
  • 0

Hmm. I wonder what it could be then; that block matches what I have in clif.c. All I changed were files that didn't pertain to player invincibility. As it is, you basically spawn and are targeted instantly by aggresive mobs.

 

Here are some other changes I made to the source, though I doubt they're relevant.

 

http://pastebin.com/raw.php?i=zMJ720QR

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.