From 19aa33a5f61f0996d76d19db7dbe9d81f5daa090 Mon Sep 17 00:00:00 2001 From: smokexyz Date: Sat, 30 Jun 2018 04:20:03 +0100 Subject: Implementation of the official Achievement System. Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 Script Commands - ``` achievement_progress(,,,{,}); ``` Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out. This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules. Does not include the title system yet. A big thanks to - @MishimaHaruna for constantly reviewing. @4144 for all the support. @Asheraf for a lot of official information. Co-authored-by: "Dastgir" --- src/map/chat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/map/chat.c') diff --git a/src/map/chat.c b/src/map/chat.c index 9852131be..d9b642219 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -29,6 +29,7 @@ #include "map/npc.h" // npc_event_do() #include "map/pc.h" #include "map/skill.h" // ext_skill_unit_onplace() +#include "map/achievement.h" #include "common/cbasetypes.h" #include "common/memmgr.h" #include "common/mmo.h" @@ -126,6 +127,7 @@ static bool chat_createpcchat(struct map_session_data *sd, const char *title, co pc_stop_attack(sd); clif->createchat(sd,0); // 0 = success clif->dispchat(cd,0); + achievement->validate_chatroom_create(sd); // Achievements [Smokexyz/Hercules] return true; } clif->createchat(sd,1); // 1 = Room limit exceeded @@ -181,6 +183,9 @@ static bool chat_joinchat(struct map_session_data *sd, int chatid, const char *p cd->usersd[cd->users] = sd; cd->users++; + if (cd->owner->type == BL_PC) + achievement->validate_chatroom_members(BL_UCAST(BL_PC, cd->owner), cd->users); + pc_setchatid(sd,cd->bl.id); clif->joinchatok(sd, cd); //To the person who newly joined the list of all -- cgit v1.2.3-60-g2f50