summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-28 03:21:42 +0200
committerGitHub <noreply@github.com>2018-07-28 03:21:42 +0200
commit621611e6e90af0c5551b4daca75ba1267d8e8478 (patch)
tree92ca087267778474df4c3589e22ec801f4c34622 /src/map/chat.c
parent164e79976b926da35612ce28cf84ebd9c2ac3d3e (diff)
parent7f5b041efd88bae052c98e1bd1c5e28676c73272 (diff)
downloadhercules-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/chat.c')
-rw-r--r--src/map/chat.c5
1 files changed, 5 insertions, 0 deletions
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