summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.c34
-rw-r--r--src/common/mmo.h10
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/pc.c90
-rw-r--r--src/map/script.c8
-rw-r--r--src/map/status.c8
6 files changed, 80 insertions, 78 deletions
diff --git a/src/char/char.c b/src/char/char.c
index c02ee33ef..12dc2554a 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -461,9 +461,9 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p)
(p->option != cp->option) ||
(p->party_id != cp->party_id) || (p->guild_id != cp->guild_id) ||
(p->pet_id != cp->pet_id) || (p->look.weapon != cp->look.weapon) || (p->hom_id != cp->hom_id) ||
- (p->ele_id != cp->ele_id) || (p->look.shield != cp->look.shield) || (p->head_top != cp->head_top) ||
- (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) ||
- (p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->robe != cp->robe) ||
+ (p->ele_id != cp->ele_id) || (p->look.shield != cp->look.shield) || (p->look.head_top != cp->look.head_top) ||
+ (p->look.head_mid != cp->look.head_mid) || (p->look.head_bottom != cp->look.head_bottom) || (p->delete_date != cp->delete_date) ||
+ (p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->look.robe != cp->look.robe) ||
(p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) ||
(p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift)
) {
@@ -490,11 +490,11 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p)
p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point,
p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
p->option, p->party_id, p->guild_id, p->pet_id, p->hom_id, p->ele_id,
- p->look.weapon, p->look.shield, p->head_top, p->head_mid, p->head_bottom,
+ p->look.weapon, p->look.shield, p->look.head_top, p->look.head_mid, p->look.head_bottom,
mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y,
mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename,
(unsigned long)p->delete_date, // FIXME: platform-dependent size
- p->robe,p->slotchange,opt,p->font,p->uniqueitem_counter,
+ p->look.robe,p->slotchange,opt,p->font,p->uniqueitem_counter,
p->hotkey_rowshift,
p->account_id, p->char_id) )
{
@@ -1096,13 +1096,13 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_SHORT, &p.body, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_SHORT, &p.look.weapon, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_SHORT, &p.look.shield, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.head_top, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.head_mid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.head_bottom, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.look.head_top, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.look.head_mid, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.look.head_bottom, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_USHORT, &p.rename, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_UINT32, &p.delete_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.robe, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.look.robe, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_USHORT, &p.slotchange, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_LONG, &unban_time, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL)
@@ -1210,9 +1210,9 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_SHORT, &p->body, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_SHORT, &p->look.weapon, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_SHORT, &p->look.shield, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->head_top, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->head_mid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->head_bottom, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->look.head_top, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->look.head_mid, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->look.head_bottom, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 40, SQLDT_SHORT, &p->last_point.x, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 41, SQLDT_SHORT, &p->last_point.y, 0, NULL, NULL)
@@ -1226,7 +1226,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 49, SQLDT_INT, &p->fame, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 50, SQLDT_USHORT, &p->rename, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 51, SQLDT_UINT32, &p->delete_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->robe, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->look.robe, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 53, SQLDT_USHORT, &p->slotchange, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 54, SQLDT_UINT, &opt, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 55, SQLDT_UCHAR, &p->font, 0, NULL, NULL)
@@ -1946,10 +1946,10 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
WBUFW(buf,58) = p->base_level;
WBUFW(buf,60) = min(p->skill_point, INT16_MAX);
- WBUFW(buf,62) = p->head_bottom;
+ WBUFW(buf,62) = p->look.head_bottom;
WBUFW(buf,64) = p->look.shield;
- WBUFW(buf,66) = p->head_top;
- WBUFW(buf,68) = p->head_mid;
+ WBUFW(buf,66) = p->look.head_top;
+ WBUFW(buf,68) = p->look.head_mid;
WBUFW(buf,70) = p->hair_color;
WBUFW(buf,72) = p->clothes_color;
memcpy(WBUFP(buf,74), p->name, NAME_LENGTH);
@@ -1973,7 +1973,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
offset += 4;
#endif
#if PACKETVER >= 20110111
- WBUFL(buf,128) = p->robe;
+ WBUFL(buf,128) = p->look.robe;
offset += 4;
#endif
#if PACKETVER != 20111116 //2011-11-16 wants 136, ask gravity.
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 4b120e812..85e0a83ae 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -613,11 +613,13 @@ struct mmo_charstatus {
int sword_faith, sword_calls;
struct {
- short weapon; ///< Weapon view sprite id.
- short shield; ///< Shield view sprite id.
+ short weapon; ///< Weapon view sprite id.
+ short shield; ///< Shield view sprite id.
+ short head_top; ///< Top headgear view sprite id.
+ short head_mid; ///< Middle headgear view sprite id.
+ short head_bottom; ///< Bottom headgear view sprite id.
+ short robe; ///< Robe view sprite id.
} look;
- short head_top,head_mid,head_bottom;
- short robe;
char name[NAME_LENGTH];
int base_level, job_level;
diff --git a/src/map/clif.c b/src/map/clif.c
index 77e6d6055..07f394da4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1491,8 +1491,8 @@ bool clif_spawn(struct block_list *bl)
}
if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0)
clif->spiritcharm(sd);
- if (sd->status.robe)
- clif->refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
+ if (sd->status.look.robe != 0)
+ clif->refreshlook(bl, bl->id, LOOK_ROBE, sd->status.look.robe, AREA);
}
break;
case BL_MOB:
@@ -4309,8 +4309,8 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
clif->specialeffect_single(bl,421,sd->fd);
if (tsd->bg_id != 0 && map->list[tsd->bl.m].flag.battleground)
clif->sendbgemblem_single(sd->fd,tsd);
- if (tsd->status.robe)
- clif->refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF);
+ if (tsd->status.look.robe != 0)
+ clif->refreshlook(&sd->bl, bl->id, LOOK_ROBE, tsd->status.look.robe, SELF);
}
break;
case BL_MER: // Devotion Effects
diff --git a/src/map/pc.c b/src/map/pc.c
index a8a715a70..5948a3cf7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8835,10 +8835,10 @@ int pc_equiplookall(struct map_session_data *sd)
clif->changelook(&sd->bl,LOOK_WEAPON,0);
clif->changelook(&sd->bl,LOOK_SHOES,0);
- clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
- clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
- clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
- clif->changelook(&sd->bl,LOOK_ROBE, sd->status.robe);
+ clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom);
+ clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top);
+ clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid);
+ clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe);
return 0;
}
@@ -8876,13 +8876,13 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
sd->status.look.weapon = val;
break;
case LOOK_HEAD_BOTTOM:
- sd->status.head_bottom=val;
+ sd->status.look.head_bottom = val;
break;
case LOOK_HEAD_TOP:
- sd->status.head_top=val;
+ sd->status.look.head_top = val;
break;
case LOOK_HEAD_MID:
- sd->status.head_mid=val;
+ sd->status.look.head_mid = val;
break;
case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex]
val = cap_value(val, MIN_HAIR_COLOR, MAX_HAIR_COLOR);
@@ -8905,7 +8905,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
case LOOK_SHOES:
break;
case LOOK_ROBE:
- sd->status.robe = val;
+ sd->status.look.robe = val;
break;
case LOOK_BODY2:
val = cap_value(val, MIN_BODY_STYLE, MAX_BODY_STYLE);
@@ -9801,57 +9801,57 @@ void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n,
//causes client to redraw item on top of itself. (suggested by Lupus)
if (!map_no_view(sd->bl.m,EQP_HEAD_LOW) && pos & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) {
if (id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID)))
- sd->status.head_bottom = id->view_sprite;
+ sd->status.look.head_bottom = id->view_sprite;
else
- sd->status.head_bottom = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ sd->status.look.head_bottom = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom);
}
if (!map_no_view(sd->bl.m,EQP_HEAD_TOP) && pos & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) {
if (id)
- sd->status.head_top = id->view_sprite;
+ sd->status.look.head_top = id->view_sprite;
else
- sd->status.head_top = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ sd->status.look.head_top = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top);
}
if (!map_no_view(sd->bl.m,EQP_HEAD_MID) && pos & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) {
if (id && !(pos&EQP_HEAD_TOP))
- sd->status.head_mid = id->view_sprite;
+ sd->status.look.head_mid = id->view_sprite;
else
- sd->status.head_mid = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ sd->status.look.head_mid = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid);
}
if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_TOP) && pos & EQP_COSTUME_HEAD_TOP) {
if (id){
- sd->status.head_top = id->view_sprite;
+ sd->status.look.head_top = id->view_sprite;
} else
- sd->status.head_top = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ sd->status.look.head_top = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top);
}
if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_MID) && pos & EQP_COSTUME_HEAD_MID) {
if(id && !(pos&EQP_HEAD_TOP)){
- sd->status.head_mid = id->view_sprite;
+ sd->status.look.head_mid = id->view_sprite;
} else
- sd->status.head_mid = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ sd->status.look.head_mid = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid);
}
if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_LOW) && pos & EQP_COSTUME_HEAD_LOW) {
if (id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID))){
- sd->status.head_bottom = id->view_sprite;
+ sd->status.look.head_bottom = id->view_sprite;
} else
- sd->status.head_bottom = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ sd->status.look.head_bottom = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom);
}
if (!map_no_view(sd->bl.m,EQP_SHOES) && pos & EQP_SHOES)
clif->changelook(&sd->bl,LOOK_SHOES,0);
if (!map_no_view(sd->bl.m,EQP_GARMENT) && pos&EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1) {
- sd->status.robe = id ? id->view_sprite : 0;
- clif->changelook(&sd->bl, LOOK_ROBE, sd->status.robe);
+ sd->status.look.robe = id ? id->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe);
}
if (!map_no_view(sd->bl.m,EQP_COSTUME_GARMENT) && pos & EQP_COSTUME_GARMENT) {
- sd->status.robe = id ? id->view_sprite : 0;
- clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
+ sd->status.look.robe = id ? id->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe);
}
}
@@ -10020,44 +10020,44 @@ void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos)
clif->changelook(&sd->bl, LOOK_SHIELD, sd->status.look.shield);
}
if (pos & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) {
- sd->status.head_bottom = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ sd->status.look.head_bottom = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom);
}
if (pos & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) {
- sd->status.head_top = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ sd->status.look.head_top = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top);
}
if (pos & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) {
- sd->status.head_mid = 0;
- clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ sd->status.look.head_mid = 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid);
}
if (pos & EQP_COSTUME_HEAD_TOP) {
- sd->status.head_top = ( pc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_TOP)]->view_sprite : 0;
- clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ sd->status.look.head_top = ( pc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_TOP)]->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top);
}
if (pos & EQP_COSTUME_HEAD_MID) {
- sd->status.head_mid = ( pc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_MID)]->view_sprite : 0;
- clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ sd->status.look.head_mid = ( pc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_MID)]->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid);
}
if (pos & EQP_COSTUME_HEAD_LOW) {
- sd->status.head_bottom = ( pc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_LOW)]->view_sprite : 0;
- clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ sd->status.look.head_bottom = ( pc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_LOW)]->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom);
}
if (pos & EQP_SHOES)
clif->changelook(&sd->bl,LOOK_SHOES,0);
if (pos & EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1) {
- sd->status.robe = 0;
+ sd->status.look.robe = 0;
clif->changelook(&sd->bl, LOOK_ROBE, 0);
}
if (pos & EQP_COSTUME_GARMENT) {
- sd->status.robe = ( pc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_GARMENT)]->view_sprite : 0;
- clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
+ sd->status.look.robe = ( pc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_GARMENT)]->view_sprite : 0;
+ clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe);
}
}
diff --git a/src/map/script.c b/src/map/script.c
index 09f6377ef..5ce581db6 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -15520,14 +15520,14 @@ BUILDIN(getlook)
switch(type) {
case LOOK_HAIR: val = sd->status.hair; break; //1
case LOOK_WEAPON: val = sd->status.look.weapon; break; //2
- case LOOK_HEAD_BOTTOM: val = sd->status.head_bottom; break; //3
- case LOOK_HEAD_TOP: val = sd->status.head_top; break; //4
- case LOOK_HEAD_MID: val = sd->status.head_mid; break; //5
+ case LOOK_HEAD_BOTTOM: val = sd->status.look.head_bottom; break; //3
+ case LOOK_HEAD_TOP: val = sd->status.look.head_top; break; //4
+ case LOOK_HEAD_MID: val = sd->status.look.head_mid; break; //5
case LOOK_HAIR_COLOR: val = sd->status.hair_color; break; //6
case LOOK_CLOTHES_COLOR: val = sd->status.clothes_color; break; //7
case LOOK_SHIELD: val = sd->status.look.shield; break; //8
case LOOK_SHOES: break; //9
- case LOOK_ROBE: val = sd->status.robe; break; //12
+ case LOOK_ROBE: val = sd->status.look.robe; break; //12
case LOOK_BODY2: val=sd->status.body; break; //13
}
diff --git a/src/map/status.c b/src/map/status.c
index 733eb5f6f..e04769e3f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6864,13 +6864,13 @@ void status_set_viewdata(struct block_list *bl, int class_)
}
sd->vd.class = class_;
clif->get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield);
- sd->vd.head_top = sd->status.head_top;
- sd->vd.head_mid = sd->status.head_mid;
- sd->vd.head_bottom = sd->status.head_bottom;
+ sd->vd.head_top = sd->status.look.head_top;
+ sd->vd.head_mid = sd->status.look.head_mid;
+ sd->vd.head_bottom = sd->status.look.head_bottom;
sd->vd.hair_style = cap_value(sd->status.hair,0,battle_config.max_hair_style);
sd->vd.hair_color = cap_value(sd->status.hair_color,0,battle_config.max_hair_color);
sd->vd.cloth_color = cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color);
- sd->vd.robe = sd->status.robe;
+ sd->vd.robe = sd->status.look.robe;
sd->vd.body_style = sd->status.body;
sd->vd.sex = sd->status.sex;