summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c7
-rw-r--r--src/map/pc.c12
-rw-r--r--src/map/skill.c22
3 files changed, 23 insertions, 18 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index d61ce3682..075f0fbfc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4338,8 +4338,11 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
{
int fd;
- nullpo_retr(0, sd);
-
+ if (!sd) { //Since this is the most common nullpo....
+ ShowDebug("clif_skill_fail: Error, received NULL sd for skill %d\n", skill_id);
+ return 0;
+ }
+
fd=sd->fd;
// reset all variables [celest]
diff --git a/src/map/pc.c b/src/map/pc.c
index 47efd18c0..d2d73acb5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6255,13 +6255,17 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
clif_changelook(&sd->bl,LOOK_SHOES,0);
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
+
+ if((sd->status.inventory[n].equip&0x0022) &&
+ sd->weapontype1 == 0 && sd->weapontype2 == 0)
+ skill_enchant_elemental_end(&sd->bl,-1);
+
sd->status.inventory[n].equip=0;
- if(flag&1)
+
+ if(flag&1) {
pc_checkallowskill(sd);
- if(sd->weapontype1 == 0 && sd->weapontype2 == 0)
- skill_enchant_elemental_end(&sd->bl,-1); //武器持ち誓えは無?件で?性付?解除
- if(flag&1)
status_calc_pc(sd,0);
+ }
if(sd->sc.count && sd->sc.data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(RC_DEMIHUMAN,sd->def_ele))
status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
diff --git a/src/map/skill.c b/src/map/skill.c
index 527480a6a..d6b18f158 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2944,7 +2944,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
case SL_STUN:
case SL_SMA:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
- status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0);
break;
}
@@ -5413,21 +5413,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SL_SKA: // [marquis007]
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
- status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0);
break;
}
- if (sd && status_get_mode(bl)&MD_BOSS)
- clif_skill_fail(sd,skillid,0,0);
- else
- {
- clif_skill_nodamage(src,bl,skillid,skilllv,
- sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
- }
+ clif_skill_nodamage(src,bl,skillid,skilllv,
+ sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;
case SL_SWOO:
- if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
- status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+ if (sd && (
+ (!battle_config.allow_es_magic_pc && bl->type != BL_MOB) ||
+ (tsc && tsc->data[type].timer != -1)
+ )) {
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0);
break;
}
@@ -5437,7 +5435,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SL_SKE:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
- status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0);
break;
}