summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 05:12:45 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 05:12:45 +0000
commit012bd2da191b99c55d7a4be9cb3685cfd56c3919 (patch)
tree56c7cd563a6cd0fd1680a79adbcf2b8cb6a8e3f1 /src
parent60a426c0742b3e7d8c5b557c7578df6eeeea377b (diff)
downloadhercules-012bd2da191b99c55d7a4be9cb3685cfd56c3919.tar.gz
hercules-012bd2da191b99c55d7a4be9cb3685cfd56c3919.tar.bz2
hercules-012bd2da191b99c55d7a4be9cb3685cfd56c3919.tar.xz
hercules-012bd2da191b99c55d7a4be9cb3685cfd56c3919.zip
- Re-committed r16969/trunk/src/ (tid:74924).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16993 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/pc.c31
-rw-r--r--src/map/status.c4
3 files changed, 12 insertions, 25 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 5e7c7f9bf..6138f7a47 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10791,7 +10791,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
// Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
sd->idletime = last_tick;
- if( pc_cant_act(sd) && !(skillnum == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
+ if( pc_cant_act(sd) && skillnum != RK_REFRESH && !(skillnum == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
return;
if( pc_issit(sd) )
return;
diff --git a/src/map/pc.c b/src/map/pc.c
index 59709cdf1..25ef846ae 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4187,23 +4187,7 @@ int pc_useitem(struct map_session_data *sd,int n)
if (nameid != ITEMID_NAUTHIZ && sd->sc.opt1 > 0 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)
return 0;
- if( sd->sc.count){
- if((nameid == ITEMID_NAUTHIZ) && ( //bugreport 6751
- sd->sc.data[SC_FREEZE] ||
- sd->sc.data[SC_STUN] ||
- sd->sc.data[SC_DEEPSLEEP] ||
- sd->sc.data[SC_STONE] ||
- sd->sc.data[SC_CRYSTALIZE]
- )
- ){
- sd->sc.opt1 = 0; //remove option and status to allow skill
- status_change_end(&sd->bl,SC_FREEZE,INVALID_TIMER);
- status_change_end(&sd->bl,SC_STUN,INVALID_TIMER);
- status_change_end(&sd->bl,SC_DEEPSLEEP,INVALID_TIMER);
- status_change_end(&sd->bl,SC_STONE,INVALID_TIMER);
- status_change_end(&sd->bl,SC_CRYSTALIZE,INVALID_TIMER);
- } //let us continue
- else if(
+ if (sd->sc.count && (
sd->sc.data[SC_BERSERK] || sd->sc.data[SC__BLOODYLUST] ||
(sd->sc.data[SC_GRAVITATION] && sd->sc.data[SC_GRAVITATION]->val3 == BCT_SELF) ||
sd->sc.data[SC_TRICKDEAD] ||
@@ -4212,9 +4196,8 @@ int pc_useitem(struct map_session_data *sd,int n)
sd->sc.data[SC__MANHOLE] ||
sd->sc.data[SC_KAGEHUMI] ||
(sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
- )
+ ))
return 0;
- }
//Prevent mass item usage. [Skotlex]
if( DIFF_TICK(sd->canuseitem_tick, tick) > 0 ||
@@ -6517,14 +6500,18 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
// Clear anything NPC-related when you die and was interacting with one.
if (sd->npc_id)
{
- if (sd->state.using_fake_npc)
+ if (sd->state.using_fake_npc) {
+ clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
+ }
if (sd->state.menu_or_input)
sd->state.menu_or_input = 0;
if (sd->npc_menu)
sd->npc_menu = 0;
-
- npc_event_dequeue(sd);
+
+ sd->npc_id = 0;
+ if (sd->st && sd->st->state != END)
+ sd->st->state = END;
}
npc_script_event(sd,NPCE_DIE);
diff --git a/src/map/status.c b/src/map/status.c
index a24011292..a9c3790d5 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1584,7 +1584,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if( sc && sc->count ) {
- if( sc->opt1 >0 && (sc->opt1 != OPT1_CRYSTALIZE && src->type != BL_MOB) && sc->opt1 != OPT1_BURNING && skill_num != SR_GENTLETOUCH_CURE ) { //Stuned/Frozen/etc
+ if (skill_num != RK_REFRESH && sc->opt1 >0 && (sc->opt1 != OPT1_CRYSTALIZE && src->type != BL_MOB) && sc->opt1 != OPT1_BURNING && skill_num != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc
if (flag != 1) //Can't cast, casted stuff can't damage.
return 0;
if (!(skill_get_inf(skill_num)&INF_GROUND_SKILL))
@@ -8552,7 +8552,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_FREEZE: sc->opt1 = OPT1_FREEZE; break;
case SC_STUN: sc->opt1 = OPT1_STUN; break;
case SC_SLEEP:
- case SC_DEEPSLEEP: sc->opt1 = OPT1_SLEEP; break;
+ case SC_DEEPSLEEP: opt_flag = 0; sc->opt1 = OPT1_SLEEP; break;
case SC_BURNING: sc->opt1 = OPT1_BURNING; break; // Burning need this to be showed correctly. [pakpil]
case SC_WHITEIMPRISON: sc->opt1 = OPT1_IMPRISON; break;
case SC_CRYSTALIZE: sc->opt1 = OPT1_CRYSTALIZE; break;