- status_setviewdata will set your option accordingly when the previous/new view-class is wedding or xmas suit.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6437 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-05-01 22:07:15 +00:00
parent 14413f8ec6
commit a5b4b2d05e
3 changed files with 11 additions and 2 deletions

View File

@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/01 2006/05/01
* status_setviewdata will set your option accordingly when the previous/new
view-class is wedding or xmas suit. [Skotlex]
* Added function map_foreachinshootrange, behaves the same way as * Added function map_foreachinshootrange, behaves the same way as
map_foreachinrange, but it also performs a "shoot-path" check before map_foreachinrange, but it also performs a "shoot-path" check before
invoking the function. Used in the skill subtimer function if invoking the function. Used in the skill subtimer function if

View File

@ -780,7 +780,7 @@ void clif_get_weapon_view(TBL_PC* sd, short *rhand, short *lhand)
#if PACKETVER > 3 #if PACKETVER > 3
struct item_data *id; struct item_data *id;
#endif #endif
if (sd->vd.class_ == JOB_XMAS || sd->vd.class_ == JOB_WEDDING) if (sd->sc.option&(OPTION_XMAS|OPTION_WEDDING))
{ {
*rhand = *lhand = 0; *rhand = *lhand = 0;
return; return;
@ -2682,7 +2682,6 @@ int clif_changelook(struct block_list *bl,int type,int val)
unsigned char buf[32]; unsigned char buf[32];
struct map_session_data *sd = NULL; struct map_session_data *sd = NULL;
struct view_data *vd; struct view_data *vd;
nullpo_retr(0, bl);
vd = status_get_viewdata(bl); vd = status_get_viewdata(bl);
nullpo_retr(0, vd); nullpo_retr(0, vd);

View File

@ -3330,6 +3330,14 @@ void status_set_viewdata(struct block_list *bl, int class_)
class_ = JOB_BABY_CRUSADER2; class_ = JOB_BABY_CRUSADER2;
break; 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_; sd->vd.class_ = class_;
clif_get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield); clif_get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield);
sd->vd.head_top = sd->status.head_top; sd->vd.head_top = sd->status.head_top;