summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2015-01-17 03:34:18 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2015-01-17 03:34:18 +0800
commit67fbbd2b41ae93c095232bb6b07615261245436f (patch)
tree4ff4414947b8e01dcac45aa789c325142eef7c8c /src/map/clif.c
parent06166cac023cefa193926de5a47dd7bc11f298b3 (diff)
downloadhercules-67fbbd2b41ae93c095232bb6b07615261245436f.tar.gz
hercules-67fbbd2b41ae93c095232bb6b07615261245436f.tar.bz2
hercules-67fbbd2b41ae93c095232bb6b07615261245436f.tar.xz
hercules-67fbbd2b41ae93c095232bb6b07615261245436f.zip
Fixed Bug#8497
-http://hercules.ws/board/tracker/issue-8497-all-mercenaries-miss-hit-for-0/?gopid=24434#entry24434 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c20d6585e..9db3cee03 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16096,13 +16096,27 @@ void clif_mercenary_info(struct map_session_data *sd) {
WFIFOL(fd,2) = md->bl.id;
// Mercenary shows ATK as a random value between ATK ~ ATK2
- atk = rnd()%(mstatus->rhw.atk2 - mstatus->rhw.atk + 1) + mstatus->rhw.atk;
- WFIFOW(fd,6) = cap_value(atk, 0, INT16_MAX);
+#ifdef RENEWAL
+ atk = status->get_weapon_atk(&md->bl, &mstatus->rhw, 0);
+#else
+ atk = rnd() % (mstatus->rhw.atk2 - mstatus->rhw.atk + 1) + mstatus->rhw.atk;
+#endif
+ WFIFOW(fd, 6) = cap_value(atk, 0, INT16_MAX);
+#ifdef RENEWAL
+ atk = status->base_matk(&md->bl, mstatus, status->get_lv(&md->bl));
+ WFIFOW(fd,8) = cap_value(atk, 0, INT16_MAX);
+#else
WFIFOW(fd,8) = cap_value(mstatus->matk_max, 0, INT16_MAX);
+#endif
WFIFOW(fd,10) = mstatus->hit;
WFIFOW(fd,12) = mstatus->cri/10;
+#ifdef RENEWAL
+ WFIFOW(fd, 14) = mstatus->def2;
+ WFIFOW(fd, 16) = mstatus->mdef2;
+#else
WFIFOW(fd,14) = mstatus->def;
WFIFOW(fd,16) = mstatus->mdef;
+#endif
WFIFOW(fd,18) = mstatus->flee;
WFIFOW(fd,20) = mstatus->amotion;
safestrncpy((char*)WFIFOP(fd,22), md->db->name, NAME_LENGTH);