From c1d7d16b0e4010b27591f37ee93a1ca8d1137ecb Mon Sep 17 00:00:00 2001 From: Inkfish Date: Fri, 19 Jun 2009 13:26:50 +0000 Subject: * Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and NPC_INVINCIBLEOFF. (topic:217330) * Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259) * Fixed Butterfly Wings not working during GVG. (bugreport:3264) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13897 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index f33b7bb59..ef3b65dac 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -360,7 +360,10 @@ int skillnotok (int skillid, struct map_session_data *sd) return 1; // invalid skill id if (battle_config.gm_skilluncond && pc_isGM(sd) >= battle_config.gm_skilluncond) - return 0; // GMs can do any damn thing they want + return 0; // GMs can do any damn thing they want + + if( skillid == AL_TELEPORT && sd->skillitem == skillid && sd->skillitemlv > 2 ) + return 0; // Teleport lv 3 bypasses this check.[Inkfish] if (sd->blockskill[i] > 0) return 1; @@ -385,10 +388,10 @@ int skillnotok (int skillid, struct map_session_data *sd) } return 0; case AL_TELEPORT: - // if(map[m].flag.noteleport) { - // clif_skill_teleportmessage(sd,0); - // return 1; - // } + if(map[m].flag.noteleport) { + clif_skill_teleportmessage(sd,0); + return 1; + } return 0; // gonna be checked in 'skill_castend_nodamage_id' case WE_CALLPARTNER: case WE_CALLPARENT: @@ -3662,6 +3665,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NPC_DEFENDER: case NPC_MAGICMIRROR: case ST_PRESERVE: + case NPC_INVINCIBLE: + case NPC_INVINCIBLEOFF: clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); break; -- cgit v1.2.3-70-g09d2