소스 검색

Cleanup of MVP mode checking (#5559)

Fixes #5368

Thanks to @mazvi, @attackjom and @aleos89
Lemongrass3110 4 년 전
부모
커밋
f37990414f

+ 2 - 2
conf/msg_conf/map_msg.conf

@@ -751,7 +751,7 @@
 716: Your '%s' is now: %d
 716: Your '%s' is now: %d
 
 
 // MVP EXP reward message
 // MVP EXP reward message
-717: Congratulations! You are the MVP! Your reward EXP Points are %u !!
+717: Congratulations! You are the MVP! Your reward EXP Points are %llu !!
 
 
 // @showrate
 // @showrate
 718: Personal rate information is not displayed now.
 718: Personal rate information is not displayed now.
@@ -1332,7 +1332,7 @@
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Element: %s (Lv:%d)
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Element: %s (Lv:%d)
 1245:  Drops:
 1245:  Drops:
 1246: This monster has no drops.
 1246: This monster has no drops.
-1247:  MVP Bonus EXP:%u
+1247:  MVP Bonus EXP:%llu
 1248:  MVP Items:
 1248:  MVP Items:
 1249: This monster has no MVP prizes.
 1249: This monster has no MVP prizes.
 
 

+ 1 - 1
conf/msg_conf/map_msg_chn.conf

@@ -1139,7 +1139,7 @@
 1244: 物理攻擊力:%d~%d 攻擊範圍:%d~%d~%d  體型:%s  種族: %s  屬性: %s (Lv:%d)
 1244: 物理攻擊力:%d~%d 攻擊範圍:%d~%d~%d  體型:%s  種族: %s  屬性: %s (Lv:%d)
 1245: 掉落:
 1245: 掉落:
 1246: 此魔物不掉落道具.
 1246: 此魔物不掉落道具.
-1247: MVP額外經驗值:%u
+1247: MVP額外經驗值:%llu
 1248: MVP額外獎勵道具:
 1248: MVP額外獎勵道具:
 1249: 此魔物無MVP額外獎勵道具.
 1249: 此魔物無MVP額外獎勵道具.
 
 

+ 1 - 1
conf/msg_conf/map_msg_frn.conf

@@ -1152,7 +1152,7 @@
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Elément: %s (Lv:%d)
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Elément: %s (Lv:%d)
 1245:  Drops:
 1245:  Drops:
 1246: Ce monstre n'a pas de drops.
 1246: Ce monstre n'a pas de drops.
-1247:  MVP Bonus EXP:%u
+1247:  MVP Bonus EXP:%llu
 1248:  MVP Items:
 1248:  MVP Items:
 1249: Ce monstre n'a pas de Prix spécial MVP.
 1249: Ce monstre n'a pas de Prix spécial MVP.
 
 

+ 1 - 4
conf/msg_conf/map_msg_idn.conf

@@ -743,9 +743,6 @@
 715: Point Shop: '%s'
 715: Point Shop: '%s'
 716: '%s' milikmu saat ini: %d
 716: '%s' milikmu saat ini: %d
 
 
-//Item Group
-717: [%s] mendapatkan [%s] dari '%s'
-
 //@showrate
 //@showrate
 718: Informasi mengenai rate pribadi tidak akan ditampilkan lagi.
 718: Informasi mengenai rate pribadi tidak akan ditampilkan lagi.
 719: Informasi mengenai rate pribadi akan ditampilkan kembali.
 719: Informasi mengenai rate pribadi akan ditampilkan kembali.
@@ -1243,7 +1240,7 @@
 1244: ATK:%d~%d  Jarak:%d~%d~%d  Ukuran:%s  Race: %s  Elemen: %s (Lv:%d)
 1244: ATK:%d~%d  Jarak:%d~%d~%d  Ukuran:%s  Race: %s  Elemen: %s (Lv:%d)
 1245: Barang yang dijatuhkan:
 1245: Barang yang dijatuhkan:
 1246: Monster ini tidak menjatuhkan barang.
 1246: Monster ini tidak menjatuhkan barang.
-1247: Bonus EXP MVP:%u
+1247: Bonus EXP MVP:%llu
 1248: Item MVP:
 1248: Item MVP:
 1249: Monster ini tidak memiliki bonus MVP.
 1249: Monster ini tidak memiliki bonus MVP.
 
 

+ 2 - 2
conf/msg_conf/map_msg_por.conf

@@ -755,7 +755,7 @@
 715: Lista de loja de pontos: '%s'
 715: Lista de loja de pontos: '%s'
 716: Seu '%s' agora é: %d
 716: Seu '%s' agora é: %d
 // MVP EXP reward message
 // MVP EXP reward message
-717: Parabéns! Você é o MVP! Sua recompensa EXP Points are %u !!
+717: Parabéns! Você é o MVP! Sua recompensa EXP Points are %llu !!
 
 
 // @showrate
 // @showrate
 718: As informações de taxa pessoal não são exibidas agora.
 718: As informações de taxa pessoal não são exibidas agora.
@@ -1322,7 +1322,7 @@
 1244:  ATQ:%d~%d  Alcance:%d~%d~%d  Tamanho:%s  Raça: %s  Elemento: %s (Nv:%d)
 1244:  ATQ:%d~%d  Alcance:%d~%d~%d  Tamanho:%s  Raça: %s  Elemento: %s (Nv:%d)
 1245:  Drops:
 1245:  Drops:
 1246: Este monstro não possui drops.
 1246: Este monstro não possui drops.
-1247:  EXP Bônus MVP:%u
+1247:  EXP Bônus MVP:%llu
 1248:  Itens MVP:
 1248:  Itens MVP:
 1249: Este monstro não possui prêmios MVP.
 1249: Este monstro não possui prêmios MVP.
 
 

+ 1 - 1
conf/msg_conf/map_msg_rus.conf

@@ -1152,7 +1152,7 @@
 1244:  ATK:%d~%d  Дальность:%d~%d~%d  Размер:%s  Раса: %s  Элемент: %s (Ур.:%d)
 1244:  ATK:%d~%d  Дальность:%d~%d~%d  Размер:%s  Раса: %s  Элемент: %s (Ур.:%d)
 1245:  Предметы:
 1245:  Предметы:
 1246: С этого монстра не падают предметы.
 1246: С этого монстра не падают предметы.
-1247:  MVP бонус к опыту:%u
+1247:  MVP бонус к опыту:%llu
 1248:  MVP предметы:
 1248:  MVP предметы:
 1249:  Этот монстр не имеет MVP призов.
 1249:  Этот монстр не имеет MVP призов.
 
 

+ 2 - 2
conf/msg_conf/map_msg_spn.conf

@@ -745,7 +745,7 @@
 716: Tu '%s' ahora es: %d
 716: Tu '%s' ahora es: %d
 
 
 // MVP EXP reward message
 // MVP EXP reward message
-717: ¡Enhorabuena! ¡Eres todo un MVP! ¡¡Puntos de experiencia obtenidos: %u!!
+717: ¡Enhorabuena! ¡Eres todo un MVP! ¡¡Puntos de experiencia obtenidos: %llu!!
 
 
 // @showrate
 // @showrate
 718: La información de ratio personal no se mostrará.
 718: La información de ratio personal no se mostrará.
@@ -1291,7 +1291,7 @@
 1244:  ATK:%d~%d  Rango:%d~%d~%d  Tamaño:%s  Raza: %s  Elemento: %s (Nv:%d)
 1244:  ATK:%d~%d  Rango:%d~%d~%d  Tamaño:%s  Raza: %s  Elemento: %s (Nv:%d)
 1245: Objetos:
 1245: Objetos:
 1246: Este monstruo no tiene ningún objeto.
 1246: Este monstruo no tiene ningún objeto.
-1247: Bono de EXP MVP:%u
+1247: Bono de EXP MVP:%llu
 1248: Objetos MVP:
 1248: Objetos MVP:
 1249: Este monstruo no tiene ningún objeto de MVP.
 1249: Este monstruo no tiene ningún objeto de MVP.
 
 

+ 1 - 1
conf/msg_conf/map_msg_tha.conf

@@ -1145,7 +1145,7 @@
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Element: %s (Lv:%d)
 1244:  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Element: %s (Lv:%d)
 1245:  Drops:
 1245:  Drops:
 1246: Monster ¹ÕéäÁèÁբͧµ¡.
 1246: Monster ¹ÕéäÁèÁբͧµ¡.
-1247:  MVP Bonus EXP:%u
+1247:  MVP Bonus EXP:%llu
 1248:  MVP Items:
 1248:  MVP Items:
 1249: Monster ¹ÕéäÁèÁբͧÃÒ§ÇÑÅ MVP.
 1249: Monster ¹ÕéäÁèÁբͧÃÒ§ÇÑÅ MVP.
 
 

+ 3 - 3
src/map/atcommand.cpp

@@ -7396,7 +7396,7 @@ ACMD_FUNC(mobinfo)
 		}
 		}
 #endif
 #endif
 		// stats
 		// stats
