diff options
author | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-24 08:50:59 +0000 |
---|---|---|
committer | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-24 08:50:59 +0000 |
commit | 913fd65ef9a5fa55ebbd5ac4502f72895879fc84 (patch) | |
tree | 0241f5c639284276a216f86a964c8ff64bb0532b /src/map/pc.c | |
parent | eef34512a2f465f7b2b5453fadfcc0e61c097e01 (diff) | |
download | hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.gz hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.bz2 hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.xz hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.zip |
-Fix bugreport:6751 allow noseige to be casted while under status.
-Upd athena-start, save pid to not kill all other process with same name (annoying when multiple server)
-Harmonize setmapflag and @mapflag, flag value is always an int, and could be superior to 1 for some mapflag
-Fix bugreport:6923 for Windows
-Upd @zeny to remove rest of zeny if not enough money as requested
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16959 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 6f85aa532..59709cdf1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4181,13 +4181,29 @@ int pc_useitem(struct map_session_data *sd,int n) if( !pc_isUseitem(sd,n) ) return 0; - //Prevent mass item usage. [Skotlex] - if( DIFF_TICK(sd->canuseitem_tick, tick) > 0 || - (itemdb_iscashfood(sd->status.inventory[n].nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0) - ) + // Store information for later use before it is lost (via pc_delitem) [Paradox924X] + nameid = sd->inventory_data[n]->nameid; + + 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( 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( 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] || @@ -4196,11 +4212,15 @@ 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; + } - // Store information for later use before it is lost (via pc_delitem) [Paradox924X] - nameid = sd->inventory_data[n]->nameid; + //Prevent mass item usage. [Skotlex] + if( DIFF_TICK(sd->canuseitem_tick, tick) > 0 || + (itemdb_iscashfood(nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0) + ) + return 0; /* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */ if( sd->inventory_data[n]->flag.delay_consume ) { |