Skip to content

Commit

Permalink
- Fix during Severe Rainstorm you can't swith equipment (bug:8193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michieru committed Aug 8, 2014
1 parent 7308992 commit 9395ed3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8776,7 +8776,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
return 0;
}

if (sd->sc.data[SC_BERSERK])
if (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_NO_SWITCH_EQUIP])
{
clif->equipitemack(sd,n,0,EIA_FAIL); // fail
return 0;
Expand Down Expand Up @@ -8980,7 +8980,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
}

// if player is berserk then cannot unequip
if (!(flag & 2) && sd->sc.count && (sd->sc.data[SC_BERSERK]))
if (!(flag & 2) && sd->sc.count && (sd->sc.data[SC_BERSERK]) || sd->sc.data[SC_NO_SWITCH_EQUIP])
{
clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
Expand Down
2 changes: 2 additions & 0 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -10134,6 +10134,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case MH_XENO_SLASHER:
flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete).
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
if ( skill_id == WM_SEVERE_RAINSTORM )
sc_start(src,src,SC_NO_SWITCH_EQUIP,100,0,skill->get_time(skill_id,skill_lv));
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
break;
case RG_GRAFFITI: /* Graffiti [Valaris] */
Expand Down
2 changes: 2 additions & 0 deletions src/map/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,8 @@ typedef enum sc_type {
SC_DEFSET,
SC_MDEFSET,

SC_NO_SWITCH_EQUIP,

SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;

Expand Down

0 comments on commit 9395ed3

Please sign in to comment.