diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 3 | ||||
-rw-r--r-- | src/map/status.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 8321368c0..1f3dc4373 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -780,7 +780,7 @@ void clif_get_weapon_view(TBL_PC* sd, short *rhand, short *lhand) #if PACKETVER > 3
struct item_data *id;
#endif
- if (sd->vd.class_ == JOB_XMAS || sd->vd.class_ == JOB_WEDDING)
+ if (sd->sc.option&(OPTION_XMAS|OPTION_WEDDING))
{
*rhand = *lhand = 0;
return;
@@ -2682,7 +2682,6 @@ int clif_changelook(struct block_list *bl,int type,int val) unsigned char buf[32];
struct map_session_data *sd = NULL;
struct view_data *vd;
- nullpo_retr(0, bl);
vd = status_get_viewdata(bl);
nullpo_retr(0, vd);
diff --git a/src/map/status.c b/src/map/status.c index df12ad208..f77f2a917 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3330,6 +3330,14 @@ void status_set_viewdata(struct block_list *bl, int class_) class_ = JOB_BABY_CRUSADER2;
break;
}
+ if (sd->vd.class_ == JOB_WEDDING)
+ sd->sc.option&=~OPTION_WEDDING;
+ if (sd->vd.class_ == JOB_XMAS)
+ sd->sc.option&=~OPTION_XMAS;
+ if (class_ == JOB_WEDDING)
+ sd->sc.option|=OPTION_WEDDING;
+ if (class_ == JOB_XMAS)
+ sd->sc.option|=OPTION_XMAS;
sd->vd.class_ = class_;
clif_get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield);
sd->vd.head_top = sd->status.head_top;
|