diff options
author | Haru <haru@dotalux.com> | 2018-07-28 03:21:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 03:21:42 +0200 |
commit | 621611e6e90af0c5551b4daca75ba1267d8e8478 (patch) | |
tree | 92ca087267778474df4c3589e22ec801f4c34622 /src/map/mob.c | |
parent | 164e79976b926da35612ce28cf84ebd9c2ac3d3e (diff) | |
parent | 7f5b041efd88bae052c98e1bd1c5e28676c73272 (diff) | |
download | hercules-621611e6e90af0c5551b4daca75ba1267d8e8478.tar.gz hercules-621611e6e90af0c5551b4daca75ba1267d8e8478.tar.bz2 hercules-621611e6e90af0c5551b4daca75ba1267d8e8478.tar.xz hercules-621611e6e90af0c5551b4daca75ba1267d8e8478.zip |
Merge pull request #2067 from dastgirp/1-achievement
Implemented Achievement System and Title System
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 0dbff9211..27039490c 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -44,6 +44,7 @@ #include "map/script.h" #include "map/skill.h" #include "map/status.h" +#include "map/achievement.h" #include "common/HPM.h" #include "common/cbasetypes.h" #include "common/conf.h" @@ -2188,6 +2189,10 @@ static void mob_damage(struct mob_data *md, struct block_list *src, int damage) if (src) mob->log_damage(md, src, damage); md->dmgtick = timer->gettick(); + + // Achievements [Smokexyz/Hercules] + if (src != NULL && src->type == BL_PC) + achievement->validate_mob_damage(BL_UCAST(BL_PC, src), damage, false); } if (battle_config.show_mob_info&3) @@ -2420,6 +2425,8 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) } if(zeny) // zeny from mobs [Valaris] pc->getzeny(tmpsd[i], zeny, LOG_TYPE_PICKDROP_MONSTER, NULL); + + achievement->validate_mob_kill(tmpsd[i], md->db->mob_id); // Achievements [Smokexyz/Hercules] } } |