diff options
-rw-r--r-- | src/map/atcommand.c | 6 | ||||
-rw-r--r-- | src/map/clif.c | 52 | ||||
-rw-r--r-- | src/map/elemental.c | 4 | ||||
-rw-r--r-- | src/map/homunculus.c | 2 | ||||
-rw-r--r-- | src/map/mercenary.c | 2 | ||||
-rw-r--r-- | src/map/mob.c | 17 | ||||
-rw-r--r-- | src/map/npc.c | 6 | ||||
-rw-r--r-- | src/map/pc.c | 12 | ||||
-rw-r--r-- | src/map/script.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 12 | ||||
-rw-r--r-- | src/map/unit.h | 6 |
11 files changed, 61 insertions, 60 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index bd4fa7204..2beb6c634 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -951,7 +951,7 @@ ACMD(hide) { map->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); } else { sd->sc.option |= OPTION_INVISIBLE; - sd->vd.class_ = INVISIBLE_CLASS; + sd->vd.class = INVISIBLE_CLASS; clif->message(fd, msg_fd(fd,11)); // Invisible: On // decrement the number of pvp players on the map @@ -6610,9 +6610,9 @@ ACMD(mobinfo) // stats if (monster->mexp) - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1240), monster->name, monster->jname, monster->sprite, monster->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d) + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1240), monster->name, monster->jname, monster->sprite, monster->vd.class); // MVP Monster: '%s'/'%s'/'%s' (%d) else - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1241), monster->name, monster->jname, monster->sprite, monster->vd.class_); // Monster: '%s'/'%s'/'%s' (%d) + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1241), monster->name, monster->jname, monster->sprite, monster->vd.class); // Monster: '%s'/'%s'/'%s' (%d) clif->message(fd, atcmd_output); safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1242), monster->lv, monster->status.max_hp, base_exp, job_exp, MOB_HIT(monster), MOB_FLEE(monster)); // Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d diff --git a/src/map/clif.c b/src/map/clif.c index 262ea1c57..887fa9d64 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -276,7 +276,7 @@ unsigned char clif_bl_type(struct block_list *bl) vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - if (clif->isdisguised(bl) && !pc->db_checkid(vd->class_)) + if (clif->isdisguised(bl) && !pc->db_checkid(vd->class)) return CLUT_NPC; return CLUT_PC; case BL_ITEM: @@ -288,15 +288,15 @@ unsigned char clif_bl_type(struct block_list *bl) case BL_MOB: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_MOB; + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_MOB; case BL_NPC: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_EVENT; + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT; case BL_PET: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_PET; + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_PET; case BL_HOM: return CLUT_HOMNUCLUS; case BL_MER: @@ -961,14 +961,15 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; p.shield = vd->shield; p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.shield = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1005,7 +1006,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu nullpo_retv(bl); #if PACKETVER < 20091103 - if( !pc->db_checkid(vd->class_) ) { + if (!pc->db_checkid(vd->class)) { clif->set_unit_idle2(bl,tsd,target); return; } @@ -1028,7 +1029,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1037,7 +1038,8 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu #endif p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.accessory = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1082,7 +1084,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu if (clif->isdisguised(bl)) { #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE p.GID = -bl->id; #else p.GID = -bl->id; @@ -1115,11 +1117,12 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) { p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; - p.job = vd->class_; + p.job = vd->class; p.shield = vd->shield; p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.shield = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1147,7 +1150,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { nullpo_retv(bl); #if PACKETVER < 20091103 - if( !pc->db_checkid(vd->class_) ) { + if (!pc->db_checkid(vd->class)) { clif->spawn_unit2(bl,target); return; } @@ -1170,7 +1173,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1179,7 +1182,8 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { #endif p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.accessory = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1223,7 +1227,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { if (sd->status.class != sd->disguise) clif->send(&p,sizeof(p),bl,target); #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE p.GID = -bl->id; #else p.GID = -bl->id; @@ -1266,7 +1270,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1315,7 +1319,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, if (clif->isdisguised(bl)) { #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE p.GID = -bl->id; #else p.GID = -bl->id; @@ -1427,7 +1431,7 @@ bool clif_spawn(struct block_list *bl) if( !vd ) return false; - if (vd->class_ == INVISIBLE_CLASS) + if (vd->class == INVISIBLE_CLASS) return true; // Doesn't need to be spawned, so everything is alright if (bl->type == BL_NPC) { @@ -1774,7 +1778,7 @@ void clif_move(struct unit_data *ud) bl = ud->bl; nullpo_retv(bl); vd = status->get_viewdata(bl); - if (!vd || vd->class_ == INVISIBLE_CLASS) + if (vd == NULL || vd->class == INVISIBLE_CLASS) return; //This performance check is needed to keep GM-hidden objects from being notified to bots. if (bl->type == BL_NPC) { @@ -4231,7 +4235,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { nullpo_retv(bl); vd = status->get_viewdata(bl); - if (!vd || vd->class_ == INVISIBLE_CLASS) + if (vd == NULL || vd->class == INVISIBLE_CLASS) return; if (bl->type == BL_NPC) { @@ -4691,7 +4695,7 @@ int clif_outsight(struct block_list *bl,va_list ap) nullpo_ret(bl); switch(bl->type){ case BL_PC: - if (sd->vd.class_ != INVISIBLE_CLASS) + if (sd->vd.class != INVISIBLE_CLASS) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); if (sd->chat_id != 0) { struct chat_data *cd = map->id2cd(sd->chat_id); @@ -4714,7 +4718,7 @@ int clif_outsight(struct block_list *bl,va_list ap) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); break; default: - if ((vd=status->get_viewdata(bl)) && vd->class_ != INVISIBLE_CLASS) + if ((vd=status->get_viewdata(bl)) && vd->class != INVISIBLE_CLASS) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); break; } @@ -4723,7 +4727,7 @@ int clif_outsight(struct block_list *bl,va_list ap) nullpo_ret(tbl); if (tbl->type == BL_SKILL) //Trap knocked out of sight clif->clearchar_skillunit(BL_UCAST(BL_SKILL, tbl), sd->fd); - else if ((vd = status->get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS + else if ((vd = status->get_viewdata(tbl)) != NULL && vd->class != INVISIBLE_CLASS && !(tbl->type == BL_NPC && (BL_UCAST(BL_NPC, tbl)->option&OPTION_INVISIBLE))) clif->clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd); } diff --git a/src/map/elemental.c b/src/map/elemental.c index 76b7ba24b..ae1fda0a2 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -704,7 +704,7 @@ int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *s if( DIFF_TICK(tick,ed->last_spdrain_time) >= 10000 ){// Drain SP every 10 seconds int sp = 5; - switch (ed->vd->class_) { + switch (ed->vd->class) { case ELEID_EL_AGNI_M: case ELEID_EL_AQUA_M: case ELEID_EL_VENTUS_M: @@ -864,7 +864,7 @@ int read_elementaldb(void) { db->lv = atoi(str[3]); estatus = &db->status; - db->vd.class_ = db->class_; + db->vd.class = db->class_; estatus->max_hp = atoi(str[4]); estatus->max_sp = atoi(str[5]); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index cc920b888..91a455416 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1350,7 +1350,7 @@ void do_init_homunculus(bool minimal) { //Stock view data for homuncs memset(homun->dbs->viewdb, 0, sizeof(homun->dbs->viewdb)); for (class_ = 0; class_ < MAX_HOMUNCULUS_CLASS; class_++) - homun->dbs->viewdb[class_].class_ = HM_CLASS_BASE+class_; + homun->dbs->viewdb[class_].class = HM_CLASS_BASE + class_; } void do_final_homunculus(void) { diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 95c1f9be3..f5d3fe11c 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -444,7 +444,7 @@ bool read_mercenarydb_sub(char* str[], int columns, int current) { db->lv = atoi(str[3]); mstatus = &db->status; - db->vd.class_ = db->class_; + db->vd.class = db->class_; mstatus->max_hp = atoi(str[4]); mstatus->max_sp = atoi(str[5]); diff --git a/src/map/mob.c b/src/map/mob.c index c3fdbead2..d5932f195 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1652,7 +1652,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { memmove(&md->lootitem[0], &md->lootitem[1], (LOOTITEM_SIZE-1)*sizeof(md->lootitem[0])); memcpy (&md->lootitem[LOOTITEM_SIZE-1], &fitem->item_data, sizeof(md->lootitem[0])); } - if (pc->db_checkid(md->vd->class_)) { + if (pc->db_checkid(md->vd->class)) { //Give them walk act/delay to properly mimic players. [Skotlex] clif->takeitem(&md->bl,tbl); md->ud.canact_tick = tick + md->status.amotion; @@ -2684,7 +2684,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( !rebirth ) { - if( pc->db_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client. + if (pc->db_checkid(md->vd->class)) { + // Player mobs are not removed automatically by the client. /* first we set them dead, then we delay the out sight effect */ clif->clearunit_area(&md->bl,CLR_DEAD); clif->clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000); @@ -2831,7 +2832,7 @@ int mob_class_change (struct mob_data *md, int class_) { mob_stop_walking(md, STOPWALKING_FLAG_NONE); unit->skillcastcancel(&md->bl, 0); status->set_viewdata(&md->bl, class_); - clif->class_change(&md->bl, md->vd->class_, 1); + clif->class_change(&md->bl, md->vd->class, 1); status_calc_mob(md, SCO_FIRST); md->ud.state.speed_changed = 1; //Speed change update. @@ -4209,7 +4210,7 @@ int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *source) return 0; } md.mob_id = i32; - md.vd.class_ = md.mob_id; + md.vd.class = md.mob_id; if ((t = libconfig->setting_get_member(mobt, "Inherit")) && (inherit = libconfig->setting_get_bool(t))) { if (!mob->db_data[md.mob_id]) { @@ -4563,7 +4564,7 @@ void mob_name_constants(void) { *------------------------------------------*/ bool mob_readdb_mobavail(char* str[], int columns, int current) { - int class_, k; + int class_, view_class; nullpo_retr(false, str); class_=atoi(str[0]); @@ -4574,13 +4575,13 @@ bool mob_readdb_mobavail(char* str[], int columns, int current) return false; } - k=atoi(str[1]); + view_class = atoi(str[1]); memset(&mob->db_data[class_]->vd, 0, sizeof(struct view_data)); - mob->db_data[class_]->vd.class_=k; + mob->db_data[class_]->vd.class = view_class; //Player sprites - if(pc->db_checkid(k) && columns==12) { + if (pc->db_checkid(view_class) && columns == 12) { mob->db_data[class_]->vd.sex=atoi(str[2]); mob->db_data[class_]->vd.hair_style=atoi(str[3]); mob->db_data[class_]->vd.hair_color=atoi(str[4]); diff --git a/src/map/npc.c b/src/map/npc.c index 72c451ef9..a824d4216 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4961,11 +4961,11 @@ int do_init_npc(bool minimal) { //Stock view data for normal npcs. memset(&npc_viewdb, 0, sizeof(npc_viewdb)); - npc_viewdb[0].class_ = INVISIBLE_CLASS; //Invisible class is stored here. + npc_viewdb[0].class = INVISIBLE_CLASS; //Invisible class is stored here. for( i = 1; i < MAX_NPC_CLASS; i++ ) - npc_viewdb[i].class_ = i; + npc_viewdb[i].class = i; for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ ) - npc_viewdb2[i - MAX_NPC_CLASS2_START].class_ = i; + npc_viewdb2[i - MAX_NPC_CLASS2_START].class = i; npc->ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); npc->ev_label_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH); diff --git a/src/map/pc.c b/src/map/pc.c index 8d6910ce4..2cf5d75b4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1492,7 +1492,7 @@ int pc_reg_received(struct map_session_data *sd) } if (pc_isinvisible(sd)) { - sd->vd.class_ = INVISIBLE_CLASS; + sd->vd.class = INVISIBLE_CLASS; clif->message(sd->fd, msg_sd(sd,11)); // Invisible: On // decrement the number of pvp players on the map map->list[sd->bl.m].users_pvp--; @@ -1945,7 +1945,7 @@ int pc_disguise(struct map_session_data *sd, int class) clif->changeoption(&sd->bl); // We need to update the client so it knows that a costume is being used if( sd->sc.option&OPTION_COSTUME ) { - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); clif->changelook(&sd->bl,LOOK_WEAPON,0); clif->changelook(&sd->bl,LOOK_SHIELD,0); clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); @@ -8679,7 +8679,7 @@ int pc_jobchange(struct map_session_data *sd, int class, int upper) pc->disguise(sd, -1); status->set_viewdata(&sd->bl, class); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); // move sprite update to prevent client crashes with incompatible equipment [Valaris] + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris] if(sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); if (sd->vd.body_style) @@ -8779,7 +8779,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val) switch(type){ case LOOK_BASE: status->set_viewdata(&sd->bl, val); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); if (sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); @@ -8926,7 +8926,7 @@ int pc_setoption(struct map_session_data *sd,int type) if (new_look < 0) { //Restore normal look. status->set_viewdata(&sd->bl, sd->status.class); - new_look = sd->vd.class_; + new_look = sd->vd.class; } pc_stop_attack(sd); //Stop attacking on new view change (to prevent wedding/santa attacks. @@ -11743,7 +11743,7 @@ void pc_update_idle_time(struct map_session_data* sd, enum e_battle_config_idlet } //Checks if the given class value corresponds to a player class. [Skotlex] -//JOB_NOVICE isn't checked for class_ is supposed to be unsigned +//JOB_NOVICE isn't checked for class is supposed to be unsigned bool pc_db_checkid(int class) { return class < JOB_MAX_BASIC diff --git a/src/map/script.c b/src/map/script.c index 27db206cf..38931bd11 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11894,7 +11894,7 @@ BUILDIN(changebase) return true; } - if(sd->disguise == -1 && vclass != sd->vd.class_) + if (sd->disguise == -1 && vclass != sd->vd.class) pc->changelook(sd,LOOK_BASE,vclass); //Updated client view. Base, Weapon and Cloth Colors. return true; diff --git a/src/map/status.c b/src/map/status.c index c0ce1ac38..78c11899b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6432,7 +6432,7 @@ int status_get_class(const struct block_list *bl) nullpo_ret(bl); switch (bl->type) { case BL_PC: return BL_UCCAST(BL_PC, bl)->status.class; - case BL_MOB: return BL_UCCAST(BL_MOB, bl)->vd->class_; //Class used on all code should be the view class of the mob. + case BL_MOB: return BL_UCCAST(BL_MOB, bl)->vd->class; //Class used on all code should be the view class of the mob. case BL_PET: return BL_UCCAST(BL_PET, bl)->pet.class_; case BL_HOM: return BL_UCCAST(BL_HOM, bl)->homunculus.class_; case BL_MER: return BL_UCCAST(BL_MER, bl)->mercenary.class_; @@ -6827,7 +6827,7 @@ void status_set_viewdata(struct block_list *bl, int class_) break; } } - sd->vd.class_ = 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; @@ -6879,7 +6879,7 @@ void status_set_viewdata(struct block_list *bl, int class_) struct pet_data *pd = BL_UCAST(BL_PET, bl); if (vd != NULL) { memcpy(&pd->vd, vd, sizeof(struct view_data)); - if (!pc->db_checkid(vd->class_)) { + if (!pc->db_checkid(vd->class)) { pd->vd.hair_style = battle_config.pet_hair_style; if(pd->pet.equip) { pd->vd.head_bottom = itemdb_viewid(pd->pet.equip); @@ -9864,7 +9864,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_HANBOK: case SC_OKTOBERFEST: if( !vd ) break; - clif->changelook(bl,LOOK_BASE,vd->class_); + clif->changelook(bl, LOOK_BASE, vd->class); clif->changelook(bl,LOOK_WEAPON,0); clif->changelook(bl,LOOK_SHIELD,0); clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color); @@ -10264,7 +10264,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t clif->changeoption(bl); if( sd && opt_flag&0x4 ) { if (vd) - clif->changelook(bl,LOOK_BASE,vd->class_); + clif->changelook(bl, LOOK_BASE, vd->class); clif->changelook(bl,LOOK_WEAPON,0); clif->changelook(bl,LOOK_SHIELD,0); if (vd) @@ -11202,7 +11202,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const else if(opt_flag) { clif->changeoption(bl); if( sd && opt_flag&0x4 ) { - clif->changelook(bl,LOOK_BASE,sd->vd.class_); + clif->changelook(bl, LOOK_BASE, sd->vd.class); clif->get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield); clif->changelook(bl,LOOK_WEAPON,sd->vd.weapon); clif->changelook(bl,LOOK_SHIELD,sd->vd.shield); diff --git a/src/map/unit.h b/src/map/unit.h index a3241a4b9..d065b3d57 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -80,11 +80,7 @@ struct unit_data { }; struct view_data { -#ifdef __64BIT__ - uint32 class_; // FIXME: This shouldn't really depend on the architecture. -#else // not __64BIT__ - uint16 class_; -#endif // __64BIT__ + int16 class; uint16 weapon, shield, //Or left-hand weapon. robe, |