summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-26 00:52:01 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-26 00:52:01 +0000
commita337cab31a823d52f405462beb54e0135260b9ba (patch)
treec14b455011c820a5eaa8ae68a8f113227e731c91 /src/map/pc.c
parentb11bf6e1604097711291265f927e79e8f2af5c54 (diff)
downloadhercules-a337cab31a823d52f405462beb54e0135260b9ba.tar.gz
hercules-a337cab31a823d52f405462beb54e0135260b9ba.tar.bz2
hercules-a337cab31a823d52f405462beb54e0135260b9ba.tar.xz
hercules-a337cab31a823d52f405462beb54e0135260b9ba.zip
-Fix bugreport:6930 heal -Hp,0; percentheal -100,0; causing crashmap
-Upd bugreport:6751 with MarkZD followup patch git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16969 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 0e0a4a1b2..9f39b2747 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4076,23 +4076,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] ||
@@ -4101,9 +4085,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 ||
@@ -6620,14 +6603,17 @@ 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);