From a4c5e17bba98d65bedf917c03bb60bf0550af688 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 27 Sep 2013 14:31:26 -0300 Subject: HPM: Chat.c Completed Moved missing vars and declarations of interest into the interface, removed duplicate mentions of chat within calls to shorten wherever it made sense to, and renamed some members to ease reading. Signed-off-by: shennetsind --- src/map/chat.h | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'src/map/chat.h') diff --git a/src/map/chat.h b/src/map/chat.h index a7736e9f3..695e59b6e 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -1,12 +1,15 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams + #ifndef _CHAT_H_ #define _CHAT_H_ + #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE + struct map_session_data; struct chat_data; - struct chat_data { struct block_list bl; // data for this map object char title[CHATROOM_TITLE_SIZE]; // room title @@ -21,33 +24,32 @@ struct chat_data { struct map_session_data* usersd[20]; struct block_list* owner; char npc_event[EVENT_NAME_LENGTH]; + /* isn't this a waste? there is a enormous overhead, wouldn't something like skill_blockpc_start be better here? [Ind] */ DBMap* kick_list; //DBMap of users who were kicked from this chat }; - - - /*===================================== * Interface : chat.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ struct chat_interface { - /* funcs */ - - int (*createpcchat) (struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); - int (*joinchat) (struct map_session_data* sd, int chatid, const char* pass); - int (*leavechat) (struct map_session_data* sd, bool kicked); - int (*changechatowner) (struct map_session_data* sd, const char* nextownername); - int (*changechatstatus) (struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); - int (*kickchat) (struct map_session_data* sd, const char* kickusername); - int (*createnpcchat) (struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl); - int (*deletenpcchat) (struct npc_data* nd); - int (*enableevent) (struct chat_data* cd); - int (*disableevent) (struct chat_data* cd); - int (*npckickall) (struct chat_data* cd); -} chat_s; + /* funcs */ + int (*create_pc_chat) (struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); + int (*join) (struct map_session_data* sd, int chatid, const char* pass); + int (*leave) (struct map_session_data* sd, bool kicked); + int (*change_owner) (struct map_session_data* sd, const char* nextownername); + int (*change_status) (struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); + int (*kick) (struct map_session_data* sd, const char* kickusername); + int (*create_npc_chat) (struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl); + int (*delete_npc_chat) (struct npc_data* nd); + int (*enable_event) (struct chat_data* cd); + int (*disable_event) (struct chat_data* cd); + int (*npc_kick_all) (struct chat_data* cd); + int (*trigger_event) (struct chat_data *cd); + struct chat_data* (*create) (struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl); +}; struct chat_interface *chat; -- cgit v1.2.3-60-g2f50