From 78f36299f3d878c935f8388ec23934239d0cdaa6 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 10 Oct 2009 07:02:51 +0000 Subject: Better logging, initial job experience gathering, naming fixes to the skill script commands --- src/map/mob.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index a5fc159..cec0b92 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2242,11 +2242,11 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) if (src && src->id == md->master_id && md->mode & MOB_MODE_TURNS_AGAINST_BAD_MASTER) { - /* If the master hits a monster, have the monster turn against him */ - md->master_id = 0; - md->mode = 0x85; /* Regular war mode */ - md->target_id = src->id; - md->attacked_id = src->id; + /* If the master hits a monster, have the monster turn against him */ + md->master_id = 0; + md->mode = 0x85; /* Regular war mode */ + md->target_id = src->id; + md->attacked_id = src->id; } max_hp = battle_get_max_hp(&md->bl); @@ -2313,6 +2313,14 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) } if(src && src->type == BL_MOB && ((struct mob_data*)src)->state.special_mob_ai){ struct mob_data *md2 = (struct mob_data *)src; + struct block_list *master_bl = map_id2bl(md2->master_id); + if (master_bl->type == BL_PC) { + MAP_LOG_PC(((struct map_session_data *)master_bl), "MOB-TO-MOB-DMG FROM MOB%d %d TO MOB%d %d FOR %d", + md2->bl.id, md2->class, + md->bl.id, md->class, + damage); + } + nullpo_retr(0, md2); for(i=0,minpos=0,mindmg=0x7fffffff;idmglog[i].id==md2->master_id) -- cgit v1.2.3-70-g09d2