-		if (mob->mexp)
+		if( mob->get_bosstype() == BOSSTYPE_MVP )
 			sprintf(atcmd_output, msg_txt(sd,1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
 			sprintf(atcmd_output, msg_txt(sd,1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
 		else
 		else
 			sprintf(atcmd_output, msg_txt(sd,1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
 			sprintf(atcmd_output, msg_txt(sd,1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
@@ -7451,9 +7451,9 @@ ACMD_FUNC(mobinfo)
 		else if (j % 3 != 0)
 		else if (j % 3 != 0)
 			clif_displaymessage(fd, atcmd_output);
 			clif_displaymessage(fd, atcmd_output);
 		// mvp
 		// mvp
-		if (mob->mexp) {
+		if( mob->get_bosstype() == BOSSTYPE_MVP ){
 			float mvppercent, mvpremain;
 			float mvppercent, mvpremain;
-			sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); //  MVP Bonus EXP:%u
+			sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); //  MVP Bonus EXP:%llu
 			clif_displaymessage(fd, atcmd_output);
 			clif_displaymessage(fd, atcmd_output);
 			strcpy(atcmd_output, msg_txt(sd,1248)); //  MVP Items:
 			strcpy(atcmd_output, msg_txt(sd,1248)); //  MVP Items:
 			mvpremain = 100.0; //Remaining drop chance for official mvp drop mode
 			mvpremain = 100.0; //Remaining drop chance for official mvp drop mode

+ 5 - 5
src/map/clif.cpp

@@ -1169,7 +1169,7 @@ static void clif_set_unit_idle( struct block_list* bl, bool walking, send_target
 		p.maxHP = -1;
 		p.maxHP = -1;
 		p.HP = -1;
 		p.HP = -1;
 	}
 	}
-	p.isBoss = ( bl->type == BL_MOB && ( ( ( TBL_MOB *)bl )->db->mexp > 0 ) ) ? 1 : 0;
+	p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE;
 #endif
 #endif
 #if PACKETVER >= 20150513
 #if PACKETVER >= 20150513
 	p.body = vd->body_style;
 	p.body = vd->body_style;
@@ -1304,7 +1304,7 @@ static void clif_spawn_unit( struct block_list *bl, enum send_target target ){
 		p.HP = -1;
 		p.HP = -1;
 	}
 	}
 
 
-	p.isBoss = ( bl->type == BL_MOB && ( ( ( TBL_MOB *)bl)->db->mexp > 0 ) ) ? 1 : 0;
+	p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE;
 #endif
 #endif
 #if PACKETVER >= 20150513
 #if PACKETVER >= 20150513
 	p.body = vd->body_style;
 	p.body = vd->body_style;
@@ -1406,7 +1406,7 @@ static void clif_set_unit_walking( struct block_list *bl, struct map_session_dat
 		p.HP = -1;
 		p.HP = -1;
 	}
 	}
 
 
-	p.isBoss = ( bl->type == BL_MOB && (((TBL_MOB*)bl)->db->mexp > 0) ) ? 1 : 0;
+	p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE;
 #endif
 #endif
 #if PACKETVER >= 20150513
 #if PACKETVER >= 20150513
 	p.body = vd->body_style;
 	p.body = vd->body_style;
@@ -8381,7 +8381,7 @@ void clif_mvp_item( struct map_session_data *sd, t_itemid nameid ){
 
 
 /// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP).
 /// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP).
 /// 010b <exp>.L
 /// 010b <exp>.L
-void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) {
+void clif_mvp_exp(struct map_session_data *sd, t_exp exp) {
 #if PACKETVER >= 20131223		// Kro remove this packet [Napster]
 #if PACKETVER >= 20131223		// Kro remove this packet [Napster]
 	if (battle_config.mvp_exp_reward_message) {
 	if (battle_config.mvp_exp_reward_message) {
 		char e_msg[CHAT_SIZE_MAX];
 		char e_msg[CHAT_SIZE_MAX];
@@ -8396,7 +8396,7 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) {
 	fd = sd->fd;
 	fd = sd->fd;
 	WFIFOHEAD(fd, packet_len(0x10b));
 	WFIFOHEAD(fd, packet_len(0x10b));
 	WFIFOW(fd,0) = 0x10b;
 	WFIFOW(fd,0) = 0x10b;
-	WFIFOL(fd,2) = min(exp, (unsigned int)INT32_MAX);
+	WFIFOL(fd,2) = (uint32)min( exp, MAX_EXP );
 	WFIFOSET(fd, packet_len(0x10b));
 	WFIFOSET(fd, packet_len(0x10b));
 #endif
 #endif
 }
 }

+ 1 - 1
src/map/clif.hpp

@@ -765,7 +765,7 @@ void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv
 
 
 void clif_mvp_effect(struct map_session_data *sd);
 void clif_mvp_effect(struct map_session_data *sd);
 void clif_mvp_item(struct map_session_data *sd, t_itemid nameid);
 void clif_mvp_item(struct map_session_data *sd, t_itemid nameid);
-void clif_mvp_exp(struct map_session_data *sd, unsigned int exp);
+void clif_mvp_exp(struct map_session_data *sd, t_exp exp);
 void clif_mvp_noitem(struct map_session_data* sd);
 void clif_mvp_noitem(struct map_session_data* sd);
 void clif_changed_dir(struct block_list *bl, enum send_target target);
 void clif_changed_dir(struct block_list *bl, enum send_target target);
 
 

+ 1 - 1
src/map/map.cpp

@@ -2926,7 +2926,7 @@ int map_removemobs_sub(struct block_list *bl, va_list ap)
 	if( !battle_config.mob_remove_damaged && md->status.hp < md->status.max_hp )
 	if( !battle_config.mob_remove_damaged && md->status.hp < md->status.max_hp )
 		return 0;
 		return 0;
 	// is a mvp
 	// is a mvp
-	if( md->db->mexp > 0 )
+	if( md->get_bosstype() == BOSSTYPE_MVP )
 		return 0;
 		return 0;
 
 
 	unit_free(&md->bl,CLR_OUTSIGHT);
 	unit_free(&md->bl,CLR_OUTSIGHT);

+ 43 - 25
src/map/mob.cpp

@@ -386,6 +386,24 @@ struct view_data * mob_get_viewdata(int mob_id)
 	return &db->vd;
 	return &db->vd;
 }
 }
 
 
+e_mob_bosstype mob_db::get_bosstype(){
+	if( status_has_mode( &this->status, MD_MVP ) ){
+		return BOSSTYPE_MVP;
+	}else if( this->status.class_ == CLASS_BOSS ){
+		return BOSSTYPE_MINIBOSS;
+	}else{
+		return BOSSTYPE_NONE;
+	}
+}
+
+e_mob_bosstype mob_data::get_bosstype(){
+	if( this->db != nullptr ){
+		return this->db->get_bosstype();
+	}else{
+		return BOSSTYPE_NONE;
+	}
+}
+
 /**
 /**
  * Create unique view data associated to a spawned monster.
  * Create unique view data associated to a spawned monster.
  * @param md: Mob to adjust
  * @param md: Mob to adjust
@@ -572,7 +590,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target)
 		if( mapdata->flag[MF_ALLOWKS] || mapdata_flag_ks(mapdata) )
 		if( mapdata->flag[MF_ALLOWKS] || mapdata_flag_ks(mapdata) )
 			return false; // Ignores GVG, PVP and AllowKS map flags
 			return false; // Ignores GVG, PVP and AllowKS map flags
 
 
-		if( md->db->mexp || md->master_id )
+		if( md->get_bosstype() == BOSSTYPE_MVP || md->master_id )
 			return false; // MVP, Slaves mobs ignores KS
 			return false; // MVP, Slaves mobs ignores KS
 
 
 		if( (sce = md->sc.data[SC_KSPROTECTED]) == nullptr )
 		if( (sce = md->sc.data[SC_KSPROTECTED]) == nullptr )
@@ -2414,7 +2432,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
 				md->dmglog[i].id  = char_id;
 				md->dmglog[i].id  = char_id;
 				md->dmglog[i].flag= flag;
 				md->dmglog[i].flag= flag;
 
 
-				if(md->db->mexp)
+				if( md->get_bosstype() == BOSSTYPE_MVP )
 					pc_damage_log_add(map_charid2sd(char_id),md->bl.id);
 					pc_damage_log_add(map_charid2sd(char_id),md->bl.id);
 				break;
 				break;
 			}
 			}
@@ -2431,7 +2449,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
 			md->dmglog[minpos].flag= flag;
 			md->dmglog[minpos].flag= flag;
 			md->dmglog[minpos].dmg = damage;
 			md->dmglog[minpos].dmg = damage;
 
 
-			if(md->db->mexp)
+			if( md->get_bosstype() == BOSSTYPE_MVP )
 				pc_damage_log_add(map_charid2sd(char_id),md->bl.id);
 				pc_damage_log_add(map_charid2sd(char_id),md->bl.id);
 		}
 		}
 	}
 	}
@@ -2644,7 +2662,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 			if(battle_config.zeny_from_mobs && md->level) {
 			if(battle_config.zeny_from_mobs && md->level) {
 				 // zeny calculation moblv + random moblv [Valaris]
 				 // zeny calculation moblv + random moblv [Valaris]
 				zeny=(int) ((md->level+rnd()%md->level)*per*bonus/100.);
 				zeny=(int) ((md->level+rnd()%md->level)*per*bonus/100.);
-				if(md->db->mexp > 0)
+				if( md->get_bosstype() == BOSSTYPE_MVP )
 					zeny*=rnd()%250;
 					zeny*=rnd()%250;
 			}
 			}
 
 
@@ -2728,7 +2746,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 					pc_getzeny(tmpsd[i], zeny, LOG_TYPE_PICKDROP_MONSTER, NULL);
 					pc_getzeny(tmpsd[i], zeny, LOG_TYPE_PICKDROP_MONSTER, NULL);
 			}
 			}
 
 
-			if( md->db->mexp )
+			if( md->get_bosstype() == BOSSTYPE_MVP )
 				pc_damage_log_clear(tmpsd[i],md->bl.id);
 				pc_damage_log_clear(tmpsd[i],md->bl.id);
 		}
 		}
 
 
@@ -2916,35 +2934,35 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr_t)dlist);
 		add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr_t)dlist);
 	}
 	}
 
 
-	if(mvp_sd && md->db->mexp > 0 && !md->special_state.ai) {
+	if( mvp_sd && md->get_bosstype() == BOSSTYPE_MVP ){
 		t_itemid log_mvp_nameid = 0;
 		t_itemid log_mvp_nameid = 0;
 		t_exp log_mvp_exp = 0;
 		t_exp log_mvp_exp = 0;
-		unsigned int mexp;
-		struct item item;
-		double exp;
+
+		clif_mvp_effect( mvp_sd );
 
 
 		//mapflag: noexp check [Lorky]
 		//mapflag: noexp check [Lorky]
-		if (map_getmapflag(m, MF_NOBASEEXP) || type&2)
-			exp =1;
-		else {
-			exp = md->db->mexp;
+		if( md->db->mexp > 0 && !( map_getmapflag( m, MF_NOBASEEXP ) || type&2 ) ){
+			log_mvp_exp = md->db->mexp;
 
 
 #if defined(RENEWAL_EXP)
 #if defined(RENEWAL_EXP)
 			int penalty = pc_level_penalty_mod( mvp_sd, PENALTY_MVP_EXP, nullptr, md );
 			int penalty = pc_level_penalty_mod( mvp_sd, PENALTY_MVP_EXP, nullptr, md );
 
 
-			exp = cap_value( apply_rate( exp, penalty ), 0, MAX_EXP );
+			log_mvp_exp = cap_value( apply_rate( log_mvp_exp, penalty ), 0, MAX_EXP );
 #endif
 #endif
 
 
-			if (count > 1)
-				exp += exp*(battle_config.exp_bonus_attacker*(count-1))/100.; //[Gengar]
-		}
+			if( battle_config.exp_bonus_attacker > 0 && count > 1 ){
+				if( count > battle_config.exp_bonus_max_attacker ){
+					count = battle_config.exp_bonus_max_attacker;
+				}
+
+				log_mvp_exp += log_mvp_exp * ( battle_config.exp_bonus_attacker * ( count - 1 ) ) / 100;
+			}
 
 
-		mexp = (unsigned int)cap_value(exp, 1, UINT_MAX);
+			log_mvp_exp = cap_value( log_mvp_exp, 1, MAX_EXP );
 
 
-		clif_mvp_effect(mvp_sd);
-		clif_mvp_exp(mvp_sd,mexp);
-		pc_gainexp(mvp_sd, &md->bl, mexp,0, 0);
-		log_mvp_exp = mexp;
+			clif_mvp_exp( mvp_sd, log_mvp_exp );
+			pc_gainexp( mvp_sd, &md->bl, log_mvp_exp, 0, 0 );
+		}
 
 
 		if( !(map_getmapflag(m, MF_NOMVPLOOT) || type&1) ) {
 		if( !(map_getmapflag(m, MF_NOMVPLOOT) || type&1) ) {
 			//Order might be random depending on item_drop_mvp_mode config setting
 			//Order might be random depending on item_drop_mvp_mode config setting
@@ -2995,7 +3013,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 						continue;
 						continue;
 				}
 				}
 
 
-				memset(&item,0,sizeof(item));
+				struct item item = {};
 				item.nameid=mdrop[i].nameid;
 				item.nameid=mdrop[i].nameid;
 				item.identify= itemdb_isidentified(item.nameid);
 				item.identify= itemdb_isidentified(item.nameid);
 				clif_mvp_item(mvp_sd,item.nameid);
 				clif_mvp_item(mvp_sd,item.nameid);
@@ -5410,8 +5428,8 @@ static void mob_drop_ratio_adjust(void){
 				ratemin = battle_config.item_drop_treasure_min;
 				ratemin = battle_config.item_drop_treasure_min;
 				ratemax = battle_config.item_drop_treasure_max;
 				ratemax = battle_config.item_drop_treasure_max;
 			} else {
 			} else {
-				bool is_mvp = status_has_mode(&mob->status,MD_MVP);
-				bool is_boss = (mob->status.class_ == CLASS_BOSS);
+				bool is_mvp = mob->get_bosstype() == BOSSTYPE_MVP;
+				bool is_boss = mob->get_bosstype() == BOSSTYPE_MINIBOSS;
 
 
 				is_treasurechest = false;
 				is_treasurechest = false;
 
 

+ 10 - 0
src/map/mob.hpp

@@ -129,6 +129,12 @@ enum e_random_monster_flags {
 	RMF_ALL				= 0xFF, ///< Apply all flags
 	RMF_ALL				= 0xFF, ///< Apply all flags
 };
 };
 
 
+enum e_mob_bosstype : uint8{
+	BOSSTYPE_NONE,
+	BOSSTYPE_MINIBOSS,
+	BOSSTYPE_MVP
+};
+
 struct mob_skill {
 struct mob_skill {
 	enum MobSkillState state;
 	enum MobSkillState state;
 	uint16 skill_id,skill_lv;
 	uint16 skill_id,skill_lv;
@@ -180,6 +186,8 @@ struct mob_db {
 	unsigned int option;
 	unsigned int option;
 	int maxskill;
 	int maxskill;
 	struct mob_skill skill[MAX_MOBSKILL];
 	struct mob_skill skill[MAX_MOBSKILL];
+
+	e_mob_bosstype get_bosstype();
 };
 };
 
 
 struct mob_data {
 struct mob_data {
@@ -248,6 +256,8 @@ struct mob_data {
 	 * MvP Tombstone NPC ID
 	 * MvP Tombstone NPC ID
 	 **/
 	 **/
 	int tomb_nid;
 	int tomb_nid;
+
+	e_mob_bosstype get_bosstype();
 };
 };
 
 
 class MobAvailDatabase : public YamlDatabase {
 class MobAvailDatabase : public YamlDatabase {