Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #007453

  • 0 - None Assigned

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

@mobinfo & @iteminfo not showing the correct information depending the level

Posted by Napster on 01 July 2013 - 03:36 PM

Apparently it's been fixed o_O

i don't know but hercules not fix -_-

/*==========================================
 * Show Monster DB Info   v 1.0
 * originally by [Lupus]
 *------------------------------------------*/
ACMD(mobinfo)
{
	unsigned char msize[3][7] = {"Small", "Medium", "Large"};
	unsigned char mrace[12][11] = {"Formless", "Undead", "Beast", "Plant", "Insect", "Fish", "Demon", "Demi-Human", "Angel", "Dragon", "Boss", "Non-Boss"};
	unsigned char melement[10][8] = {"Neutral", "Water", "Earth", "Fire", "Wind", "Poison", "Holy", "Dark", "Ghost", "Undead"};
	char atcmd_output2[CHAT_SIZE_MAX];
	struct item_data *item_data;
	struct mob_db *mob, *mob_array[MAX_SEARCH];
	int count;
	int i, j, k;
	
	memset(atcmd_output, '\0', sizeof(atcmd_output));
	memset(atcmd_output2, '\0', sizeof(atcmd_output2));
	
	if (!message || !*message) {
		clif->message(fd, msg_txt(1239)); // Please enter a monster name/ID (usage: @mobinfo <monster_name_or_monster_ID>).
		return false;
	}
	
	// If monster identifier/name argument is a name
	if ((i = mobdb_checkid(atoi(message))))
	{
		mob_array[0] = mob_db(i);
		count = 1;
	} else
		count = mobdb_searchname_array(mob_array, MAX_SEARCH, message);
	
	if (!count) {
		clif->message(fd, msg_txt(40)); // Invalid monster ID or name.
		return false;
	}
	
	if (count > MAX_SEARCH) {
		sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count);
		clif->message(fd, atcmd_output);
		count = MAX_SEARCH;
	}
	for (k = 0; k < count; k++) {
		mob = mob_array[k];
		
		// stats
		if (mob->mexp)
			sprintf(atcmd_output, msg_txt(1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
		else
			sprintf(atcmd_output, msg_txt(1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
		clif->message(fd, atcmd_output);
		sprintf(atcmd_output, msg_txt(1242), mob->lv, mob->status.max_hp, mob->base_exp, mob->job_exp,MOB_HIT(mob), MOB_FLEE(mob)); //  Lv:%d  HP:%d  Base EXP:%u  Job EXP:%u  HIT:%d  FLEE:%d
		clif->message(fd, atcmd_output);
		sprintf(atcmd_output, msg_txt(1243), //  DEF:%d  MDEF:%d  STR:%d  AGI:%d  VIT:%d  INT:%d  DEX:%d  LUK:%d
				mob->status.def, mob->status.mdef,mob->status.str, mob->status.agi,
				mob->status.vit, mob->status.int_, mob->status.dex, mob->status.luk);
		clif->message(fd, atcmd_output);
		
		sprintf(atcmd_output, msg_txt(1244), //  ATK:%d~%d  Range:%d~%d~%d  Size:%s  Race: %s  Element: %s (Lv:%d)
				mob->status.rhw.atk, mob->status.rhw.atk2, mob->status.rhw.range,
				mob->range2 , mob->range3, msize[mob->status.size],
				mrace[mob->status.race], melement[mob->status.def_ele], mob->status.ele_lv);
		clif->message(fd, atcmd_output);
		// drops
		clif->message(fd, msg_txt(1245)); //  Drops:
		strcpy(atcmd_output, " ");
		j = 0;
		for (i = 0; i < MAX_MOB_DROP; i++) {
			int droprate;
			if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb->exists(mob->dropitem[i].nameid)) == NULL)
				continue;
			droprate = mob->dropitem[i].p;
			
			if (item_data->slot)
				sprintf(atcmd_output2, " - %s[%d]  %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100);
			else
				sprintf(atcmd_output2, " - %s  %02.02f%%", item_data->jname, (float)droprate / 100);
			strcat(atcmd_output, atcmd_output2);
			if (++j % 3 == 0) {
				clif->message(fd, atcmd_output);
				strcpy(atcmd_output, " ");
			}
		}
		if (j == 0)
			clif->message(fd, msg_txt(1246)); // This monster has no drops.
		else if (j % 3 != 0)
			clif->message(fd, atcmd_output);
		// mvp
		if (mob->mexp) {
			sprintf(atcmd_output, msg_txt(1247), mob->mexp); //  MVP Bonus EXP:%u
			clif->message(fd, atcmd_output);
			strcpy(atcmd_output, msg_txt(1248)); //  MVP Items:
			j = 0;
			for (i = 0; i < MAX_MVP_DROP; i++) {
				if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb->exists(mob->mvpitem[i].nameid)) == NULL)
					continue;
				if (mob->mvpitem[i].p > 0) {
					j++;
					if (j == 1)
						sprintf(atcmd_output2, " %s  %02.02f%%", item_data->jname, (float)mob->mvpitem[i].p / 100);
					else
						sprintf(atcmd_output2, " - %s  %02.02f%%", item_data->jname, (float)mob->mvpitem[i].p / 100);
					strcat(atcmd_output, atcmd_output2);
				}
			}
			if (j == 0)
				clif->message(fd, msg_txt(1249)); // This monster has no MVP prizes.
			else
				clif->message(fd, atcmd_output);
		}
	}
	return true;
}


