From b879aa3fc756e6e5557a653420753b97d1af9bde Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 2 May 2012 02:15:17 +0000 Subject: @mi/@mobinfo: Added support for mob FLEE & HIT, dropped SP support (all official mobs have 1 sp). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16032 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 4 ++-- src/map/config/const.h | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index cad37b28f..e9b6732c8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6705,10 +6705,10 @@ ACMD_FUNC(mobinfo) else sprintf(atcmd_output, "Monster: '%s'/'%s'/'%s' (%d)", mob->name, mob->jname, mob->sprite, mob->vd.class_); clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, " Level:%d HP:%d SP:%d Base EXP:%u Job EXP:%u", mob->lv, mob->status.max_hp, mob->status.max_sp, mob->base_exp, mob->job_exp); + sprintf(atcmd_output, " Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d", mob->lv, mob->status.max_hp, mob->base_exp, mob->job_exp,MOB_HIT(mob), MOB_FLEE(mob)); clif_displaymessage(fd, atcmd_output); sprintf(atcmd_output, " 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.def, mob->status.mdef,mob->status.str, mob->status.agi, mob->status.vit, mob->status.int_, mob->status.dex, mob->status.luk); clif_displaymessage(fd, atcmd_output); diff --git a/src/map/config/const.h b/src/map/config/const.h index 420fe4927..2f9560803 100644 --- a/src/map/config/const.h +++ b/src/map/config/const.h @@ -66,12 +66,22 @@ #define DEFTYPE_MAX CHAR_MAX #endif - +/* pointer size fix which fixes several gcc warnings */ #ifdef __64BIT__ #define __64BPRTSIZE(y) (intptr)y #else #define __64BPRTSIZE(y) y #endif + +/* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ +#ifdef RENEWAL + #define MOB_FLEE(mob) ( mob->lv + mob->status.dex + mob->status.luk/3 + 175 ) + #define MOB_HIT(mob) ( mob->lv + mob->status.agi + mob->status.luk/5 + 100 ) +#else + #define MOB_FLEE(mob) ( mob->lv + mob->status.dex ) + #define MOB_HIT(mob) ( mob->lv + mob->status.agi ) +#endif + /** * End of File **/ -- cgit v1.2.3-70-g09d2