summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-18 18:58:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-18 18:58:14 +0000
commit7809da5abc894e1b25b8010294ef7c97747754b3 (patch)
tree753bbcec96de4263c71b2323ce65a3643f1f2082
parentdb231e817c5f6d6783b07d91e1d8b0d1243829dd (diff)
downloadhercules-7809da5abc894e1b25b8010294ef7c97747754b3.tar.gz
hercules-7809da5abc894e1b25b8010294ef7c97747754b3.tar.bz2
hercules-7809da5abc894e1b25b8010294ef7c97747754b3.tar.xz
hercules-7809da5abc894e1b25b8010294ef7c97747754b3.zip
- added LK's concentration +1 MDEF.
- Corrected delay-consume items being consumed when used while casting or being unable to act. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12216 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/status.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 99fcb0ace..97818bbf2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3090,9 +3090,11 @@ int pc_useitem(struct map_session_data *sd,int n)
//Since most delay-consume items involve using a "skill-type" target cursor,
//perform a skill-use check before going through. [Skotlex]
//resurrection was picked as testing skill, as a non-offensive, generic skill, it will do.
- if (sd->inventory_data[n]->flag.delay_consume &&
- !status_check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0))
- return 0;
+ if (sd->inventory_data[n]->flag.delay_consume && (
+ sd->ud.skilltimer != -1 ||
+ DIFF_TICK(tick, sd->ud.canact_tick) < 0 ||
+ !status_check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0)))
+ return 0;
sd->itemid = sd->status.inventory[n].nameid;
sd->itemindex = n;
diff --git a/src/map/status.c b/src/map/status.c
index d4836919f..6b6174293 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -291,7 +291,7 @@ void initChangeTables(void)
add_sc(NPC_INVISIBLE, SC_CLOAKING);
set_sc(LK_AURABLADE, SC_AURABLADE, SI_AURABLADE, SCB_NONE);
set_sc(LK_PARRYING, SC_PARRYING, SI_PARRYING, SCB_NONE);
- set_sc(LK_CONCENTRATION, SC_CONCENTRATION, SI_CONCENTRATION, SCB_BATK|SCB_WATK|SCB_HIT|SCB_DEF|SCB_DEF2|SCB_DSPD);
+ set_sc(LK_CONCENTRATION, SC_CONCENTRATION, SI_CONCENTRATION, SCB_BATK|SCB_WATK|SCB_HIT|SCB_DEF|SCB_DEF2|SCB_MDEF|SCB_DSPD);
set_sc(LK_TENSIONRELAX, SC_TENSIONRELAX, SI_TENSIONRELAX, SCB_REGEN);
set_sc(LK_BERSERK, SC_BERSERK, SI_BERSERK, SCB_DEF|SCB_DEF2|SCB_MDEF|SCB_MDEF2|SCB_FLEE|SCB_SPEED|SCB_ASPD|SCB_MAXHP|SCB_REGEN);
set_sc(HP_ASSUMPTIO, SC_ASSUMPTIO, SI_ASSUMPTIO, SCB_NONE);
@@ -3681,6 +3681,8 @@ static signed char status_calc_mdef(struct block_list *bl, struct status_change
mdef += 25*mdef/100;
if(sc->data[SC_ENDURE] && sc->data[SC_ENDURE]->val4 == 0)
mdef += sc->data[SC_ENDURE]->val1;
+ if(sc->data[SC_CONCENTRATION])
+ mdef += 1; //Skill info says it adds a fixed 1 Mdef point.
if(sc->data[SC_INCMDEFRATE])
mdef += mdef * sc->data[SC_INCMDEFRATE]->val1/100;