I can't see any difference between Ind's previous fixed to our current code..

:meow:

I can't see any difference between Ind's previous fixed to our current code..

:meow:

It looks like the luk was dropped out of the formula (up to you malufett to tell whether that formula they modified is correct or not), link from their repo
https://github.com/H...e5faaee6f1f19ae

@ind

i mean difference code in command
		base_exp = mob->base_exp;
		job_exp = mob->job_exp;

#ifdef RENEWAL_EXP
		if( battle_config.atcommand_mobinfo_type ) {
			base_exp = base_exp * pc_level_penalty_mod(sd, mob->lv, mob->status.race, mob->status.mode, 1) / 100;
			job_exp = job_exp * pc_level_penalty_mod(sd, mob->lv, mob->status.race, mob->status.mode, 1) / 100;
		}
#endif
and
#ifdef RENEWAL_DROP
			if( battle_config.atcommand_mobinfo_type ) {
				droprate = droprate * pc_level_penalty_mod(sd, mob->lv, mob->status.race, mob->status.mode, 2) / 100;
				if (droprate <= 0 && !battle_config.drop_rate0item)
						droprate = 1;
			}
#endif
and
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
/*==========================================
 * Renewal EXP/Itemdrop rate modifier base on level penalty
 * 1=exp 2=itemdrop
 *------------------------------------------*/
int pc_level_penalty_mod(struct map_session_data *sd, int mob_level, uint32 mob_race, uint32 mob_mode, int type)
{
	int diff, rate = 100, i;

	nullpo_ret(sd);

	diff = mob_level - sd->status.base_level;

	if( diff < 0 )
		diff = MAX_LEVEL + ( ~diff + 1 );

	for(i=0; i<RC_MAX; i++){
		int tmp;

		if( mob_race != i ){
			if( mob_mode&MD_BOSS && i < RC_BOSS )
				i = RC_BOSS;
			else if( i <= RC_BOSS )
				continue;
		}

		if( (tmp=level_penalty[type][i][diff]) > 0 ){
			rate = tmp;
			break;
		}
	}

	return rate;
}
#endif
ps. this code from rA



I can't see any difference between Ind's previous fixed to our current code..

:meow:

It looks like the luk was dropped out of the formula (up to you malufett to tell whether that formula they modified is correct or not), link from their repo
https://github.com/H...e5faaee6f1f19ae

I already fixed that before..:D
https://github.com/H...dbe3bee54424af7

:meow:

Ind 
changed status to: Confirmed

Ind 
changed status to: Started

Ind 
changed status to: Fixed