summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-19 15:50:41 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-19 15:50:41 +0000
commitb9804183841afd5381069796096a154edb5b9f53 (patch)
tree95e6f70d9ecd43e727d0defe1b02a818bc191169
parent3bd682b3cb3507c8a57fa6930475808981fd0663 (diff)
downloadhercules-b9804183841afd5381069796096a154edb5b9f53.tar.gz
hercules-b9804183841afd5381069796096a154edb5b9f53.tar.bz2
hercules-b9804183841afd5381069796096a154edb5b9f53.tar.xz
hercules-b9804183841afd5381069796096a154edb5b9f53.zip
Reformatting @_@
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/char/char.c39
-rw-r--r--src/char/int_status.c22
-rw-r--r--src/char/inter.c11
-rw-r--r--src/char_sql/int_party.c3
-rw-r--r--src/char_sql/inter.c6
-rw-r--r--src/char_sql/itemdb.c15
-rw-r--r--src/common/core.c9
-rw-r--r--src/common/malloc.c24
-rw-r--r--src/common/mapindex.c12
-rw-r--r--src/common/nullpo.c9
-rw-r--r--src/common/timer.c6
-rw-r--r--src/ladmin/ladmin.c138
-rw-r--r--src/login/login.c30
-rw-r--r--src/map/atcommand.c734
-rw-r--r--src/map/battle.c65
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/charcommand.c504
-rw-r--r--src/map/chat.c18
-rw-r--r--src/map/chrif.c115
-rw-r--r--src/map/clif.c1438
-rw-r--r--src/map/guild.c12
-rw-r--r--src/map/intif.c36
-rw-r--r--src/map/irc.c18
-rw-r--r--src/map/itemdb.c81
-rw-r--r--src/map/log.c3
-rw-r--r--src/map/map.c352
-rw-r--r--src/map/mob.c190
-rw-r--r--src/map/npc.c136
-rw-r--r--src/map/npc_chat.c27
-rw-r--r--src/map/party.c12
-rw-r--r--src/map/path.c40
-rw-r--r--src/map/pc.c413
-rw-r--r--src/map/pet.c21
-rw-r--r--src/map/script.c665
-rw-r--r--src/map/skill.c232
-rw-r--r--src/map/status.c49
-rw-r--r--src/map/storage.c43
-rw-r--r--src/map/trade.c48
-rw-r--r--src/map/unit.c81
-rw-r--r--src/map/vending.c12
-rw-r--r--src/plugins/gui.c6
-rw-r--r--src/plugins/sig.c6
-rw-r--r--src/tool/adduser.c7
-rw-r--r--src/txt-converter/char-converter.c9
-rw-r--r--src/txt-converter/login-converter.c3
45 files changed, 2236 insertions, 3465 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 49ccb7016..adfb40151 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -412,8 +412,8 @@ void set_all_offline(int id) {
/*---------------------------------------------------
Make a data line for friends list
--------------------------------------------------*/
-
-int mmo_friends_list_data_str(char *str, struct mmo_charstatus *p) {
+int mmo_friends_list_data_str(char *str, struct mmo_charstatus *p)
+{
int i;
char *str_p = str;
str_p += sprintf(str_p, "%d", p->char_id);
@@ -435,14 +435,6 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p, struct global_reg *reg,
int i,j;
char *str_p = str;
- /* We shouldn't need this anymore... [Skotlex]
- // on multi-map server, sometimes it's posssible that last_point become void. (reason???) We check that to not lost character at restart.
- if (!p->last_point.map) {
- p->last_point.map = mapindex_name2id(MAP_PRONTERA);
- p->last_point.x = 273;
- p->last_point.y = 354;
- }
- */
str_p += sprintf(str_p,
"%d\t%d,%d\t%s\t%d,%d,%d\t%u,%u,%d" //Up to Zeny field
"\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" //Up to Skill Point
@@ -648,33 +640,6 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
p->account_id = tmp_int[1];
p->char_num = tmp_int[2];
p->class_ = tmp_int[3];
-/* Unneeded unless you are running a real old character database now.
- //Temporal fix until all chars are reverted from peco-flying-class to
- //normal classes. [Skotlex]
- switch (p->class_) {
- case JOB_KNIGHT2: //Job_Knight2
- p->class_ = JOB_KNIGHT;
- break;
- case JOB_CRUSADER2: //Job_Crusader2
- p->class_ = JOB_CRUSADER;
- break;
- case JOB_LORD_KNIGHT2: //Job_Lord_Knight2
- p->class_ = JOB_LORD_KNIGHT;
- break;
- case JOB_PALADIN2: //Job_Paladin2
- p->class_ = JOB_PALADIN;
- break;
- case JOB_BABY_KNIGHT2: //Job_Baby_Knight2
- p->class_ = JOB_BABY_KNIGHT;
- break;
- case JOB_BABY_CRUSADER2: //Job_Baby_Crusader2
- p->class_ = JOB_BABY_CRUSADER;
- break;
- case JOB_STAR_GLADIATOR2: //Job_Star_Gladiator2
- p->class_ = JOB_STAR_GLADIATOR;
- break;
- }
-*/
p->base_level = tmp_int[4];
p->job_level = tmp_int[5];
p->base_exp = tmp_uint[0];
diff --git a/src/char/int_status.c b/src/char/int_status.c
index 719820f3e..ccab32431 100644
--- a/src/char/int_status.c
+++ b/src/char/int_status.c
@@ -23,8 +23,7 @@ static void* create_scdata(DBKey key, va_list args) {
/*==========================================
* Loads status change data of the player given. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
struct scdata* status_search_scdata(int aid, int cid)
{
struct scdata *data;
@@ -35,8 +34,7 @@ struct scdata* status_search_scdata(int aid, int cid)
/*==========================================
* Deletes status change data of the player given. [Skotlex]
* Should be invoked after the data of said player was successfully loaded.
- *------------------------------------------
- */
+ *------------------------------------------*/
void status_delete_scdata(int aid, int cid)
{
struct scdata *scdata = idb_remove(scdata_db, cid);
@@ -87,8 +85,7 @@ static int inter_scdata_fromstr(char *line, struct scdata *sc_data)
}
/*==========================================
* Loads all scdata from the given filename.
- *------------------------------------------
- */
+ *------------------------------------------*/
void status_load_scdata(const char* filename)
{
FILE *fp;
@@ -138,8 +135,7 @@ static int inter_status_save_sub(DBKey key, void *data, va_list ap) {
/*==========================================
* Saves all scdata to the given filename.
- *------------------------------------------
- */
+ *------------------------------------------*/
void inter_status_save()
{
FILE *fp;
@@ -155,8 +151,7 @@ void inter_status_save()
/*==========================================
* Initializes db.
- *------------------------------------------
- */
+ *------------------------------------------*/
void status_init()
{
scdata_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
@@ -165,8 +160,7 @@ void status_init()
/*==========================================
* Frees up memory.
- *------------------------------------------
- */
+ *------------------------------------------*/
static int scdata_db_final(DBKey k,void *d,va_list ap)
{
struct scdata *data = (struct scdata*)d;
@@ -178,10 +172,10 @@ static int scdata_db_final(DBKey k,void *d,va_list ap)
/*==========================================
* Final cleanup.
- *------------------------------------------
- */
+ *------------------------------------------*/
void status_final(void)
{
scdata_db->destroy(scdata_db, scdata_db_final);
}
+
#endif //ENABLE_SC_SAVING
diff --git a/src/char/inter.c b/src/char/inter.c
index d500da301..e8051f40c 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -171,8 +171,7 @@ int inter_accreg_save(void) {
#endif //TXT_SQL_CONVERT
/*==========================================
* 設定ファイルを読み込む
- *------------------------------------------
- */
+ *------------------------------------------*/
static int inter_config_read(const char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
@@ -533,14 +532,6 @@ int mapif_parse_WisRequest(int fd) {
}
//Not found.
return mapif_wis_fail(fd, RFIFOP(fd, 4));
-
-/* Scrapped since now we know where characters are online in. [Skotlex]
- wd = mapif_create_whisper(fd, RFIFOP(fd, 4), RFIFOP(fd,28), RFIFOP(fd,52), RFIFOW(fd,2)-52);
- if (!wd) return 0;
- idb_put(wis_db, wd->id, wd);
- mapif_wis_message(wd);
- return 0;
-*/
}
// Wisp/page transmission result
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index 01b960cd2..dbb431cfd 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -300,7 +300,8 @@ struct party_data *inter_party_fromsql(int party_id)
return p;
}
-int inter_party_sql_init(void){
+int inter_party_sql_init(void)
+{
//memory alloc
party_db_ = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
party_pt = (struct party_data*)aCalloc(sizeof(struct party_data), 1);
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index 3d922b85a..0702ed3e7 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -189,9 +189,9 @@ int inter_accreg_sql_init(void)
/*==========================================
* read config file
- *------------------------------------------
- */
-static int inter_config_read(const char *cfgName) {
+ *------------------------------------------*/
+static int inter_config_read(const char *cfgName)
+{
int i;
char line[1024], w1[1024], w2[1024];
FILE *fp;
diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c
index 5feea2492..a5c2aa8f0 100644
--- a/src/char_sql/itemdb.c
+++ b/src/char_sql/itemdb.c
@@ -34,8 +34,7 @@ static void* create_item(DBKey key, va_list args) {
}
/*==========================================
* DBの検索
- *------------------------------------------
- */
+ *------------------------------------------*/
struct item_data* itemdb_search(int nameid)
{
return idb_ensure(item_db,nameid,create_item);
@@ -43,8 +42,7 @@ struct item_data* itemdb_search(int nameid)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isequip(int nameid)
{
int type=itemdb_type(nameid);
@@ -54,8 +52,7 @@ int itemdb_isequip(int nameid)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isequip2(struct item_data *data)
{
if(data) {
@@ -72,8 +69,7 @@ int itemdb_isequip2(struct item_data *data)
/*==========================================
* アイテムデータベースの読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_readdb(void)
{
FILE *fp;
@@ -202,8 +198,7 @@ static int itemdb_read_sqldb(void) // sql item_db read, shortened version of map
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void do_final_itemdb(void)
{
if(item_db){
diff --git a/src/common/core.c b/src/common/core.c
index a0a6b4f16..deac7a514 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -69,8 +69,7 @@ sigfunc *compat_signal(int signo, sigfunc *func)
/*======================================
* CORE : Signal Sub Function
- *--------------------------------------
- */
+ *--------------------------------------*/
static void sig_proc(int sn)
{
static int is_called = 0;
@@ -174,8 +173,7 @@ const char* get_svn_revision(void)
/*======================================
* CORE : Display title
- *--------------------------------------
- */
+ *--------------------------------------*/
static void display_title(void)
{
//ClearScreen(); // clear screen and go up/left (0, 0 position in text)
@@ -213,8 +211,7 @@ void usercheck(void)
/*======================================
* CORE : MAINROUTINE
- *--------------------------------------
- */
+ *--------------------------------------*/
int main (int argc, char **argv)
{
{// initialize program arguments
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 859b58b5e..eda8c3fdb 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -189,7 +189,8 @@ static void block_free(struct block* p);
static void memmgr_info(void);
static unsigned int memmgr_usage_bytes = 0;
-void* _mmalloc(size_t size, const char *file, int line, const char *func ) {
+void* _mmalloc(size_t size, const char *file, int line, const char *func )
+{
int i;
struct block *block;
size_t size_hash;
@@ -291,13 +292,15 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) {
return NULL;
};
-void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func ) {
+void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func )
+{
void *p = _mmalloc(num * size,file,line,func);
memset(p,0,num * size);
return p;
}
-void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func ) {
+void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func )
+{
size_t old_size;
if(memblock == NULL) {
return _mmalloc(size,file,line,func);
@@ -318,7 +321,8 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c
}
}
-char* _mstrdup(const char *p, const char *file, int line, const char *func ) {
+char* _mstrdup(const char *p, const char *file, int line, const char *func )
+{
if(p == NULL) {
return NULL;
} else {
@@ -329,7 +333,8 @@ char* _mstrdup(const char *p, const char *file, int line, const char *func ) {
}
}
-void _mfree(void *ptr, const char *file, int line, const char *func ) {
+void _mfree(void *ptr, const char *file, int line, const char *func )
+{
struct unit_head *head;
size_t size_hash;
@@ -420,7 +425,8 @@ void _mfree(void *ptr, const char *file, int line, const char *func ) {
}
/* 現在の状況を表示する */
-static void memmgr_info(void) {
+static void memmgr_info(void)
+{
int i;
struct block *p;
ShowInfo("** Memory Manager Information **\n");
@@ -461,7 +467,8 @@ static void memmgr_info(void) {
}
/* ブロックを確保する */
-static struct block* block_malloc(void) {
+static struct block* block_malloc(void)
+{
if(block_unused != NULL) {
/* ブロック用の領域は確保済み */
struct block* ret = block_unused;
@@ -523,7 +530,8 @@ static struct block* block_malloc(void) {
}
}
-static void block_free(struct block* p) {
+static void block_free(struct block* p)
+{
/* free() せずに、未使用フラグを付けるだけ */
p->unit_size = 0;
/* 未使用ポインターを更新する */
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 37afcad3d..36bd32cb5 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -64,7 +64,8 @@ int mapindex_addmap(int index, const char *name)
return 1;
}
-unsigned short mapindex_name2id(const char* name) {
+unsigned short mapindex_name2id(const char* name)
+{
//TODO: Perhaps use a db to speed this up? [Skotlex]
int i;
char map_name[MAP_NAME_LENGTH_EXT];
@@ -91,7 +92,8 @@ unsigned short mapindex_name2id(const char* name) {
#endif
}
-const char* mapindex_id2name(unsigned short id) {
+const char* mapindex_id2name(unsigned short id)
+{
if (id > MAX_MAPINDEX || !indexes[id].exists) {
ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", id);
return indexes[0].name; //Theorically this should never happen, hence we return this string to prevent null pointer crashes.
@@ -99,7 +101,8 @@ const char* mapindex_id2name(unsigned short id) {
return indexes[id].name;
}
-void mapindex_init(void) {
+void mapindex_init(void)
+{
FILE *fp;
char line[1024];
int last_index = -1;
@@ -130,5 +133,6 @@ void mapindex_init(void) {
fclose(fp);
}
-void mapindex_final(void) {
+void mapindex_final(void)
+{
}
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 931846bd6..4383109a7 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -13,8 +13,7 @@ static void nullpo_info_core(const char *file, int line, const char *func,
/*======================================
* Nullチェック 及び 情報出力
- *--------------------------------------
- */
+ *--------------------------------------*/
int nullpo_chk_f(const char *file, int line, const char *func, const void *target,
const char *fmt, ...)
{
@@ -41,8 +40,7 @@ int nullpo_chk(const char *file, int line, const char *func, const void *target)
/*======================================
* nullpo情報出力(外部呼出し向けラッパ)
- *--------------------------------------
- */
+ *--------------------------------------*/
void nullpo_info_f(const char *file, int line, const char *func,
const char *fmt, ...)
{
@@ -61,8 +59,7 @@ void nullpo_info(const char *file, int line, const char *func)
/*======================================
* nullpo情報出力(Main)
- *--------------------------------------
- */
+ *--------------------------------------*/
static void nullpo_info_core(const char *file, int line, const char *func,
const char *fmt, va_list ap)
{
diff --git a/src/common/timer.c b/src/common/timer.c
index 09be7d949..2a7dba676 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -137,8 +137,7 @@ unsigned int gettick(void)
/*======================================
* CORE : Timer Heap
- *--------------------------------------
- */
+ *--------------------------------------*/
/// Adds a timer to the timer_heap
static void push_timer_heap(int tid)
{
@@ -197,8 +196,7 @@ static void push_timer_heap(int tid)
/*==========================
* Timer Management
- *--------------------------
- */
+ *--------------------------*/
/// Returns a free timer id.
static int acquire_timer(void)
diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c
index 8312c91a1..9027d7e07 100644
--- a/src/ladmin/ladmin.c
+++ b/src/ladmin/ladmin.c
@@ -261,7 +261,8 @@ int already_exit_function = 0; // sometimes, the exit function is called twice..
//------------------------------
// Writing function of logs file
//------------------------------
-int ladmin_log(char *fmt, ...) {
+int ladmin_log(char *fmt, ...)
+{
FILE *logfp;
va_list ap;
struct timeval tv;
@@ -289,7 +290,8 @@ int ladmin_log(char *fmt, ...) {
//---------------------------------------------
// Function to return ordonal text of a number.
//---------------------------------------------
-char* makeordinal(int number) {
+char* makeordinal(int number)
+{
if (defaultlanguage == 'F') {
if (number == 0)
return "";
@@ -315,7 +317,8 @@ char* makeordinal(int number) {
//-----------------------------------------------------------------------------------------
// Function to test of the validity of an account name (return 0 if incorrect, and 1 if ok)
//-----------------------------------------------------------------------------------------
-int verify_accountname(char* account_name) {
+int verify_accountname(char* account_name)
+{
int i;
for(i = 0; account_name[i]; i++) {
@@ -359,7 +362,8 @@ int verify_accountname(char* account_name) {
//----------------------------------
// Sub-function: Input of a password
//----------------------------------
-int typepasswd(char * password) {
+int typepasswd(char * password)
+{
char password1[1023], password2[1023];
int letter;
int i;
@@ -415,7 +419,8 @@ int typepasswd(char * password) {
//------------------------------------------------------------------------------------
// Sub-function: Test of the validity of password (return 0 if incorrect, and 1 if ok)
//------------------------------------------------------------------------------------
-int verify_password(char * password) {
+int verify_password(char * password)
+{
int i;
for(i = 0; password[i]; i++) {
@@ -459,7 +464,8 @@ int verify_password(char * password) {
//------------------------------------------------------------------
// Sub-function: Check the name of a command (return complete name)
//-----------------------------------------------------------------
-int check_command(char * command) {
+int check_command(char * command)
+{
// help
if (strncmp(command, "aide", 2) == 0 && strncmp(command, "aide", strlen(command)) == 0) // not 1 letter command: 'aide' or 'add'?
strcpy(command, "aide");
@@ -561,7 +567,8 @@ int check_command(char * command) {
//-----------------------------------------
// Sub-function: Display commands of ladmin
//-----------------------------------------
-void display_help(char* param, int language) {
+void display_help(char* param, int language)
+{
char command[1023];
int i;
@@ -1087,7 +1094,8 @@ void display_help(char* param, int language) {
//-----------------------------
// Sub-function: add an account
//-----------------------------
-int addaccount(char* param, int emailflag) {
+int addaccount(char* param, int emailflag)
+{
char name[1023], sex[1023], email[1023], password[1023];
// int i;
WFIFOHEAD(login_fd,91);
@@ -1133,19 +1141,6 @@ int addaccount(char* param, int emailflag) {
return 102;
}
-/* for(i = 0; name[i]; i++) {
- if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_", name[i]) == NULL) {
- if (defaultlanguage == 'F') {
- ShowMessage("Caract鑽e interdit (%c) trouv dans le nom du compte (%d%s caract鑽e).\n", name[i], i+1, makeordinal(i+1));
- ladmin_log("Caract鑽e interdit (%c) trouv dans le nom du compte (%d%s caract鑽e)." RETCODE, name[i], i+1, makeordinal(i+1));
- } else {
- ShowMessage("Illegal character (%c) found in the account name (%d%s character).\n", name[i], i+1, makeordinal(i+1));
- ladmin_log("Illegal character (%c) found in the account name (%d%s character)." RETCODE, name[i], i+1, makeordinal(i+1));
- }
- return 101;
- }
- }*/
-
sex[0] = TOUPPER(sex[0]);
if (strchr("MF", sex[0]) == NULL) {
if (defaultlanguage == 'F') {
@@ -1216,7 +1211,8 @@ int addaccount(char* param, int emailflag) {
//---------------------------------------------------------------------------------
// Sub-function: Add/substract time to the final date of a banishment of an account
//---------------------------------------------------------------------------------
-int banaddaccount(char* param) {
+int banaddaccount(char* param)
+{
char name[1023], modif[1023];
int year, month, day, hour, minute, second;
char * p_modif;
@@ -1420,7 +1416,8 @@ int banaddaccount(char* param) {
// Sub-function of sub-function banaccount, unbanaccount or bansetaccount
// Set the final date of a banishment of an account
//-----------------------------------------------------------------------
-int bansetaccountsub(char* name, char* date, char* time) {
+int bansetaccountsub(char* name, char* date, char* time)
+{
int year, month, day, hour, minute, second;
time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
struct tm *tmtime;
@@ -1564,7 +1561,8 @@ int bansetaccountsub(char* name, char* date, char* time) {
//---------------------------------------------------------------------
// Sub-function: Set the final date of a banishment of an account (ban)
//---------------------------------------------------------------------
-int banaccount(char* param) {
+int banaccount(char* param)
+{
char name[1023], date[1023], time[1023];
memset(name, '\0', sizeof(name));
@@ -1600,7 +1598,8 @@ int banaccount(char* param) {
//------------------------------------------------------------------------
// Sub-function: Set the final date of a banishment of an account (banset)
//------------------------------------------------------------------------
-int bansetaccount(char* param) {
+int bansetaccount(char* param)
+{
char name[1023], date[1023], time[1023];
memset(name, '\0', sizeof(name));
@@ -1639,7 +1638,8 @@ int bansetaccount(char* param) {
//-------------------------------------------------
// Sub-function: unbanishment of an account (unban)
//-------------------------------------------------
-int unbanaccount(char* param) {
+int unbanaccount(char* param)
+{
char name[1023];
memset(name, '\0', sizeof(name));
@@ -1676,7 +1676,8 @@ int unbanaccount(char* param) {
// Sub-function: Asking to check the validity of a password
// (Note: never send back a password with login-server!! security of passwords)
//---------------------------------------------------------
-int checkaccount(char* param) {
+int checkaccount(char* param)
+{
char name[1023], password[1023];
WFIFOHEAD(login_fd,50);
@@ -1727,7 +1728,8 @@ int checkaccount(char* param) {
//------------------------------------------------
// Sub-function: Asking for deletion of an account
//------------------------------------------------
-int delaccount(char* param) {
+int delaccount(char* param)
+{
char name[1023];
char letter;
char confirm[1023];
@@ -1798,7 +1800,8 @@ int delaccount(char* param) {
//----------------------------------------------------------
// Sub-function: Asking to modification of an account e-mail
//----------------------------------------------------------
-int changeemail(char* param) {
+int changeemail(char* param)
+{
char name[1023], email[1023];
WFIFOHEAD(login_fd,66);
@@ -1873,7 +1876,8 @@ int changeemail(char* param) {
//-----------------------------------------------------
// Sub-function: Asking of the number of online players
//-----------------------------------------------------
-int getlogincount(void) {
+int getlogincount(void)
+{
WFIFOHEAD(login_fd,2);
if (defaultlanguage == 'F') {
ladmin_log("Envoi d'un requ黎e au serveur de logins pour obtenir le nombre de joueurs en jeu." RETCODE);
@@ -1891,7 +1895,8 @@ int getlogincount(void) {
//----------------------------------------------------------
// Sub-function: Asking to modify the GM level of an account
//----------------------------------------------------------
-int changegmlevel(char* param) {
+int changegmlevel(char* param)
+{
char name[1023];
int GM_level;
WFIFOHEAD(login_fd,27);
@@ -1947,7 +1952,8 @@ int changegmlevel(char* param) {
//---------------------------------------------
// Sub-function: Asking to obtain an account id
//---------------------------------------------
-int idaccount(char* param) {
+int idaccount(char* param)
+{
char name[1023];
WFIFOHEAD(login_fd,26);
@@ -1991,7 +1997,8 @@ int idaccount(char* param) {
//----------------------------------------------------------------------------
// Sub-function: Asking to displaying information about an account (by its id)
//----------------------------------------------------------------------------
-int infoaccount(int account_id) {
+int infoaccount(int account_id)
+{
WFIFOHEAD(login_fd,6);
if (account_id < 0) {
if (defaultlanguage == 'F') {
@@ -2021,7 +2028,8 @@ int infoaccount(int account_id) {
//---------------------------------------
// Sub-function: Send a broadcast message
//---------------------------------------
-int sendbroadcast(short type, char* message) {
+int sendbroadcast(short type, char* message)
+{
int len = strlen(message);
WFIFOHEAD(login_fd,9+len);
if (len == 0) {
@@ -2058,7 +2066,8 @@ int sendbroadcast(short type, char* message) {
//--------------------------------------------
// Sub-function: Change language of displaying
//--------------------------------------------
-int changelanguage(char* language) {
+int changelanguage(char* language)
+{
if (strlen(language) == 0) {
if (defaultlanguage == 'F') {
ShowMessage("Entrez une langue svp.\n");
@@ -2100,7 +2109,8 @@ int changelanguage(char* language) {
//--------------------------------------------------------
// Sub-function: Asking to Displaying of the accounts list
//--------------------------------------------------------
-int listaccount(char* param, int type) {
+int listaccount(char* param, int type)
+{
//int list_first, list_last, list_type; // parameter to display a list of accounts
int i;
WFIFOHEAD(login_fd,10);
@@ -2165,7 +2175,8 @@ int listaccount(char* param, int type) {
//--------------------------------------------
// Sub-function: Asking to modify a memo field
//--------------------------------------------
-int changememo(char* param) {
+int changememo(char* param)
+{
char name[1023], memo[1023];
WFIFOHEAD(login_fd,28+255);
@@ -2224,7 +2235,8 @@ int changememo(char* param) {
//-----------------------------------------------
// Sub-function: Asking to obtain an account name
//-----------------------------------------------
-int nameaccount(int id) {
+int nameaccount(int id)
+{
WFIFOHEAD(login_fd,6);
if (id < 0) {
if (defaultlanguage == 'F') {
@@ -2254,7 +2266,8 @@ int nameaccount(int id) {
// Sub-function: Asking to modify a password
// (Note: never send back a password with login-server!! security of passwords)
//------------------------------------------
-int changepasswd(char* param) {
+int changepasswd(char* param)
+{
char name[1023], password[1023];
WFIFOHEAD(login_fd,50);
@@ -2306,7 +2319,8 @@ int changepasswd(char* param) {
// Sub-function: Request to login-server to reload GM configuration file
// this function have no answer
//----------------------------------------------------------------------
-int reloadGM(void) {
+int reloadGM(void)
+{
WFIFOHEAD(login_fd,2);
WFIFOW(login_fd,0) = 0x7955;
WFIFOSET(login_fd,2);
@@ -2329,7 +2343,8 @@ int reloadGM(void) {
//-----------------------------------------------------
// Sub-function: Asking to modify the sex of an account
//-----------------------------------------------------
-int changesex(char* param) {
+int changesex(char* param)
+{
char name[1023], sex[1023];
WFIFOHEAD(login_fd,27);
@@ -2386,7 +2401,8 @@ int changesex(char* param) {
// Sub-function of sub-function changestate, blockaccount or unblockaccount
// Asking to modify the state of an account
//-------------------------------------------------------------------------
-int changestatesub(char* name, int state, char* error_message7) {
+int changestatesub(char* name, int state, char* error_message7)
+{
char error_message[1023]; // need to use, because we can modify error_message7
WFIFOHEAD(login_fd,50);
@@ -2470,7 +2486,8 @@ int changestatesub(char* name, int state, char* error_message7) {
//-------------------------------------------------------
// Sub-function: Asking to modify the state of an account
//-------------------------------------------------------
-int changestate(char* param) {
+int changestate(char* param)
+{
char name[1023], error_message[1023];
int state;
@@ -2504,7 +2521,8 @@ int changestate(char* param) {
//-------------------------------------------
// Sub-function: Asking to unblock an account
//-------------------------------------------
-int unblockaccount(char* param) {
+int unblockaccount(char* param)
+{
char name[1023];
memset(name, '\0', sizeof(name));
@@ -2538,7 +2556,8 @@ int unblockaccount(char* param) {
//-------------------------------------------
// Sub-function: Asking to unblock an account
//-------------------------------------------
-int blockaccount(char* param) {
+int blockaccount(char* param)
+{
char name[1023];
memset(name, '\0', sizeof(name));
@@ -2572,7 +2591,8 @@ int blockaccount(char* param) {
//---------------------------------------------------------------------
// Sub-function: Add/substract time to the validity limit of an account
//---------------------------------------------------------------------
-int timeaddaccount(char* param) {
+int timeaddaccount(char* param)
+{
char name[1023], modif[1023];
int year, month, day, hour, minute, second;
char * p_modif;
@@ -2775,7 +2795,8 @@ int timeaddaccount(char* param) {
//-------------------------------------------------
// Sub-function: Set a validity limit of an account
//-------------------------------------------------
-int timesetaccount(char* param) {
+int timesetaccount(char* param)
+{
char name[1023], date[1023], time[1023];
int year, month, day, hour, minute, second;
time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
@@ -2941,7 +2962,8 @@ int timesetaccount(char* param) {
//------------------------------------------------------------------------------
// Sub-function: Asking to displaying information about an account (by its name)
//------------------------------------------------------------------------------
-int whoaccount(char* param) {
+int whoaccount(char* param)
+{
char name[1023];
WFIFOHEAD(login_fd,26);
@@ -2984,7 +3006,8 @@ int whoaccount(char* param) {
//--------------------------------------------------------
// Sub-function: Asking of the version of the login-server
//--------------------------------------------------------
-int checkloginversion(void) {
+int checkloginversion(void)
+{
WFIFOHEAD(login_fd,2);
if (defaultlanguage == 'F')
ladmin_log("Envoi d'un requ黎e au serveur de logins pour obtenir sa version." RETCODE);
@@ -3003,7 +3026,8 @@ int checkloginversion(void) {
// this function wait until user type a command
// and analyse the command.
//---------------------------------------------
-int prompt(void) {
+int prompt(void)
+{
int i, j;
char buf[1024];
char *p;
@@ -4162,7 +4186,8 @@ int parse_fromlogin(int fd)
//------------------------------------
// Function to connect to login-server
//------------------------------------
-int Connect_login_server(void) {
+int Connect_login_server(void)
+{
if (defaultlanguage == 'F') {
ShowMessage("Essai de connection au server de logins...\n");
ladmin_log("Essai de connection au server de logins..." RETCODE);
@@ -4211,7 +4236,8 @@ int Connect_login_server(void) {
//-----------------------------------
// Reading general configuration file
//-----------------------------------
-int ladmin_config_read(const char *cfgName) {
+int ladmin_config_read(const char *cfgName)
+{
char line[1024], w1[1024], w2[1024];
FILE *fp;
@@ -4291,13 +4317,15 @@ int ladmin_config_read(const char *cfgName) {
// Function called when the server
// has received a crash signal.
//------------------------------
-void do_abort(void) {}
+void do_abort(void)
+{
+}
//--------------------------------------
// Function called at exit of the server
//--------------------------------------
-void do_final(void) {
-
+void do_final(void)
+{
if (already_exit_function == 0) {
if (defaultlanguage == 'F') {
diff --git a/src/login/login.c b/src/login/login.c
index bc7fc226e..059facfde 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -166,7 +166,8 @@ int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len);
//------------------------------
// Writing function of logs file
//------------------------------
-int login_log(char *fmt, ...) {
+int login_log(char *fmt, ...)
+{
if (log_login) {
va_list ap;
time_t raw_time;
@@ -257,7 +258,8 @@ static int sync_ip_addresses(int tid, unsigned int tick, int id, int data)
// Determine if an account (id) is a GM account
// and returns its level (or 0 if it isn't a GM account or if not found)
//----------------------------------------------------------------------
-int isGM(int account_id) {
+int isGM(int account_id)
+{
unsigned int i;
for(i=0; i < GM_num; i++)
if(gm_account_db[i].account_id == account_id)
@@ -309,7 +311,8 @@ void addGM(uint32 account_id, int level)
//-------------------------------------------------------
// Reading function of GM accounts file (and their level)
//-------------------------------------------------------
-int read_gm_account(void) {
+int read_gm_account(void)
+{
char line[512];
FILE *fp;
int account_id, level;
@@ -494,7 +497,8 @@ int check_ladminip(uint32 ip)
// and returns index if only 1 account is found
// and similar to the searched name.
//-----------------------------------------------
-int search_account_index(char* account_name) {
+int search_account_index(char* account_name)
+{
unsigned int i, quantity;
int index;
@@ -523,7 +527,8 @@ int search_account_index(char* account_name) {
//--------------------------------------------------------
// Create a string to save the account in the account file
//--------------------------------------------------------
-int mmo_auth_tostr(char* str, struct auth_data* p) {
+int mmo_auth_tostr(char* str, struct auth_data* p)
+{
int i;
char *str_p = str;
@@ -946,7 +951,8 @@ void mmo_auth_sync(void)
// immediatly and set the minimum of
// authentifications to its initialization value.
//-----------------------------------------------------
-int check_auth_sync(int tid, unsigned int tick, int id, int data) {
+int check_auth_sync(int tid, unsigned int tick, int id, int data)
+{
// we only save if necessary:
// we have do some authentifications without do saving
if (auth_before_save_file < AUTH_BEFORE_SAVE_FILE ||
@@ -1009,7 +1015,8 @@ void send_GM_accounts(void)
//-----------------------------------------------------
// Check if GM file account have been changed
//-----------------------------------------------------
-int check_GM_file(int tid, unsigned int tick, int id, int data) {
+int check_GM_file(int tid, unsigned int tick, int id, int data)
+{
struct stat file_stat;
long new_time;
@@ -3656,7 +3663,8 @@ int login_config_read(const char* cfgName)
//-------------------------------------
// Displaying of configuration warnings
//-------------------------------------
-void display_conf_warnings(void) {
+void display_conf_warnings(void)
+{
if (admin_state != 0 && admin_state != 1) {
ShowWarning("Invalid value for admin_state parameter -> setting to 0 (no remote admin).\n");
admin_state = 0;
@@ -3768,7 +3776,8 @@ void display_conf_warnings(void) {
//-------------------------------
// Save configuration in log file
//-------------------------------
-void save_config_in_log(void) {
+void save_config_in_log(void)
+{
int i;
// a newline in the log...
@@ -3906,7 +3915,8 @@ void save_config_in_log(void) {
//--------------------------------------
// Function called at exit of the server
//--------------------------------------
-void do_final(void) {
+void do_final(void)
+{
int i, fd;
ShowInfo("Terminating...\n");
fflush(stdout);
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 6a903bccf..b72b46cc9 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -284,8 +284,7 @@ ACMD_FUNC(dmtick); // by MouseJstr
/*==========================================
*AtCommandInfo atcommand_info[] structure definition
- *------------------------------------------
- */
+ *------------------------------------------*/
// First char of commands is configured in atcommand_athena.conf. Leave @ in this list for default value.
// to set default level, read atcommand_athena.conf first please.
@@ -590,16 +589,14 @@ static AtCommandInfo atcommand_info[] = {
/*=========================================
* Generic variables
- *-----------------------------------------
- */
+ *-----------------------------------------*/
char atcmd_output[200];
char atcmd_player_name[NAME_LENGTH];
char atcmd_temp[100];
/*==========================================
* estr_lower (replace strlwr, non ANSI function that doesn't exist in all C compilator)
- *------------------------------------------
- */
+ *------------------------------------------*/
char *estr_lower(char *str)
{
int i;
@@ -668,8 +665,7 @@ char * player_title_txt(int level) {
/*==========================================
* Retrieve the atcommand's required gm level
- *------------------------------------------
- */
+ *------------------------------------------*/
int get_atcommand_level(const AtCommandType type)
{
int i;
@@ -730,8 +726,7 @@ AtCommandType is_atcommand_sub(const int fd, struct map_session_data* sd, const
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
AtCommandType is_atcommand(const int fd, struct map_session_data* sd, const char* message)
{
const char* str = message;
@@ -764,8 +759,7 @@ AtCommandType is_atcommand(const int fd, struct map_session_data* sd, const char
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
AtCommandType atcommand(struct map_session_data* sd, const int level, const char* message, struct AtCommandInfo* info)
{
char* p = (char *)message; // it's 'char' and not 'const char' to have possibility to modify the first character if necessary
@@ -813,8 +807,7 @@ AtCommandType atcommand(struct map_session_data* sd, const int level, const char
/*==========================================
* Read Message Data
- *------------------------------------------
- */
+ *------------------------------------------*/
int msg_config_read(const char *cfgName)
{
int msg_number;
@@ -854,8 +847,7 @@ int msg_config_read(const char *cfgName)
/*==========================================
* Cleanup Message Data
- *------------------------------------------
- */
+ *------------------------------------------*/
void do_final_msg (void)
{
int i;
@@ -866,8 +858,7 @@ void do_final_msg (void)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static AtCommandInfo* get_atcommandinfo_byname(const char* name)
{
int i;
@@ -881,8 +872,7 @@ static AtCommandInfo* get_atcommandinfo_byname(const char* name)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_config_read(const char *cfgName)
{
char line[1024], w1[1024], w2[1024];
@@ -925,13 +915,11 @@ int atcommand_config_read(const char *cfgName)
/*==========================================
// @ command processing functions
- *------------------------------------------
- */
+ *------------------------------------------*/
/*==========================================
* @commands Lists available @ commands to you (code 98% from Meruru)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_commands(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char cz_line_buff[CHATBOX_SIZE+1];
@@ -975,8 +963,7 @@ int atcommand_commands(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @send (used for testing packet sends from the client)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_send(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int len=0,off,end,type;
@@ -1211,8 +1198,7 @@ int atcommand_send(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @rura
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_rura( const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char map_name[MAP_NAME_LENGTH_EXT];
@@ -1265,8 +1251,7 @@ int atcommand_rura( const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* Displays where a character is. Corrected version by Silent. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_where(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -1309,8 +1294,7 @@ int atcommand_where(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -1355,8 +1339,7 @@ int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_jump(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int x = 0, y = 0;
@@ -1383,8 +1366,7 @@ int atcommand_jump(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @who3 = Player name, his location
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_who3(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char temp0[100];
@@ -1456,8 +1438,7 @@ int atcommand_who3(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* Player name, BLevel, Job,
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_who2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char temp0[100];
@@ -1524,8 +1505,7 @@ int atcommand_who2(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* Player name, Playrs Party / Guild name
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_who(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char temp0[100];
@@ -1604,8 +1584,7 @@ int atcommand_who(const int fd, struct map_session_data* sd, const char* command
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_whomap3(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -1658,8 +1637,7 @@ int atcommand_whomap3(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_whomap2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -1714,8 +1692,7 @@ int atcommand_whomap2(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_whomap(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char temp0[100];
@@ -1787,8 +1764,7 @@ int atcommand_whomap(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_whogm(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -1946,8 +1922,7 @@ int atcommand_whozeny(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_save(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -1965,8 +1940,7 @@ int atcommand_save(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_load(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int m;
@@ -1991,8 +1965,7 @@ int atcommand_load(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_speed(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int speed;
@@ -2025,8 +1998,7 @@ int atcommand_speed(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_storage(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2048,8 +2020,7 @@ int atcommand_storage(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_guildstorage(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct storage *stor; //changes from Freya/Yor
@@ -2079,8 +2050,7 @@ int atcommand_guildstorage(const int fd, struct map_session_data* sd, const char
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_option(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int param1 = 0, param2 = 0, param3 = 0;
@@ -2102,8 +2072,7 @@ int atcommand_option(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hide(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2126,8 +2095,7 @@ int atcommand_hide(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* Changes a character's class
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_jobchange(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int job = 0, upper = 0;
@@ -2299,8 +2267,7 @@ int atcommand_jobchange(const int fd, struct map_session_data* sd, const char* c
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_die(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2313,8 +2280,7 @@ int atcommand_die(const int fd, struct map_session_data* sd, const char* command
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_kill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -2349,8 +2315,7 @@ int atcommand_kill(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_alive(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2366,8 +2331,7 @@ int atcommand_alive(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* +kamic [LuzZza]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_kami(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
unsigned long color=0;
@@ -2404,8 +2368,7 @@ int atcommand_kami(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_heal(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hp = 0, sp = 0; // [Valaris] thanks to fov
@@ -2459,8 +2422,7 @@ int atcommand_heal(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @item command (usage: @item <name/id_of_item> <quantity>) (modified by [Yor] for pet_egg)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_item(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char item_name[100];
@@ -2518,8 +2480,7 @@ int atcommand_item(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_item2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct item item_tmp;
@@ -2599,8 +2560,7 @@ int atcommand_item2(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_itemreset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i;
@@ -2623,8 +2583,7 @@ int atcommand_itemreset(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* Atcommand @lvlup
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int level=0, i=0, status_point=0;
@@ -2637,10 +2596,10 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char*
}
if (level > 0) {
- if (sd->status.base_level == pc_maxbaselv(sd)) { /* check for max level by Valaris */
- clif_displaymessage(fd, msg_txt(47)); /* Base level can't go any higher. */
+ if (sd->status.base_level == pc_maxbaselv(sd)) { // check for max level by Valaris
+ clif_displaymessage(fd, msg_txt(47)); // Base level can't go any higher.
return -1;
- } /* End Addition */
+ } // End Addition
if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
level = pc_maxbaselv(sd) - sd->status.base_level;
for (i = 1; i <= level; i++)
@@ -2653,10 +2612,10 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char*
sd->status.base_level += (unsigned int)level;
status_percent_heal(&sd->bl, 100, 100);
clif_misceffect(&sd->bl, 0);
- clif_displaymessage(fd, msg_txt(21)); /* Base level raised. */
+ clif_displaymessage(fd, msg_txt(21)); // Base level raised.
} else {
if (sd->status.base_level == 1) {
- clif_displaymessage(fd, msg_txt(158)); /* Base level can't go any lower. */
+ clif_displaymessage(fd, msg_txt(158)); // Base level can't go any lower.
return -1;
}
level*=-1;
@@ -2671,7 +2630,7 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char*
else
sd->status.status_point -= status_point;
sd->status.base_level -= (unsigned int)level;
- clif_displaymessage(fd, msg_txt(22)); /* Base level lowered. */
+ clif_displaymessage(fd, msg_txt(22)); // Base level lowered.
}
clif_updatestatus(sd, SP_STATUSPOINT);
clif_updatestatus(sd, SP_BASELEVEL);
@@ -2684,8 +2643,7 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_joblevelup(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int level=0;
@@ -2742,8 +2700,7 @@ int atcommand_joblevelup(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @help
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_help(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char buf[2048], w1[2048], w2[2048];
@@ -2754,7 +2711,7 @@ int atcommand_help(const int fd, struct map_session_data* sd, const char* comman
memset(buf, '\0', sizeof(buf));
if ((fp = fopen(help_txt, "r")) != NULL) {
- clif_displaymessage(fd, msg_txt(26)); /* Help commands: */
+ clif_displaymessage(fd, msg_txt(26)); // Help commands:
gm_level = pc_isGM(sd);
while(fgets(buf, sizeof(buf) - 1, fp) != NULL) {
if (buf[0] == '/' && buf[1] == '/')
@@ -2772,7 +2729,7 @@ int atcommand_help(const int fd, struct map_session_data* sd, const char* comman
}
fclose(fp);
} else {
- clif_displaymessage(fd, msg_txt(27)); /* File help.txt not found. */
+ clif_displaymessage(fd, msg_txt(27)); // File help.txt not found.
return -1;
}
@@ -2781,8 +2738,7 @@ int atcommand_help(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @help2 - Char commands [Kayla]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_help2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char buf[2048], w1[2048], w2[2048];
@@ -2793,7 +2749,7 @@ int atcommand_help2(const int fd, struct map_session_data* sd, const char* comma
memset(buf, '\0', sizeof(buf));
if ((fp = fopen(help2_txt, "r")) != NULL) {
- clif_displaymessage(fd, msg_txt(26)); /* Help commands: */
+ clif_displaymessage(fd, msg_txt(26)); // Help commands:
gm_level = pc_isGM(sd);
while(fgets(buf, sizeof(buf) - 1, fp) != NULL) {
if (buf[0] == '/' && buf[1] == '/')
@@ -2811,7 +2767,7 @@ int atcommand_help2(const int fd, struct map_session_data* sd, const char* comma
}
fclose(fp);
} else {
- clif_displaymessage(fd, msg_txt(27)); /* File help.txt not found. */
+ clif_displaymessage(fd, msg_txt(27)); // File help.txt not found.
return -1;
}
@@ -2821,8 +2777,7 @@ int atcommand_help2(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @gm
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_gm(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char password[100];
@@ -2835,8 +2790,8 @@ int atcommand_gm(const int fd, struct map_session_data* sd, const char* command,
return -1;
}
- if (pc_isGM(sd)) { /* a GM can not use this function. only a normal player (become gm is not for gm!) */
- clif_displaymessage(fd, msg_txt(50)); /* You already have some GM powers. */
+ if (pc_isGM(sd)) { // a GM can not use this function. only a normal player (become gm is not for gm!)
+ clif_displaymessage(fd, msg_txt(50)); // You already have some GM powers.
return -1;
} else
chrif_changegm(sd->status.account_id, password, strlen(password) + 1);
@@ -2859,8 +2814,7 @@ static int atcommand_stopattack(struct block_list *bl,va_list ap)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static int atcommand_pvpoff_sub(struct block_list *bl,va_list ap) {
TBL_PC* sd = (TBL_PC*)bl;
clif_pvpset(sd, 0, 0, 2);
@@ -2897,8 +2851,7 @@ int atcommand_pvpoff(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_pvpon(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -2938,8 +2891,7 @@ int atcommand_pvpon(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_gvgoff(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2958,8 +2910,7 @@ int atcommand_gvgoff(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_gvgon(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -2977,8 +2928,7 @@ int atcommand_gvgon(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_model(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_style = 0, hair_color = 0, cloth_color = 0;
@@ -2996,18 +2946,10 @@ int atcommand_model(const int fd, struct map_session_data* sd, const char* comma
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE &&
hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR &&
cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
- /* Removed because this check is TOO strange. [Skotlex]
- if (cloth_color != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) {
- //The hell? Why Rogue/Assassins can't... change their option if they have clothes colors and are males? o.O [Skotlex]
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(sd, LOOK_HAIR, hair_style);
pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -3018,8 +2960,7 @@ int atcommand_model(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @dye && @ccolor
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_dye(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int cloth_color = 0;
@@ -3046,8 +2987,7 @@ int atcommand_dye(const int fd, struct map_session_data* sd, const char* command
/*==========================================
* @hairstyle && @hstyle
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hair_style(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_style = 0;
@@ -3062,15 +3002,8 @@ int atcommand_hair_style(const int fd, struct map_session_data* sd, const char*
}
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
- /* Removed because this check is TOO strange. [Skotlex]
- if (hair_style != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) { //???
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(sd, LOOK_HAIR, hair_style);
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -3081,8 +3014,7 @@ int atcommand_hair_style(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @haircolor && @hcolor
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hair_color(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_color = 0;
@@ -3097,15 +3029,8 @@ int atcommand_hair_color(const int fd, struct map_session_data* sd, const char*
}
if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
- /* Removed for being such a strange check. [Skotlex]
- if (hair_color != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) {
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -3116,8 +3041,7 @@ int atcommand_hair_color(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @go [city_number or city_name] - Updated by Harbin
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_go(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i;
@@ -3302,8 +3226,7 @@ int atcommand_go(const int fd, struct map_session_data* sd, const char* command,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_monster(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char name[NAME_LENGTH];
@@ -3544,8 +3467,7 @@ int atcommand_monsterbig(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static int atkillmonster_sub(struct block_list *bl, va_list ap)
{
struct mob_data *md;
@@ -3598,8 +3520,7 @@ int atcommand_killmonster(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_killmonster2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if (!sd) return 0;
@@ -3610,8 +3531,7 @@ int atcommand_killmonster2(const int fd, struct map_session_data* sd, const char
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_refine(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i,j, position = 0, refine = 0, current_position, final_refine;
@@ -3698,8 +3618,7 @@ int atcommand_refine(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_produce(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char item_name[100];
@@ -3763,8 +3682,7 @@ int atcommand_produce(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* Sub-function to display actual memo points
- *------------------------------------------
- */
+ *------------------------------------------*/
void atcommand_memo_sub(struct map_session_data* sd)
{
int i;
@@ -3824,8 +3742,7 @@ int atcommand_memo(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_gat(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int y;
@@ -3850,8 +3767,7 @@ int atcommand_gat(const int fd, struct map_session_data* sd, const char* command
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_displaystatus(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, type, flag;
@@ -3870,8 +3786,7 @@ int atcommand_displaystatus(const int fd, struct map_session_data* sd, const cha
/*==========================================
* @stpoint (Rewritten by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_statuspoint(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int point, new_status_point;
@@ -3905,8 +3820,7 @@ int atcommand_statuspoint(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @skpoint (Rewritten by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_skillpoint(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int point, new_skill_point;
@@ -3941,8 +3855,7 @@ int atcommand_skillpoint(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @zeny (Rewritten by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_zeny(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int zeny, new_zeny;
@@ -3976,8 +3889,7 @@ int atcommand_zeny(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_param(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, value = 0, new_value, max;
@@ -4033,8 +3945,7 @@ int atcommand_param(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* Stat all by fritz (rewritten by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_stat_all(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int index, count, value = 0, max, new_value;
@@ -4087,8 +3998,7 @@ int atcommand_stat_all(const int fd, struct map_session_data* sd, const char* co
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_guildlevelup(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int level = 0;
@@ -4129,8 +4039,7 @@ int atcommand_guildlevelup(const int fd, struct map_session_data* sd, const char
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_makeegg(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct item_data *item_data;
@@ -4167,8 +4076,7 @@ int atcommand_makeegg(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hatch(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4184,8 +4092,7 @@ int atcommand_hatch(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_petfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int friendly;
@@ -4221,8 +4128,7 @@ int atcommand_petfriendly(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_pethungry(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hungry;
@@ -4257,8 +4163,7 @@ int atcommand_pethungry(const int fd, struct map_session_data* sd, const char* c
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_petrename(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct pet_data *pd;
@@ -4283,8 +4188,7 @@ int atcommand_petrename(const int fd, struct map_session_data* sd, const char* c
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_recall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -4332,8 +4236,7 @@ int atcommand_recall(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* charblock command (usage: charblock <player_name>)
* This command do a definitiv ban on a player
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_char_block(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4374,8 +4277,7 @@ int atcommand_char_block(const int fd, struct map_session_data* sd, const char*
* s: second
* <example> @ban +1m-2mn1s-6y test_player
* this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_char_ban(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char * modif_p;
@@ -4448,8 +4350,7 @@ int atcommand_char_ban(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* charunblock command (usage: charunblock <player_name>)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_char_unblock(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4479,8 +4380,7 @@ int atcommand_char_unblock(const int fd, struct map_session_data* sd, const char
/*==========================================
* charunban command (usage: charunban <player_name>)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_char_unban(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4510,8 +4410,7 @@ int atcommand_char_unban(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_night(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4528,8 +4427,7 @@ int atcommand_night(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_day(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4546,8 +4444,7 @@ int atcommand_day(const int fd, struct map_session_data* sd, const char* command
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_doom(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -4568,8 +4465,7 @@ int atcommand_doom(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_doommap(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -4593,8 +4489,7 @@ int atcommand_doommap(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static void atcommand_raise_sub(struct map_session_data* sd)
{
if (!sd->state.auth || !status_isdead(&sd->bl))
@@ -4608,8 +4503,7 @@ static void atcommand_raise_sub(struct map_session_data* sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_raise(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, users;
@@ -4629,8 +4523,7 @@ int atcommand_raise(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_raisemap(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data **pl_allsd;
@@ -4651,8 +4544,7 @@ int atcommand_raisemap(const int fd, struct map_session_data* sd, const char* co
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_kick(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -4684,8 +4576,7 @@ int atcommand_kick(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_kickall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -4708,8 +4599,7 @@ int atcommand_kickall(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_allskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4723,8 +4613,7 @@ int atcommand_allskill(const int fd, struct map_session_data* sd, const char* co
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_questskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int skill_id;
@@ -4758,8 +4647,7 @@ int atcommand_questskill(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_lostskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int skill_id;
@@ -4795,8 +4683,7 @@ int atcommand_lostskill(const int fd, struct map_session_data* sd, const char* c
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_spiritball(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int number;
@@ -4834,8 +4721,7 @@ int atcommand_spiritball(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_party(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char party[NAME_LENGTH];
@@ -4855,8 +4741,7 @@ int atcommand_party(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_guild(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char guild[NAME_LENGTH];
@@ -4880,8 +4765,7 @@ int atcommand_guild(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_agitstart(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4899,8 +4783,7 @@ int atcommand_agitstart(const int fd, struct map_session_data* sd, const char* c
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_agitend(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -4918,8 +4801,7 @@ int atcommand_agitend(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @mapexit - shuts down the map server
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_mapexit(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -4942,8 +4824,7 @@ int atcommand_mapexit(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* idsearch <part_of_name>: revrited by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_idsearch(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char item_name[100];
@@ -4979,8 +4860,7 @@ int atcommand_idsearch(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* Recall All Characters Online To Your Location
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_recallall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -5023,8 +4903,7 @@ int atcommand_recallall(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* Recall online characters of a guild to your location
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_guildrecall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -5077,8 +4956,7 @@ int atcommand_guildrecall(const int fd, struct map_session_data* sd, const char*
/*==========================================
* Recall online characters of a party to your location
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_partyrecall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i;
@@ -5133,8 +5011,7 @@ int atcommand_partyrecall(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloaditemdb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5146,8 +5023,7 @@ int atcommand_reloaditemdb(const int fd, struct map_session_data* sd, const char
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadmobdb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5161,8 +5037,7 @@ int atcommand_reloadmobdb(const int fd, struct map_session_data* sd, const char*
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadskilldb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5175,8 +5050,7 @@ int atcommand_reloadskilldb(const int fd, struct map_session_data* sd, const cha
/*==========================================
* @reloadatcommand - reloads atcommand_athena.conf
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadatcommand(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
atcommand_config_read(ATCOMMAND_CONF_FILENAME);
@@ -5185,8 +5059,7 @@ int atcommand_reloadatcommand(const int fd, struct map_session_data* sd, const c
}
/*==========================================
* @reloadbattleconf - reloads battle_athena.conf
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadbattleconf(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct Battle_Config prev_config;
@@ -5236,8 +5109,7 @@ int atcommand_reloadbattleconf(const int fd, struct map_session_data* sd, const
}
/*==========================================
* @reloadstatusdb - reloads job_db1.txt job_db2.txt job_db2-2.txt refine_db.txt size_fix.txt
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadstatusdb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
status_readdb();
@@ -5246,8 +5118,7 @@ int atcommand_reloadstatusdb(const int fd, struct map_session_data* sd, const ch
}
/*==========================================
* @reloadpcdb - reloads exp.txt skill_tree.txt attr_fix.txt statpoint.txt
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadpcdb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
pc_readdb();
@@ -5257,8 +5128,7 @@ int atcommand_reloadpcdb(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @reloadmotd - reloads motd.txt
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadmotd(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
pc_read_motd();
@@ -5268,8 +5138,7 @@ int atcommand_reloadmotd(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadscript(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5288,8 +5157,7 @@ int atcommand_reloadscript(const int fd, struct map_session_data* sd, const char
/*==========================================
* @reloadgmdb - reloads gm levels from where they are stored (gm_account.txt / mysql database)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reloadgmdb(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5307,8 +5175,7 @@ int atcommand_reloadgmdb(const int fd, struct map_session_data* sd, const char*
* 1 = Show users in that map and their location
* 2 = Shows NPCs in that map
* 3 = Shows the shops/chats in that map (not implemented)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -5527,8 +5394,7 @@ int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_mount_peco(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -5558,8 +5424,7 @@ int atcommand_mount_peco(const int fd, struct map_session_data* sd, const char*
/*==========================================
*Spy Commands by Syrus22
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_guildspy(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char guild_name[NAME_LENGTH];
@@ -5600,8 +5465,7 @@ int atcommand_guildspy(const int fd, struct map_session_data* sd, const char* co
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_partyspy(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char party_name[NAME_LENGTH];
@@ -5643,8 +5507,7 @@ int atcommand_partyspy(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @repairall [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_repairall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int count, i;
@@ -5673,8 +5536,7 @@ int atcommand_repairall(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* @nuke [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_nuke(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -5705,8 +5567,7 @@ int atcommand_nuke(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @tonpc
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_tonpc(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char npcname[NAME_LENGTH];
@@ -5736,8 +5597,7 @@ int atcommand_tonpc(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_shownpc(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char NPCname[NAME_LENGTH];
@@ -5763,8 +5623,7 @@ int atcommand_shownpc(const int fd, struct map_session_data* sd, const char* com
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hidenpc(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char NPCname[NAME_LENGTH];
@@ -5839,9 +5698,8 @@ int atcommand_unloadnpc(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* time in txt for time command (by [Yor])
- *------------------------------------------
- */
-char * txt_time(unsigned int duration)
+ *------------------------------------------*/
+char* txt_time(unsigned int duration)
{
int days, hours, minutes, seconds;
char temp[256];
@@ -5880,8 +5738,7 @@ char * txt_time(unsigned int duration)
/*==========================================
* @time/@date/@serverdate/@servertime: Display the date/time of the server (by [Yor]
* Calculation management of GM modification (@day/@night GM commands) is done
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_servertime(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct TimerData * timer_data;
@@ -5982,8 +5839,7 @@ static void get_jail_time(int jailtime, int* year, int* month, int* day, int* ho
/*==========================================
* @jail <char_name> by [Yor]
* Special warp! No check with nowarp and nowarpto flag
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_jail(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -6038,8 +5894,7 @@ int atcommand_jail(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @unjail/@discharge <char_name> by [Yor]
* Special warp! No check with nowarp and nowarpto flag
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_unjail(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -6217,8 +6072,7 @@ int atcommand_jailtime(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @disguise <mob_id> by [Valaris] (simplified by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_disguise(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int id = 0;
@@ -6262,8 +6116,7 @@ int atcommand_disguise(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* DisguiseAll
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_disguiseall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int mob_id=0, i=0, users;
@@ -6295,8 +6148,7 @@ int atcommand_disguiseall(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @undisguise by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_undisguise(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6313,8 +6165,7 @@ int atcommand_undisguise(const int fd, struct map_session_data* sd, const char*
/*==========================================
* UndisguiseAll
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_undisguiseall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd, **pl_allsd;
@@ -6334,8 +6185,7 @@ int atcommand_undisguiseall(const int fd, struct map_session_data* sd, const cha
/*==========================================
* @exp by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_exp(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char output[200];
@@ -6359,8 +6209,7 @@ int atcommand_exp(const int fd, struct map_session_data* sd, const char* command
/*==========================================
* @broadcast by [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_broadcast(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6380,8 +6229,7 @@ int atcommand_broadcast(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* @localbroadcast by [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_localbroadcast(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6402,8 +6250,7 @@ int atcommand_localbroadcast(const int fd, struct map_session_data* sd, const ch
/*==========================================
* @email <actual@email> <new@email> by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_email(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char actual_email[100];
@@ -6439,8 +6286,7 @@ int atcommand_email(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*@effect
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_effect(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int type = 0, flag = 0;
@@ -6459,8 +6305,7 @@ int atcommand_effect(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @killer by MouseJstr
* enable killing players even when not in pvp
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_killer(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6478,8 +6323,7 @@ int atcommand_killer(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @killable by MouseJstr
* enable other people killing you
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_killable(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6497,8 +6341,7 @@ int atcommand_killable(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @skillon by MouseJstr
* turn skills on for the map
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_skillon(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6510,8 +6353,7 @@ int atcommand_skillon(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @skilloff by MouseJstr
* Turn skills off on the map
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_skilloff(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -6523,8 +6365,7 @@ int atcommand_skilloff(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @npcmove by MouseJstr
* move a npc
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_npcmove(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int x = 0, y = 0, m;
@@ -6567,8 +6408,7 @@ int atcommand_npcmove(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @addwarp by MouseJstr
* Create a new static warp point.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char w1[64], w3[64], w4[64];
@@ -6596,8 +6436,7 @@ int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @follow by [MouseJstr]
* Follow a player .. staying no more then 5 spaces away
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_follow(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -6633,8 +6472,7 @@ int atcommand_follow(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @dropall by [MouseJstr]
* Drop all your possession on the ground
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_dropall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i;
@@ -6652,8 +6490,7 @@ int atcommand_dropall(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @storeall by [MouseJstr]
* Put everything into storage
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_storeall(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i;
@@ -6686,8 +6523,7 @@ int atcommand_storeall(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @skillid by [MouseJstr]
* lookup a skill by name
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_skillid(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int skillen, idx;
@@ -6716,8 +6552,7 @@ int atcommand_skillid(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @useskill by [MouseJstr]
* A way of using skills without having to find them in the skills menu
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_useskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -6762,8 +6597,7 @@ int atcommand_useskill(const int fd, struct map_session_data* sd, const char* co
* @displayskill by [Skotlex]
* Debug command to locate new skill IDs. It sends the
* three possible skill-effect packets to the area.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_displayskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct status_data * status;
@@ -6789,8 +6623,7 @@ int atcommand_displayskill(const int fd, struct map_session_data* sd, const char
/*==========================================
* @skilltree by [MouseJstr]
* prints the skill tree for a player required to get to a skill
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_skilltree(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -6885,8 +6718,7 @@ void getring (struct map_session_data *sd)
/*==========================================
* @marry by [MouseJstr], fixed by Lupus
* Marry two players
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_marry(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd1 = NULL;
@@ -6928,8 +6760,7 @@ int atcommand_marry(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @divorce by [MouseJstr], fixed by [Lupus]
* divorce two players
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_divorce(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -6982,8 +6813,7 @@ int atcommand_dmtick(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @changelook by [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_changelook(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, j = 0, k = 0;
@@ -7010,8 +6840,7 @@ int atcommand_changelook(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @autotrade by durf (changed by Lupus)
* Turns on/off Autotrade for a specific player
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_autotrade(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7032,8 +6861,7 @@ int atcommand_autotrade(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* @changegm by durf (changed by Lupus)
* Changes Master of your Guild to a specified guild member
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_changegm(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct guild *g;
@@ -7063,8 +6891,7 @@ int atcommand_changegm(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @changeleader by Skotlex
* Changes the leader of a party.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_changeleader(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct party_data *p;
@@ -7123,8 +6950,7 @@ int atcommand_changeleader(const int fd, struct map_session_data* sd, const char
/*==========================================
* @partyoption by Skotlex
* Used to change the item share setting of a party.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_partyoption(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct party_data *p;
@@ -7169,8 +6995,7 @@ int atcommand_partyoption(const int fd, struct map_session_data* sd, const char*
/*==========================================
* @autoloot by Upa-Kun
* Turns on/off AutoLoot for a specific player
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_autoloot(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int rate;
@@ -7202,8 +7027,7 @@ int atcommand_autoloot(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* It is made to rain.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_rain(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7221,8 +7045,7 @@ int atcommand_rain(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* It is made to snow.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_snow(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7241,8 +7064,7 @@ int atcommand_snow(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* Cherry tree snowstorm is made to fall. (Sakura)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_sakura(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7260,8 +7082,7 @@ int atcommand_sakura(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* Clouds appear.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_clouds(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7280,8 +7101,7 @@ int atcommand_clouds(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* Different type of clouds using effect 516
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_clouds2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7300,8 +7120,7 @@ int atcommand_clouds2(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* Fog hangs over.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_fog(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7319,8 +7138,7 @@ int atcommand_fog(const int fd, struct map_session_data* sd, const char* command
/*==========================================
* Fallen leaves fall.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_leaves(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7339,8 +7157,7 @@ int atcommand_leaves(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* Fireworks appear.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_fireworks(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7359,8 +7176,7 @@ int atcommand_fireworks(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* Clearing Weather Effects by Dexity
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_clearweather(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7380,8 +7196,7 @@ int atcommand_clearweather(const int fd, struct map_session_data* sd, const char
/*===============================================================
* Sound Command - plays a sound for everyone! [Codemaster]
- *---------------------------------------------------------------
- */
+ *---------------------------------------------------------------*/
int atcommand_sound(const int fd, struct map_session_data *sd, const char *command, const char *message)
{
char sound_file[100];
@@ -7403,8 +7218,7 @@ int atcommand_sound(const int fd, struct map_session_data *sd, const char *comma
/*==========================================
* MOB Search
- *------------------------------------------
- */
+ *------------------------------------------*/
static int atmobsearch_sub(struct block_list *bl,va_list ap)
{
int mob_id,fd;
@@ -7467,8 +7281,7 @@ int atcommand_mobsearch(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* @cleanmap - cleans items on the ground
- *------------------------------------------
- */
+ *------------------------------------------*/
static int atcommand_cleanmap_sub(struct block_list *bl, va_list ap)
{
nullpo_retr(0, bl);
@@ -7489,8 +7302,7 @@ int atcommand_cleanmap(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* make a NPC/PET talk
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_npctalk(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char name[NAME_LENGTH],mes[100],temp[100];
@@ -7565,8 +7377,7 @@ int atcommand_pettalk(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @users - displays the number of players present on each map (percentage)
- *------------------------------------------
- */
+ *------------------------------------------*/
static struct dbt *users_db = NULL;
static int users_all;
@@ -7603,8 +7414,7 @@ int atcommand_users(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
pc_resetstate(sd);
@@ -7616,8 +7426,7 @@ int atcommand_reset(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_summon(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char name[NAME_LENGTH];
@@ -7669,8 +7478,7 @@ int atcommand_summon(const int fd, struct map_session_data* sd, const char* comm
*
* Temp adjust the GM level required to use a GM command
* Useful during beta testing to allow players to use GM commands for short periods of time
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_adjcmdlvl(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, newlev;
@@ -7711,8 +7519,7 @@ int atcommand_adjcmdlvl(const int fd, struct map_session_data* sd, const char* c
* @adjgmlvl by [MouseJstr]
* Create a temp GM
* Useful during beta testing to allow players to use GM commands for short periods of time
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_adjgmlvl(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int newlev;
@@ -7739,8 +7546,7 @@ int atcommand_adjgmlvl(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @trade by [MouseJstr]
* Open a trade window with a remote player
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_trade(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -7764,7 +7570,7 @@ int atcommand_trade(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @setbattleflag by [MouseJstr]
* set a battle_config flag without having to reboot
- */
+ *------------------------------------------*/
int atcommand_setbattleflag(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char flag[128], value[128];
@@ -7786,10 +7592,9 @@ int atcommand_setbattleflag(const int fd, struct map_session_data* sd, const cha
return 0;
}
-/*===========================
+/*==========================================
* @unmute [Valaris]
- *===========================
-*/
+ *------------------------------------------*/
int atcommand_unmute(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -7820,8 +7625,7 @@ int atcommand_unmute(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @uptime by MC Cameri
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_uptime(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
unsigned long seconds = 0, day = 24*60*60, hour = 60*60,
@@ -7845,8 +7649,7 @@ int atcommand_uptime(const int fd, struct map_session_data* sd, const char* comm
/*==========================================
* @changesex <sex>
* => Changes one's sex. Argument sex can be 0 or 1, m or f, male or female.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_changesex(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7856,8 +7659,7 @@ int atcommand_changesex(const int fd, struct map_session_data* sd, const char* c
/*================================================
* @mute - Mutes a player for a set amount of time
- *------------------------------------------------
- */
+ *------------------------------------------------*/
int atcommand_mute(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
@@ -7891,8 +7693,7 @@ int atcommand_mute(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @refresh (like @jumpto <<yourself>>)
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_refresh(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -7903,8 +7704,7 @@ int atcommand_refresh(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @petid <part of pet name>
* => Displays a list of matching pets.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_petid(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char searchtext[100];
@@ -7949,8 +7749,7 @@ int atcommand_petid(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @identify
* => GM's magnifier.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_identify(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i,num;
@@ -7973,8 +7772,7 @@ int atcommand_identify(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @gmotd (Global MOTD)
* by davidsiaw :P
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_gmotd(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char buf[256];
@@ -8015,15 +7813,7 @@ int atcommand_misceffect(const int fd, struct map_session_data* sd, const char*
* Jump to a player by PID number
* Original by Dino9021
* Added in by nsstrunks
- *------------------------------------------
- */
-
-/*==========================================
- * Jump to a player by PID number
- * Original by Dino9021
- * Added in by nsstrunks
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_jumptoid2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int aid=0;
@@ -8064,15 +7854,7 @@ int atcommand_jumptoid2(const int fd, struct map_session_data* sd, const char* c
* Recall a player by PID number
* Original by Dino9021
* Added in by nsstrunks
- *------------------------------------------
- */
-
-/*==========================================
- * Recall a player by PID number
- * Original by Dino9021
- * Added in by nsstrunks
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_recallid2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int aid=0;
@@ -8119,15 +7901,7 @@ int atcommand_recallid2(const int fd, struct map_session_data* sd, const char* c
* Kick a player by PID number
* Original by Dino9021
* Added in by nsstrunks
- *------------------------------------------
- */
-
-/*==========================================
- * Kick a player by PID number
- * Original by Dino9021
- * Added in by nsstrunks
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_kickid2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -8156,15 +7930,7 @@ int atcommand_kickid2(const int fd, struct map_session_data* sd, const char* com
* Revive a player by PID number
* Original by Dino9021
* Added in by nsstrunks
- *------------------------------------------
- */
-
-/*==========================================
- * Revive a player by PID number
- * Original by Dino9021
- * Added in by nsstrunks
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_reviveid2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int aid=0;
@@ -8194,15 +7960,7 @@ int atcommand_reviveid2(const int fd, struct map_session_data* sd, const char* c
* Kill a player by PID number
* Original by Dino9021
* Added in by nsstrunks
- *------------------------------------------
- */
-
-/*==========================================
- * Kill a player by PID number
- * Original by Dino9021
- * Added in by nsstrunks
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_killid2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int aid=0;
@@ -8234,8 +7992,7 @@ int atcommand_killid2(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* Mail System commands by [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_listmail(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if(!mail_server_enable)
@@ -8310,8 +8067,7 @@ int atcommand_sendmail(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* Refresh online command for SQL [Valaris]
* Will refresh and check online column of players and set correctly.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_refreshonline(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
send_users_tochar(-1, gettick(), 0, 0);
@@ -8323,8 +8079,7 @@ int atcommand_refreshonline(const int fd, struct map_session_data* sd, const cha
/*==========================================
* Show Monster DB Info v 1.0
* originally by [Lupus] eAthena
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_mobinfo(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
unsigned char msize[3][7] = {"Small", "Medium", "Large"};
@@ -8434,8 +8189,7 @@ int atcommand_mobinfo(const int fd, struct map_session_data* sd, const char* com
/*=========================================
* @showmobs by KarLaeda
* => For 5 sec displays the mobs on minimap
-*------------------------------------------
-*/
+*------------------------------------------*/
int atshowmobs_timer(int tid, unsigned int tick, int id, int data)
{
struct map_session_data *sd;
@@ -8517,8 +8271,7 @@ int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* homunculus level up [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_homlevel(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
TBL_HOM * hd;
@@ -8551,8 +8304,7 @@ int atcommand_homlevel(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* homunculus evolution H [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_homevolution(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -8574,8 +8326,7 @@ int atcommand_homevolution(const int fd, struct map_session_data* sd, const char
/*==========================================
* call choosen homunculus [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_makehomun(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int homunid;
@@ -8604,8 +8355,7 @@ int atcommand_makehomun(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* modify homunculus intimacy [orn]
- *------------------------------------------
-ho */
+ *------------------------------------------o */
int atcommand_homfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int friendly = 0;
@@ -8635,8 +8385,7 @@ int atcommand_homfriendly(const int fd, struct map_session_data* sd, const char*
/*==========================================
* modify homunculus hunger [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_homhungry(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hungry = 0;
@@ -8666,8 +8415,7 @@ int atcommand_homhungry(const int fd, struct map_session_data* sd, const char* c
/*==========================================
* make the homunculus speak [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_homtalk(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char mes[100],temp[100];
@@ -8697,8 +8445,7 @@ int atcommand_homtalk(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* Show homunculus stats
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_hominfo(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct homun_data *hd;
@@ -8854,8 +8601,7 @@ int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char*
/*==========================================
* Show Items DB Info v 1.0
* originally by [Lupus] eAthena
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_iteminfo(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char *itype[12] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow"};
@@ -8907,8 +8653,7 @@ int atcommand_iteminfo(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* Show who drops the item.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_whodrops(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct item_data *item_data, *item_array[MAX_SEARCH];
@@ -8956,10 +8701,8 @@ int atcommand_whodrops(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* @adopt by [Veider]
- *
* adopt a novice
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_adopt(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd1 = NULL;
@@ -9018,8 +8761,7 @@ int atcommand_version(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* @mutearea by MouseJstr
- *------------------------------------------
- */
+ *------------------------------------------*/
static int atcommand_mutearea_sub(struct block_list *bl,va_list ap)
{
@@ -9078,8 +8820,7 @@ int atcommand_rates(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* @me by lordalfa
* => Displays the OUTPUT string on top of the Visible players Heads.
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_me(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char tempmes[200];
@@ -9108,8 +8849,7 @@ int atcommand_me(const int fd, struct map_session_data* sd, const char* command,
/*==========================================
* @size
* => Resize your character sprite. [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_size(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int size=0;
@@ -9136,8 +8876,7 @@ int atcommand_size(const int fd, struct map_session_data* sd, const char* comman
/*==========================================
* @monsterignore
* => Makes monsters ignore you. [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_monsterignore(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
nullpo_retr(-1, sd);
@@ -9155,8 +8894,7 @@ int atcommand_monsterignore(const int fd, struct map_session_data* sd, const cha
/*==========================================
* @fakename
* => Gives your character a fake name. [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_fakename(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char name[NAME_LENGTH];
@@ -9191,8 +8929,7 @@ int atcommand_fakename(const int fd, struct map_session_data* sd, const char* co
* @mapflag [flag name] [1|0|on|off] [map name] by Lupus
* => Shows information about the map flags [map name]
* Also set flags
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_mapflag(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
// WIP
@@ -9201,8 +8938,7 @@ int atcommand_mapflag(const int fd, struct map_session_data* sd, const char* com
/*===================================
* Remove some messages
- *-----------------------------------
- */
+ *-----------------------------------*/
int atcommand_showexp(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if (sd->state.showexp) {
@@ -9250,8 +8986,7 @@ int atcommand_showdelay(const int fd, struct map_session_data* sd, const char* c
* @accept - accept invitation
* @reject - reject invitation
* @leave - leave duel
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_invite(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
unsigned int did = sd->duel_group;
@@ -9302,13 +9037,6 @@ int atcommand_duel(const int fd, struct map_session_data* sd, const char* comman
unsigned int maxpl=0, newduel;
struct map_session_data *target_sd;
- /* // Commnted because it can be disabled in at-comms conf.
- if(!battle_config.duel_enable) {
- clif_displaymessage(fd, "Duel: duel is disable.");
- return 0;
- }
- */
-
if(sd->duel_group > 0) {
duel_showinfo(sd->duel_group, sd);
return 0;
@@ -9410,8 +9138,7 @@ int atcommand_reject(const int fd, struct map_session_data* sd, const char* comm
/*===================================
* Away message (@away, @aw) [LuzZza]
- *-----------------------------------
- */
+ *-----------------------------------*/
int atcommand_away(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if(strlen(message) > 0) {
@@ -9529,11 +9256,9 @@ int atcommand_main(const int fd, struct map_session_data* sd, const char* comman
} else {
if(sd->state.mainchat)
- // Main chat currently enabled. Usage: @main <on|off>, @main <message>.
- clif_displaymessage(fd, msg_txt(384));
+ clif_displaymessage(fd, msg_txt(384)); // Main chat currently enabled. Usage: @main <on|off>, @main <message>.
else
- // Main chat currently disabled. Usage: @main <on|off>, @main <message>.
- clif_displaymessage(fd, msg_txt(385));
+ clif_displaymessage(fd, msg_txt(385)); // Main chat currently disabled. Usage: @main <on|off>, @main <message>.
}
return 0;
}
@@ -9541,8 +9266,7 @@ int atcommand_main(const int fd, struct map_session_data* sd, const char* comman
/*=====================================
* Autorejecting Invites/Deals [LuzZza]
* Usage: @noask
- *-------------------------------------
- */
+ *-------------------------------------*/
int atcommand_noask(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if(sd->state.noask) {
@@ -9559,8 +9283,7 @@ int atcommand_noask(const int fd, struct map_session_data* sd, const char* comma
/*=====================================
* Send a @request message to all GMs of lowest_gm_level.
* Usage: @request <petition>
- *-------------------------------------
- */
+ *-------------------------------------*/
int atcommand_request(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
if (!message || !*message) {
@@ -9577,8 +9300,7 @@ int atcommand_request(const int fd, struct map_session_data* sd, const char* com
/*==========================================
* Feel (SG save map) Reset [HiddenDragon]
- *------------------------------------------
- */
+ *------------------------------------------*/
int atcommand_feelreset(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
diff --git a/src/map/battle.c b/src/map/battle.c
index f13125bb7..9ec58981e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -45,8 +45,7 @@ int battle_getcurrentskill(struct block_list *bl)
/*==========================================
* Get random targetting enemy
- *------------------------------------------
- */
+ *------------------------------------------*/
static int battle_gettargeted_sub(struct block_list *bl, va_list ap)
{
struct block_list **bl_list;
@@ -206,8 +205,7 @@ int battle_delay_damage (unsigned int tick, struct block_list *src, struct block
* Does attribute fix modifiers.
* Added passing of the chars so that the status changes can affect it. [Skotlex]
* Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks.
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_type, int def_lv)
{
struct status_change *sc=NULL, *tsc=NULL;
@@ -257,8 +255,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
/*==========================================
* ダ??[ジ?ナ?I計算
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag)
{
struct map_session_data *sd = NULL;
@@ -514,8 +511,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
/*==========================================
* Calculates GVG related damage adjustments.
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag)
{
struct mob_data *md = NULL;
@@ -583,8 +579,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
/*==========================================
* HP/SP吸収の計算
- *------------------------------------------
- */
+ *------------------------------------------*/
static int battle_calc_drain(int damage, int rate, int per)
{
int diff = 0;
@@ -603,8 +598,7 @@ static int battle_calc_drain(int damage, int rate, int per)
/*==========================================
* ?C練ダ??[ジ
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_addmastery(struct map_session_data *sd,struct block_list *target,int dmg,int type)
{
int damage,skill;
@@ -787,8 +781,7 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk
/*==========================================
* Consumes ammo for the given skill.
- *------------------------------------------
- */
+ *------------------------------------------*/
void battle_consume_ammo(TBL_PC*sd, int skill, int lv)
{
int qty=1;
@@ -856,8 +849,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
#define damage_div_fix(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; }
/*==========================================
* battle_calc_weapon_attack (by Skotlex)
- *------------------------------------------
- */
+ *------------------------------------------*/
static struct Damage battle_calc_weapon_attack(
struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int wflag)
{
@@ -2113,8 +2105,7 @@ static struct Damage battle_calc_weapon_attack(
/*==========================================
* battle_calc_magic_attack [DracoRPG]
- *------------------------------------------
- */
+ *------------------------------------------*/
struct Damage battle_calc_magic_attack(
struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag)
{
@@ -2435,8 +2426,7 @@ struct Damage battle_calc_magic_attack(
/*==========================================
* その他ダ??[ジ計算
- *------------------------------------------
- */
+ *------------------------------------------*/
struct Damage battle_calc_misc_attack(
struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag)
{
@@ -2658,10 +2648,8 @@ struct Damage battle_calc_misc_attack(
}
/*==========================================
* ダ??[ジ計算一括??用
- *------------------------------------------
- */
-struct Damage battle_calc_attack( int attack_type,
- struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
+ *------------------------------------------*/
+struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
{
struct Damage d;
switch(attack_type){
@@ -2783,8 +2771,7 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage,
/*==========================================
* 通??U撃??まとめ
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag)
{
struct map_session_data *sd = NULL, *tsd = NULL;
@@ -3050,8 +3037,7 @@ struct block_list* battle_get_master(struct block_list *src)
* 1: flag holds true (is enemy, party, etc)
* -1: flag fails
* 0: Invalid target (non-targetable ever)
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_check_target( struct block_list *src, struct block_list *target,int flag)
{
int m,state = 0; //Initial state none
@@ -3323,8 +3309,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
/*==========================================
* 射程判定
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_check_range(struct block_list *src,struct block_list *bl,int range)
{
nullpo_retr(0, src);
@@ -3635,7 +3620,6 @@ static const struct battle_data_short {
{ "title_lvl7", &battle_config.title_lvl7}, // [Lupus]
{ "title_lvl8", &battle_config.title_lvl8}, // [Lupus]
- { "duel_enable", &battle_config.duel_enable}, // [LuzZza]
{ "duel_allow_pvp", &battle_config.duel_allow_pvp}, // [LuzZza]
{ "duel_allow_gvg", &battle_config.duel_allow_gvg}, // [LuzZza]
{ "duel_allow_teleport", &battle_config.duel_allow_teleport}, // [LuzZza]
@@ -3710,7 +3694,8 @@ static const struct battle_data_int {
{ "hvan_explosion_intimate", &battle_config.hvan_explosion_intimate }, //[orn]
};
-int battle_set_value(const char* w1, const char* w2) {
+int battle_set_value(const char* w1, const char* w2)
+{
int i;
for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++)
if (strcmpi(w1, battle_data_short[i].str) == 0) {
@@ -3725,7 +3710,8 @@ int battle_set_value(const char* w1, const char* w2) {
return 0;
}
-int battle_get_value(const char* w1) {
+int battle_get_value(const char* w1)
+{
int i;
for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++)
if (strcmpi(w1, battle_data_short[i].str) == 0) {
@@ -3738,7 +3724,8 @@ int battle_get_value(const char* w1) {
return 0;
}
-void battle_set_defaults() {
+void battle_set_defaults()
+{
battle_config.warp_point_debug=0;
battle_config.enable_critical=BL_PC;
battle_config.mob_critical_rate=100;
@@ -4065,7 +4052,6 @@ void battle_set_defaults() {
battle_config.title_lvl7 = 80;
battle_config.title_lvl8 = 99;
- battle_config.duel_enable = 1;
battle_config.duel_allow_pvp = 0;
battle_config.duel_allow_gvg = 0;
battle_config.duel_allow_teleport = 0;
@@ -4300,8 +4286,7 @@ void battle_validate_conf() {
/*==========================================
* ?ン定ファイルを読み?桙゙
- *------------------------------------------
- */
+ *------------------------------------------*/
int battle_config_read(const char *cfgName)
{
char line[1024], w1[1024], w2[1024];
@@ -4334,11 +4319,13 @@ int battle_config_read(const char *cfgName)
return 0;
}
-void do_init_battle(void) {
+void do_init_battle(void)
+{
delay_damage_ers = ers_new(sizeof(struct delay_damage));
add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
}
-void do_final_battle(void) {
+void do_final_battle(void)
+{
ers_destroy(delay_damage_ers);
}
diff --git a/src/map/battle.h b/src/map/battle.h
index e33b811ad..c574f2db5 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -401,7 +401,6 @@ extern struct Battle_Config {
unsigned short title_lvl7; // Players titles [Lupus]
unsigned short title_lvl8; // Players titles [Lupus]
- unsigned short duel_enable; // [LuzZza]
unsigned short duel_allow_pvp; // [LuzZza]
unsigned short duel_allow_gvg; // [LuzZza]
unsigned short duel_allow_teleport; // [LuzZza]
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 756fc4943..ca7da3f7b 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -107,8 +107,7 @@ CCMD_FUNC(hominfo);
/*==========================================
*CharCommandInfo charcommand_info[]構造体の定義
- *------------------------------------------
- */
+ *------------------------------------------*/
// First char of commands is configured in charcommand_athena.conf. Leave # in this list for default value.
// to set default level, read charcommand_athena.conf first please.
@@ -212,7 +211,8 @@ static CharCommandInfo charcommand_info[] = {
{ CharCommand_Unknown, NULL, 1, NULL }
};
-int get_charcommand_level(const CharCommandType type) {
+int get_charcommand_level(const CharCommandType type)
+{
int i;
for (i = 0; charcommand_info[i].type != CharCommand_None; i++)
@@ -222,7 +222,8 @@ int get_charcommand_level(const CharCommandType type) {
return 100; // 100: command can not be used
}
-CharCommandType is_charcommand_sub(const int fd, struct map_session_data* sd, const char* str, int gmlvl) {
+CharCommandType is_charcommand_sub(const int fd, struct map_session_data* sd, const char* str, int gmlvl)
+{
CharCommandInfo info;
CharCommandType type;
@@ -271,9 +272,9 @@ CharCommandType is_charcommand_sub(const int fd, struct map_session_data* sd, co
/*==========================================
*is_charcommand @コマンドに存在するかどうか確認する
- *------------------------------------------
- */
-CharCommandType is_charcommand(const int fd, struct map_session_data* sd, const char* message) {
+ *------------------------------------------*/
+CharCommandType is_charcommand(const int fd, struct map_session_data* sd, const char* message)
+{
const char* str = message;
int s_flag = 0;
@@ -303,9 +304,9 @@ CharCommandType is_charcommand(const int fd, struct map_session_data* sd, const
/*==========================================
*
- *------------------------------------------
- */
-CharCommandType charcommand(struct map_session_data* sd, const int level, const char* message, CharCommandInfo* info) {
+ *------------------------------------------*/
+CharCommandType charcommand(struct map_session_data* sd, const int level, const char* message, CharCommandInfo* info)
+{
char* p = (char *)message;
if (!info)
@@ -352,9 +353,9 @@ CharCommandType charcommand(struct map_session_data* sd, const int level, const
/*==========================================
*
- *------------------------------------------
- */
-static CharCommandInfo* get_charcommandinfo_byname(const char* name) {
+ *------------------------------------------*/
+static CharCommandInfo* get_charcommandinfo_byname(const char* name)
+{
int i;
for (i = 0; charcommand_info[i].type != CharCommand_Unknown; i++)
@@ -366,9 +367,9 @@ static CharCommandInfo* get_charcommandinfo_byname(const char* name) {
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_config_read(const char *cfgName) {
+ *------------------------------------------*/
+int charcommand_config_read(const char *cfgName)
+{
char line[1024], w1[1024], w2[1024];
CharCommandInfo* p;
FILE* fp;
@@ -409,11 +410,8 @@ int charcommand_config_read(const char *cfgName) {
/*==========================================
* 対象キャラクターを転職させる upper指定で転生や養子も可能
- *------------------------------------------
- */
-int charcommand_jobchange(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_jobchange(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[100];
struct map_session_data* pl_sd;
@@ -478,11 +476,8 @@ int charcommand_jobchange(
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_petrename(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_petrename(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -521,11 +516,8 @@ int charcommand_petrename(
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_petfriendly(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_petfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int friendly = 0;
char character[NAME_LENGTH];
@@ -576,11 +568,8 @@ int charcommand_petfriendly(
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_stats(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_stats(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
char job_jobname[100];
@@ -653,11 +642,8 @@ int charcommand_stats(
/*==========================================
* Character Reset
- *------------------------------------------
- */
-int charcommand_reset(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_reset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
char output[200];
@@ -693,11 +679,8 @@ int charcommand_reset(
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_option(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_option(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
int opt1 = 0, opt2 = 0, opt3 = 0;
@@ -734,11 +717,8 @@ int charcommand_option(
/*==========================================
*
- *------------------------------------------
- */
-int charcommand_save(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_save(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char map_name[MAP_NAME_LENGTH_EXT];
char character[NAME_LENGTH];
@@ -789,8 +769,7 @@ int charcommand_save(
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
//** Character Stats All by fritz
int charcommand_stats_all(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
@@ -835,8 +814,7 @@ int charcommand_stats_all(const int fd, struct map_session_data* sd, const char*
/*==========================================
* CharSpiritBall Function by PalasX
- *------------------------------------------
- */
+ *------------------------------------------*/
int charcommand_spiritball(const int fd, struct map_session_data* sd,const char* command, const char* message)
{
struct map_session_data *pl_sd;
@@ -876,11 +854,8 @@ int charcommand_spiritball(const int fd, struct map_session_data* sd,const char*
/*==========================================
* #itemlist <character>: Displays the list of a player's items.
- *------------------------------------------
- */
-int charcommand_itemlist(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_itemlist(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
struct item_data *item_data, *item_temp;
@@ -1005,10 +980,8 @@ int charcommand_itemlist(
* #effect by [MouseJstr]
*
* Create a effect localized on another character
- *------------------------------------------
- */
-int charcommand_effect(const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_effect(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
char character[NAME_LENGTH];
@@ -1034,12 +1007,8 @@ int charcommand_effect(const int fd, struct map_session_data* sd,
/*==========================================
* #storagelist <character>: Displays the items list of a player's storage.
- *------------------------------------------
- */
-int
-charcommand_storagelist(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_storagelist(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct storage *stor;
struct map_session_data *pl_sd;
@@ -1119,8 +1088,7 @@ charcommand_storagelist(
return 0;
}
-static void
-charcommand_giveitem_sub(struct map_session_data *sd,struct item_data *item_data,int number)
+static void charcommand_giveitem_sub(struct map_session_data *sd,struct item_data *item_data,int number)
{
int flag = 0;
int loop = 1, get_count = number,i;
@@ -1150,11 +1118,8 @@ charcommand_giveitem_sub(struct map_session_data *sd,struct item_data *item_data
/*==========================================
* #item command (usage: #item <name/id_of_item> <quantity> <player>)
* by MC Cameri
- *------------------------------------------
- */
-int charcommand_item(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_item(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char item_name[100];
char character[NAME_LENGTH];
@@ -1249,11 +1214,8 @@ int charcommand_item(
/*==========================================
* #warp/#rura/#rura+ <mapname> <x> <y> <char name>
- *------------------------------------------
- */
-int charcommand_warp(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_warp(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char map_name[MAP_NAME_LENGTH_EXT];
char character[NAME_LENGTH];
@@ -1308,11 +1270,8 @@ int charcommand_warp(
/*==========================================
* #zeny <charname>
- *------------------------------------------
- */
-int charcommand_zeny(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_zeny(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char character[NAME_LENGTH];
@@ -1353,12 +1312,8 @@ int charcommand_zeny(
/*==========================================
* #fakename <char name> <fake name>
- *------------------------------------------
- */
-
-int charcommand_fakename(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_fakename(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char name[NAME_LENGTH];
@@ -1405,11 +1360,8 @@ int charcommand_fakename(
/*==========================================
* #baselvl <#> <nickname>
* Transferred by: Kevin
- *------------------------------------------
-*/
-int charcommand_baselevel(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_baselevel(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1480,11 +1432,8 @@ int charcommand_baselevel(
/*==========================================
* #jlvl <#> <nickname>
* Transferred by: Kevin
- *------------------------------------------
- */
-int charcommand_joblevel(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_joblevel(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1556,11 +1505,8 @@ int charcommand_joblevel(
/*==========================================
* #questskill <skill_#> <nickname>
* Transferred by: Kevin
- *------------------------------------------
- */
-int charcommand_questskill(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_questskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1602,11 +1548,8 @@ int charcommand_questskill(
/*==========================================
* #lostskill <skill_#> <nickname>
* Transferred by: Kevin
- *------------------------------------------
- */
-int charcommand_lostskill(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_lostskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1648,11 +1591,8 @@ int charcommand_lostskill(
/*==========================================
* Character Skill Reset
- *------------------------------------------
- */
-int charcommand_skreset(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_skreset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1683,11 +1623,8 @@ int charcommand_skreset(
/*==========================================
* Character Stat Reset
- *------------------------------------------
- */
-int charcommand_streset(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_streset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1718,11 +1655,8 @@ int charcommand_streset(
/*==========================================
* Character Model by chbrules
- *------------------------------------------
- */
-int charcommand_model(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_model(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_style = 0, hair_color = 0, cloth_color = 0;
struct map_session_data *pl_sd;
@@ -1741,19 +1675,10 @@ int charcommand_model(
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE &&
hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR &&
cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
- /* Removed this check for being too strange. [Skotlex]
- if (cloth_color != 0 &&
- pl_sd->status.sex == 1 &&
- (pl_sd->status.class_ == JOB_ASSASSIN || pl_sd->status.class_ == JOB_ROGUE)) {
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(pl_sd, LOOK_HAIR, hair_style);
pc_changelook(pl_sd, LOOK_HAIR_COLOR, hair_color);
pc_changelook(pl_sd, LOOK_CLOTHES_COLOR, cloth_color);
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -1768,11 +1693,8 @@ int charcommand_model(
/*==========================================
* Character Skill Point (Rewritten by [Yor])
- *------------------------------------------
- */
-int charcommand_skpoint(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_skpoint(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1813,11 +1735,8 @@ int charcommand_skpoint(
/*==========================================
* Character Status Point (rewritten by [Yor])
- *------------------------------------------
- */
-int charcommand_stpoint(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_stpoint(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char player[NAME_LENGTH];
@@ -1858,11 +1777,8 @@ int charcommand_stpoint(
/*==========================================
* charchangesex command (usage: charchangesex <player_name>)
- *------------------------------------------
- */
-int charcommand_changesex(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_changesex(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char player[NAME_LENGTH];
nullpo_retr(-1, sd);
@@ -1889,11 +1805,8 @@ int charcommand_changesex(
/*==========================================
* Feel (SG save map) Reset
- *------------------------------------------
- */
-int charcommand_feelreset(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_feelreset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
char output[200];
@@ -1926,11 +1839,8 @@ int charcommand_feelreset(
/*==========================================
* #help - Char commands [Kayla]
- *------------------------------------------
- */
-int charcommand_help(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_help(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char buf[2048], w1[2048], w2[2048];
int i, gm_level;
@@ -1967,11 +1877,8 @@ int charcommand_help(
/*==========================================
* Loads a character back to their save point [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_load(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_load(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int m;
char character[NAME_LENGTH];
@@ -2015,11 +1922,8 @@ int charcommand_load(
/*==========================================
* Changes the targets speed [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_speed(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_speed(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int speed;
char character[NAME_LENGTH];
@@ -2063,11 +1967,8 @@ int charcommand_speed(
/*==========================================
* Opens their storage [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_storage(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_storage(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
@@ -2109,11 +2010,8 @@ int charcommand_storage(
/*==========================================
* Opens their guild storage
- *------------------------------------------
- */
-int charcommand_guildstorage(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_guildstorage(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct storage *stor; //changes from Freya/Yor
char character[NAME_LENGTH];
@@ -2164,11 +2062,8 @@ int charcommand_guildstorage(
/*==========================================
* Applies GM Hide to a character [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_hide(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_hide(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
@@ -2215,11 +2110,8 @@ int charcommand_hide(
/*==========================================
* Resurrects a dead character [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_alive(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_alive(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
@@ -2254,11 +2146,8 @@ int charcommand_alive(
/*==========================================
* Heals someone's HP and SP [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_heal(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_heal(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hp = 0, sp = 0; // [Valaris] thanks to fov
char character[NAME_LENGTH];
@@ -2340,11 +2229,8 @@ int charcommand_heal(
/*==========================================
* Creates items as specified [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_item2(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_item2(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct item item_tmp;
struct item_data *item_data;
@@ -2436,11 +2322,8 @@ int charcommand_item2(
/*==========================================
* Reset a character's items [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_itemreset(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_itemreset(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i, count = 0;
char character[NAME_LENGTH];
@@ -2487,11 +2370,8 @@ int charcommand_itemreset(
/*==========================================
* Refine their items [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_refine(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_refine(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int i,j, position = 0, refine = 0, current_position, final_refine;
int count;
@@ -2595,11 +2475,8 @@ int charcommand_refine(
/*==========================================
* Produce a manufactured item in their inventory [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_produce(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_produce(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char item_name[100];
int item_id, attribute = 0, star = 0;
@@ -2679,11 +2556,8 @@ int charcommand_produce(
/*==========================================
* Changes a character's stats [HiddenDragon
- *------------------------------------------
- */
-int charcommand_param(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_param(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int index, value = 0, new_value;
char character[NAME_LENGTH];
@@ -2758,11 +2632,8 @@ int charcommand_param(
/*==========================================
* Levels up a character's guild [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_guildlevelup(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_guildlevelup(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int level = 0;
short added_level;
@@ -2818,11 +2689,8 @@ int charcommand_guildlevelup(
/*==========================================
* Opens a hatch window for them [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_hatch(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_hatch(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -2856,11 +2724,8 @@ int charcommand_hatch(
/*==========================================
* Change target pet's hunger [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_pethungry(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_pethungry(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hungry;
struct pet_data *pd;
@@ -2911,11 +2776,8 @@ int charcommand_pethungry(
/*==========================================
* Give all skills to target [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_allskill(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_allskill(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
@@ -2951,8 +2813,7 @@ int charcommand_allskill(
/*==========================================
* Change target's clothing color [HiddenDragon]
- *------------------------------------------
- */
+ *------------------------------------------*/
int charcommand_dye(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int cloth_color = 0;
@@ -2994,8 +2855,7 @@ int charcommand_dye(const int fd, struct map_session_data* sd, const char* comma
/*==========================================
* Change target's hair style [HiddenDragon]
- *------------------------------------------
- */
+ *------------------------------------------*/
int charcommand_hair_style(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_style = 0;
@@ -3023,17 +2883,10 @@ int charcommand_hair_style(const int fd, struct map_session_data* sd, const char
}
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
- /* Removed because this check is TOO strange. [Skotlex]
- if (hair_style != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) { //???
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(pl_sd, LOOK_HAIR, hair_style);
clif_displaymessage(pl_sd->fd, msg_txt(36)); // Appearence changed.
if (pl_sd->fd != fd)
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -3044,8 +2897,7 @@ int charcommand_hair_style(const int fd, struct map_session_data* sd, const char
/*==========================================
* Change target's hair color [HiddenDragon]
- *------------------------------------------
- */
+ *------------------------------------------*/
int charcommand_hair_color(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_color = 0;
@@ -3075,17 +2927,10 @@ int charcommand_hair_color(const int fd, struct map_session_data* sd, const char
}
if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
- /* Removed for being such a strange check. [Skotlex]
- if (hair_color != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) {
- clif_displaymessage(fd, msg_txt(35)); // You can't use this command with this class.
- return -1;
- } else {
- */
pc_changelook(pl_sd, LOOK_HAIR_COLOR, hair_color);
clif_displaymessage(pl_sd->fd, msg_txt(36)); // Appearence changed.
if (pl_sd->fd != fd)
clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
-// }
} else {
clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
return -1;
@@ -3096,11 +2941,8 @@ int charcommand_hair_color(const int fd, struct map_session_data* sd, const char
/*==========================================
* Change all target's stats [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_allstats(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_allstats(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int index, count, value = 0, max, new_value;
short* status[6];
@@ -3174,11 +3016,8 @@ int charcommand_allstats(
/*==========================================
* Gives/Removes a peco from a player [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_mount_peco(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_mount_peco(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char character[NAME_LENGTH];
@@ -3235,10 +3074,8 @@ int charcommand_mount_peco(
/*==========================================
* Remove items from a player (now a char command) [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_delitem(const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_delitem(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct map_session_data *pl_sd;
char item_name[100];
@@ -3342,12 +3179,9 @@ static void get_jail_time(int jailtime, int* year, int* month, int* day, int* ho
/*==========================================
* Jail a player for a certain amount of time [Coltaro]
- *------------------------------------------
- */
-int charcommand_jailtime(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
- {
+ *------------------------------------------*/
+int charcommand_jailtime(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
struct map_session_data* pl_sd;
int year, month, day, hour, minute;
char character[NAME_LENGTH];
@@ -3392,11 +3226,8 @@ int charcommand_jailtime(
/*==========================================
* Disguises a player [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_disguise(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_disguise(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int mob_id;
char mob_name[NAME_LENGTH];
@@ -3460,11 +3291,8 @@ int charcommand_disguise(
/*==========================================
* Undisguises a player [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_undisguise(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_undisguise(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data* pl_sd;
@@ -3506,11 +3334,8 @@ int charcommand_undisguise(
/*==========================================
* Displays contents of target's cart [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_cart_list(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_cart_list(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char outputtmp[200];
char output[200];
@@ -3598,11 +3423,8 @@ static int charcommand_stopattack(struct block_list *bl,va_list ap)
/*==========================================
* Enable a player to kill players even when not in pvp [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_killer(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_killer(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -3646,11 +3468,8 @@ int charcommand_killer(
/*==========================================
* Enable other players to kill target even when not in pvp [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_killable(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_killable(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -3694,11 +3513,8 @@ int charcommand_killable(
/*==========================================
* Refreshes target [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_refresh(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_refresh(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -3728,11 +3544,8 @@ int charcommand_refresh(
/*==========================================
* View target's exp [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_exp(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_exp(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char output[200];
double nextb, nextj;
@@ -3775,12 +3588,8 @@ int charcommand_exp(
/*==========================================
* Makes monsters ignore target [HiddenDragon]
- *------------------------------------------
- */
-
-int charcommand_monsterignore(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_monsterignore(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -3821,11 +3630,8 @@ int charcommand_monsterignore(
/*==========================================
* Change target's size [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_size(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_size(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int size=0;
char character[NAME_LENGTH];
@@ -3880,11 +3686,8 @@ int charcommand_size(
/*==========================================
* Level up target's homunculus [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_homlevel(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_homlevel(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
TBL_HOM * hd;
int level = 0, i = 0;
@@ -3934,11 +3737,8 @@ int charcommand_homlevel(
/*==========================================
* Evolve target's homunculus [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_homevolution(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_homevolution(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char character[NAME_LENGTH];
struct map_session_data *pl_sd;
@@ -3983,11 +3783,8 @@ int charcommand_homevolution(
/*==========================================
* Create a homunculus for target [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_makehomun(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_makehomun(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int homunid;
@@ -4034,11 +3831,8 @@ int charcommand_makehomun(
/*==========================================
* Change Target's homunculus' friendlyness [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_homfriendly(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_homfriendly(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int friendly = 0;
@@ -4085,11 +3879,8 @@ int charcommand_homfriendly(
/*==========================================
* Modify target's homunculus hunger [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_homhungry(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_homhungry(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hungry = 0;
@@ -4139,11 +3930,8 @@ int charcommand_homhungry(
/*==========================================
* Show target's homunculus stats [HiddenDragon]
- *------------------------------------------
- */
-int charcommand_hominfo(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
+ *------------------------------------------*/
+int charcommand_hominfo(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct homun_data *hd;
struct status_data *status;
diff --git a/src/map/chat.c b/src/map/chat.c
index 92901c86e..4a7bdeedd 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -19,8 +19,7 @@ int chat_triggerevent(struct chat_data *cd);
/*==========================================
* chatroom creation
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_createchat(struct map_session_data* sd,int limit, int pub, char* pass, char* title, int titlelen)
{
struct chat_data *cd;
@@ -68,8 +67,7 @@ int chat_createchat(struct map_session_data* sd,int limit, int pub, char* pass,
/*==========================================
* 既存チャットルームに参加
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_joinchat(struct map_session_data* sd, int chatid, char* pass)
{
struct chat_data *cd;
@@ -173,8 +171,7 @@ int chat_leavechat(struct map_session_data* sd)
/*==========================================
* チャットルームの持ち主を譲る
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_changechatowner(struct map_session_data *sd,char *nextownername)
{
struct chat_data *cd;
@@ -219,8 +216,7 @@ int chat_changechatowner(struct map_session_data *sd,char *nextownername)
/*==========================================
* チャットの状態(タイトル等)を変更
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_changechatstatus(struct map_session_data *sd,int limit,int pub,char* pass,char* title,int titlelen)
{
struct chat_data *cd;
@@ -247,8 +243,7 @@ int chat_changechatstatus(struct map_session_data *sd,int limit,int pub,char* pa
/*==========================================
* チャットルームから蹴り出す
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_kickchat(struct map_session_data *sd,char *kickusername)
{
struct chat_data *cd;
@@ -334,8 +329,7 @@ int chat_deletenpcchat(struct npc_data* nd)
/*==========================================
* 規定人数以上でイベントが定義されてるなら実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int chat_triggerevent(struct chat_data *cd)
{
nullpo_retr(0, cd);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 3928c0a7a..3d0eabfd5 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -378,8 +378,7 @@ int chrif_connectack(int fd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_sendmapack(int fd)
{
RFIFOHEAD(fd);
@@ -403,8 +402,7 @@ int chrif_sendmapack(int fd)
/*==========================================
* Request sc_data from charserver [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_scdata_request(int account_id, int char_id)
{
#ifdef ENABLE_SC_SAVING
@@ -421,8 +419,7 @@ int chrif_scdata_request(int account_id, int char_id)
/*==========================================
* new auth system [Kevin]
- *------------------------------------------
- */
+ *------------------------------------------*/
void chrif_authreq(struct map_session_data *sd)
{
struct auth_node *auth_data;
@@ -454,7 +451,8 @@ void chrif_authreq(struct map_session_data *sd)
}
//character selected, insert into auth db
-void chrif_authok(int fd) {
+void chrif_authok(int fd)
+{
struct auth_node *auth_data;
TBL_PC* sd;
RFIFOHEAD(fd);
@@ -520,15 +518,15 @@ int auth_db_cleanup_sub(DBKey key,void *data,va_list ap)
return 0;
}
-int auth_db_cleanup(int tid, unsigned int tick, int id, int data) {
+int auth_db_cleanup(int tid, unsigned int tick, int id, int data)
+{
auth_db->foreach(auth_db, auth_db_cleanup_sub);
return 0;
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip)
{
nullpo_retr(-1, sd);
@@ -550,8 +548,7 @@ int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip)
/*==========================================
* キャラ名問い合わせ
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_searchcharid(int char_id)
{
if( !char_id )
@@ -568,8 +565,7 @@ int chrif_searchcharid(int char_id)
/*==========================================
* GMに変化要求
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_changegm(int id, const char *pass, int len)
{
if (battle_config.etc_log)
@@ -589,8 +585,7 @@ int chrif_changegm(int id, const char *pass, int len)
/*==========================================
* Change Email
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_changeemail(int id, const char *actual_email, const char *new_email)
{
if (battle_config.etc_log)
@@ -617,8 +612,7 @@ int chrif_changeemail(int id, const char *actual_email, const char *new_email)
* 3: unblock
* 4: unban
* 5: changesex
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_char_ask_name(int id, char * character_name, short operation_type, int year, int month, int day, int hour, int minute, int second)
{
chrif_check(-1);
@@ -644,9 +638,9 @@ int chrif_char_ask_name(int id, char * character_name, short operation_type, int
/*==========================================
* 性別変化要求
- *------------------------------------------
- */
-int chrif_changesex(int id, int sex) {
+ *------------------------------------------*/
+int chrif_changesex(int id, int sex)
+{
chrif_check(-1);
WFIFOHEAD(char_fd, 9);
@@ -672,8 +666,7 @@ int chrif_changesex(int id, int sex) {
* 1: player not found
* 2: gm level too low
* 3: login-server offline
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_char_ask_name_answer(int fd)
{
int acc;
@@ -776,8 +769,7 @@ int chrif_char_ask_name_answer(int fd)
/*==========================================
* End of GM change (@GM) (modified by Yor)
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_changedgm(int fd)
{
int acc, level;
@@ -803,8 +795,7 @@ int chrif_changedgm(int fd)
/*==========================================
* 性別変化終了 (modified by Yor)
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_changedsex(int fd)
{
int acc, sex, i;
@@ -875,8 +866,7 @@ int chrif_changedsex(int fd)
/*==========================================
* 離婚情報同期要求
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_divorce(int char_id, int partner_id)
{
struct map_session_data *sd = NULL;
@@ -901,8 +891,7 @@ int chrif_divorce(int char_id, int partner_id)
/*==========================================
* Disconnection of a player (account has been deleted in login-server) by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_accountdeletion(int fd)
{
int acc;
@@ -929,8 +918,7 @@ int chrif_accountdeletion(int fd)
/*==========================================
* Disconnection of a player (account has been banned of has a status, from login-server) by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_accountban(int fd)
{
int acc;
@@ -1047,8 +1035,7 @@ int chrif_disconnectplayer(int fd)
/*==========================================
* Request to reload GM accounts and their levels: send to char-server by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_reloadGMdb(void)
{
chrif_check(-1);
@@ -1062,8 +1049,7 @@ int chrif_reloadGMdb(void)
/*==========================================
* Receiving GM accounts and their levels from char-server by [Yor]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_recvgmaccounts(int fd)
{
ShowInfo("From login-server: receiving information of '"CL_WHITE"%d"CL_RESET"' GM accounts.\n", pc_read_gm_account(fd));
@@ -1072,8 +1058,7 @@ int chrif_recvgmaccounts(int fd)
/*==========================================
* Request/Receive top 10 Fame character list
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_updatefamelist(struct map_session_data *sd)
{
@@ -1261,8 +1246,7 @@ int chrif_load_scdata(int fd)
/*==========================================
* Send rates and motd to char server [Wizputer]
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
{
char buf[256];
@@ -1301,9 +1285,7 @@ int chrif_load_scdata(int fd)
/*=========================================
* Tell char-server charcter disconnected [Wizputer]
- *-----------------------------------------
- */
-
+ *-----------------------------------------*/
int chrif_char_offline(struct map_session_data *sd)
{
chrif_check(-1);
@@ -1319,9 +1301,9 @@ int chrif_char_offline(struct map_session_data *sd)
/*=========================================
* Tell char-server to reset all chars offline [Wizputer]
- *-----------------------------------------
- */
-int chrif_flush_fifo(void) {
+ *-----------------------------------------*/
+int chrif_flush_fifo(void)
+{
chrif_check(-1);
set_nonblocking(char_fd, 0);
@@ -1333,9 +1315,9 @@ int chrif_flush_fifo(void) {
/*=========================================
* Tell char-server to reset all chars offline [Wizputer]
- *-----------------------------------------
- */
-int chrif_char_reset_offline(void) {
+ *-----------------------------------------*/
+int chrif_char_reset_offline(void)
+{
chrif_check(-1);
WFIFOHEAD(char_fd, 2);
@@ -1347,8 +1329,7 @@ int chrif_char_reset_offline(void) {
/*=========================================
* Tell char-server charcter is online [Wizputer]
- *-----------------------------------------
- */
+ *-----------------------------------------*/
int chrif_char_online(struct map_session_data *sd)
{
@@ -1363,7 +1344,8 @@ int chrif_char_online(struct map_session_data *sd)
return 0;
}
-int chrif_disconnect(int fd) {
+int chrif_disconnect(int fd)
+{
if(fd == char_fd) {
char_fd = 0;
ShowWarning("Map Server disconnected from Char Server.\n\n");
@@ -1395,8 +1377,7 @@ void chrif_update_ip(int fd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int chrif_parse(int fd)
{
int packet_len, cmd;
@@ -1475,7 +1456,8 @@ int chrif_parse(int fd)
return 0;
}
-int send_usercount_tochar(int tid, unsigned int tick, int id, int data) {
+int send_usercount_tochar(int tid, unsigned int tick, int id, int data)
+{
int count;
static int last_count = 0;
@@ -1497,9 +1479,9 @@ int send_usercount_tochar(int tid, unsigned int tick, int id, int data) {
/*==========================================
* timer関数
* 今このmap鯖に繋がっているクライアント人数をchar鯖へ送る
- *------------------------------------------
- */
-int send_users_tochar(int tid, unsigned int tick, int id, int data) {
+ *------------------------------------------*/
+int send_users_tochar(int tid, unsigned int tick, int id, int data)
+{
int count, users=0, i;
struct map_session_data **all_sd;
@@ -1523,9 +1505,9 @@ int send_users_tochar(int tid, unsigned int tick, int id, int data) {
/*==========================================
* timer関数
* char鯖との接続を確認し、もし切れていたら再度接続する
- *------------------------------------------
- */
-int check_connect_char_server(int tid, unsigned int tick, int id, int data) {
+ *------------------------------------------*/
+int check_connect_char_server(int tid, unsigned int tick, int id, int data)
+{
static int displayed = 0;
if (char_fd <= 0 || session[char_fd] == NULL) {
if (!displayed) {
@@ -1567,7 +1549,8 @@ int check_connect_char_server(int tid, unsigned int tick, int id, int data) {
return 0;
}
-int auth_db_final(DBKey k,void *d,va_list ap) {
+int auth_db_final(DBKey k,void *d,va_list ap)
+{
struct auth_node *node=(struct auth_node*)d;
if (node->char_dat)
aFree(node->char_dat);
@@ -1576,8 +1559,7 @@ int auth_db_final(DBKey k,void *d,va_list ap) {
/*==========================================
* 終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_final_chrif(void)
{
if (char_fd > 0)
@@ -1588,8 +1570,7 @@ int do_final_chrif(void)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_chrif(void)
{
add_timer_func_list(check_connect_char_server, "check_connect_char_server");
diff --git a/src/map/clif.c b/src/map/clif.c
index f4dfb0522..9c3345895 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -110,8 +110,7 @@ static void clif_hpmeter_single(int fd, struct map_session_data *sd);
/*==========================================
* map鯖のip設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_setip(const char* ip)
{
char ip_str[16];
@@ -139,8 +138,7 @@ void clif_setbindip(const char* ip)
/*==========================================
* map鯖のport設定
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_setport(uint16 port)
{
map_port = port;
@@ -148,8 +146,7 @@ void clif_setport(uint16 port)
/*==========================================
* map鯖のip読み出し
- *------------------------------------------
- */
+ *------------------------------------------*/
uint32 clif_getip(void)
{
return map_ip;
@@ -171,8 +168,7 @@ uint32 clif_refresh_ip(void)
/*==========================================
* map鯖のport読み出し
- *------------------------------------------
- */
+ *------------------------------------------*/
uint16 clif_getport(void)
{
return map_port;
@@ -180,8 +176,7 @@ uint16 clif_getport(void)
/*==========================================
* Counts connected players.
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_countusers(void)
{
int users = 0, i;
@@ -198,9 +193,7 @@ int clif_countusers(void)
/*==========================================
* 全てのclientに対してfunc()実行
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...) //recoded by sasuke, bug when player count gets higher [Kevin]
{
int i;
@@ -223,8 +216,7 @@ int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...) //rec
/*==========================================
* clif_sendでAREA*指定時用
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_send_sub(struct block_list *bl, va_list ap)
{
struct block_list *src_bl;
@@ -284,9 +276,9 @@ int clif_send_sub(struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
-int clif_send (const unsigned char *buf, int len, struct block_list *bl, int type) {
+ *------------------------------------------*/
+int clif_send (const unsigned char *buf, int len, struct block_list *bl, int type)
+{
int i;
struct map_session_data *sd = NULL;
struct party_data *p = NULL;
@@ -459,7 +451,7 @@ int clif_send (const unsigned char *buf, int len, struct block_list *bl, int typ
}
break;
-// New definitions for guilds [Valaris] - Cleaned up and reorganized by [Skotlex]
+ // New definitions for guilds [Valaris] - Cleaned up and reorganized by [Skotlex]
case GUILD_AREA:
case GUILD_AREA_WOS:
x0 = bl->x - AREA_SIZE;
@@ -512,7 +504,6 @@ int clif_send (const unsigned char *buf, int len, struct block_list *bl, int typ
}
}
break;
-/* End [Valaris] */
default:
if (battle_config.error_log)
@@ -528,9 +519,9 @@ int clif_send (const unsigned char *buf, int len, struct block_list *bl, int typ
//
/*==========================================
*
- *------------------------------------------
- */
-int clif_authok(struct map_session_data *sd) {
+ *------------------------------------------*/
+int clif_authok(struct map_session_data *sd)
+{
int fd;
if (!sd->fd)
@@ -562,7 +553,8 @@ int clif_authok(struct map_session_data *sd) {
* 15 - disconnected by a GM -> if( servicetype == taiwan ) MsgStringTable[579]
* other - disconnected -> MsgStringTable[3]
*/
-int clif_authfail_fd(int fd, int type) {
+int clif_authfail_fd(int fd, int type)
+{
if (!fd || !session[fd] || session[fd]->func_parse != clif_parse) //clif_authfail should only be invoked on players!
return 0;
@@ -576,8 +568,7 @@ int clif_authfail_fd(int fd, int type) {
/*==========================================
* Used to know which is the max valid account/char id [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_updatemaxid(int account_id, int char_id)
{
max_account_id = account_id;
@@ -586,9 +577,9 @@ void clif_updatemaxid(int account_id, int char_id)
/*==========================================
*
- *------------------------------------------
- */
-int clif_charselectok(int id) {
+ *------------------------------------------*/
+int clif_charselectok(int id)
+{
struct map_session_data *sd;
int fd;
@@ -609,9 +600,9 @@ int clif_charselectok(int id) {
/*==========================================
*
- *------------------------------------------
- */
-static int clif_set009e(struct flooritem_data *fitem,unsigned char *buf) {
+ *------------------------------------------*/
+static int clif_set009e(struct flooritem_data *fitem,unsigned char *buf)
+{
int view;
nullpo_retr(0, fitem);
@@ -635,9 +626,9 @@ static int clif_set009e(struct flooritem_data *fitem,unsigned char *buf) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_dropflooritem(struct flooritem_data *fitem) {
+ *------------------------------------------*/
+int clif_dropflooritem(struct flooritem_data *fitem)
+{
unsigned char buf[64];
nullpo_retr(0, fitem);
@@ -652,9 +643,9 @@ int clif_dropflooritem(struct flooritem_data *fitem) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_clearflooritem(struct flooritem_data *fitem, int fd) {
+ *------------------------------------------*/
+int clif_clearflooritem(struct flooritem_data *fitem, int fd)
+{
unsigned char buf[16];
nullpo_retr(0, fitem);
@@ -675,9 +666,9 @@ int clif_clearflooritem(struct flooritem_data *fitem, int fd) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_clearchar(struct block_list *bl, int type) {
+ *------------------------------------------*/
+int clif_clearchar(struct block_list *bl, int type)
+{
unsigned char buf[16];
nullpo_retr(0, bl);
@@ -695,7 +686,8 @@ int clif_clearchar(struct block_list *bl, int type) {
return 0;
}
-static int clif_clearchar_delay_sub(int tid, unsigned int tick, int id, int data) {
+static int clif_clearchar_delay_sub(int tid, unsigned int tick, int id, int data)
+{
struct block_list *bl = (struct block_list *)id;
clif_clearchar(bl,data);
@@ -703,7 +695,8 @@ static int clif_clearchar_delay_sub(int tid, unsigned int tick, int id, int data
return 0;
}
-int clif_clearchar_delay(unsigned int tick, struct block_list *bl, int type) {
+int clif_clearchar_delay(unsigned int tick, struct block_list *bl, int type)
+{
struct block_list *tbl;
tbl = aMalloc(sizeof (struct block_list));
memcpy (tbl, bl, sizeof (struct block_list));
@@ -714,10 +707,9 @@ int clif_clearchar_delay(unsigned int tick, struct block_list *bl, int type) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_clearchar_id(int id, int type, int fd) {
-
+ *------------------------------------------*/
+int clif_clearchar_id(int id, int type, int fd)
+{
WFIFOHEAD(fd, packet_len(0x80));
WFIFOW(fd,0) = 0x80;
WFIFOL(fd,2) = id;
@@ -798,9 +790,9 @@ static void clif_get_guild_data(struct block_list *bl, long *guild_id, short *em
}
/*==========================================
*
- *------------------------------------------
- */
-static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned char *buf) {
+ *------------------------------------------*/
+static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned char *buf)
+{
struct status_change *sc;
struct map_session_data *sd;
long guild_id=0;
@@ -962,9 +954,9 @@ static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned ch
/*==========================================
*
- *------------------------------------------
- */
-static int clif_set007b(struct block_list *bl, struct view_data *vd, struct unit_data *ud, unsigned char *buf) {
+ *------------------------------------------*/
+static int clif_set007b(struct block_list *bl, struct view_data *vd, struct unit_data *ud, unsigned char *buf)
+{
struct status_change *sc;
struct map_session_data *sd;
long guild_id=0;
@@ -1143,8 +1135,8 @@ static int clif_set007b(struct block_list *bl, struct view_data *vd, struct unit
//Flag = 1: change id to positive, class and option to make your own char invisible.
//Luckily, the offsets that need to be changed are the same in packets 0x78, 0x7b, 0x1d8 and 0x1da
//But no longer holds true for those packet of PACKETVER 7.
-static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int len, int flag) {
-
+static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int len, int flag)
+{
if (flag) {
#if PACKETVER > 6
switch (WBUFW(buf,0)) {
@@ -1171,8 +1163,7 @@ static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int
/*==========================================
* クラスチェンジ typeはMobの場合は1で他は0?
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_class_change(struct block_list *bl,int class_,int type)
{
unsigned char buf[16];
@@ -1191,8 +1182,7 @@ int clif_class_change(struct block_list *bl,int class_,int type)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static void clif_spiritball_single(int fd, struct map_session_data *sd)
{
WFIFOHEAD(fd, packet_len(0x1e1));
@@ -1204,9 +1194,9 @@ static void clif_spiritball_single(int fd, struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
-static int clif_set0192(int fd, int m, int x, int y, int type) {
+ *------------------------------------------*/
+static int clif_set0192(int fd, int m, int x, int y, int type)
+{
char map_name[MAP_NAME_LENGTH_EXT];
sprintf(map_name, "%s.gat", map[m].name);
@@ -1223,7 +1213,8 @@ static int clif_set0192(int fd, int m, int x, int y, int type) {
}
// new and improved weather display [Valaris]
-static void clif_weather_sub(int fd, int id, int type) {
+static void clif_weather_sub(int fd, int id, int type)
+{
WFIFOHEAD(fd, packet_len(0x1f3));
WFIFOW(fd,0) = 0x1f3;
WFIFOL(fd,2) = id;
@@ -1233,9 +1224,9 @@ static void clif_weather_sub(int fd, int id, int type) {
/*==========================================
*
- *------------------------------------------
- */
-static void clif_weather_check(struct map_session_data *sd) {
+ *------------------------------------------*/
+static void clif_weather_check(struct map_session_data *sd)
+{
int m = sd->bl.m, fd = sd->fd;
if (map[m].flag.snow
@@ -1269,7 +1260,8 @@ static void clif_weather_check(struct map_session_data *sd) {
}
}
-int clif_weather(int m) {
+int clif_weather(int m)
+{
int i;
struct map_session_data *sd=NULL;
@@ -1427,7 +1419,8 @@ int clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
return 0;
}
-void clif_send_homdata(struct map_session_data *sd, int type, int param) { //[orn]
+void clif_send_homdata(struct map_session_data *sd, int type, int param)
+{ //[orn]
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x230));
nullpo_retv(sd->hd);
@@ -1440,7 +1433,8 @@ void clif_send_homdata(struct map_session_data *sd, int type, int param) { //[or
return;
}
-int clif_homskillinfoblock(struct map_session_data *sd) { //[orn]
+int clif_homskillinfoblock(struct map_session_data *sd)
+{ //[orn]
struct homun_data *hd;
int fd = sd->fd;
int i,j,len=4,id;
@@ -1471,7 +1465,8 @@ int clif_homskillinfoblock(struct map_session_data *sd) { //[orn]
return 0;
}
-void clif_homskillup(struct map_session_data *sd, int skill_num) { //[orn]
+void clif_homskillup(struct map_session_data *sd, int skill_num)
+{ //[orn]
struct homun_data *hd;
int fd=sd->fd, skillid;
WFIFOHEAD(fd, packet_len(0x239));
@@ -1505,8 +1500,7 @@ int clif_hom_food(struct map_session_data *sd,int foodid,int fail) //[orn]
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_walkok(struct map_session_data *sd)
{
int fd=sd->fd;
@@ -1519,7 +1513,8 @@ int clif_walkok(struct map_session_data *sd)
return 0;
}
-static void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) {
+static void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud)
+{
unsigned char buf[256];
int len;
@@ -1586,9 +1581,9 @@ void clif_move(struct unit_data *ud)
/*==========================================
* Delays the map_quit of a player after they are disconnected. [Skotlex]
- *------------------------------------------
- */
-static int clif_delayquit(int tid, unsigned int tick, int id, int data) {
+ *------------------------------------------*/
+static int clif_delayquit(int tid, unsigned int tick, int id, int data)
+{
struct map_session_data *sd = NULL;
//Remove player from map server
@@ -1599,8 +1594,7 @@ static int clif_delayquit(int tid, unsigned int tick, int id, int data) {
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_quitsave(int fd,struct map_session_data *sd)
{
if (sd->state.waitingdisconnect || //Was already waiting to be disconnected.
@@ -1618,9 +1612,9 @@ void clif_quitsave(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
-static int clif_waitclose(int tid, unsigned int tick, int id, int data) {
+ *------------------------------------------*/
+static int clif_waitclose(int tid, unsigned int tick, int id, int data)
+{
if (session[id] && session[id]->func_parse == clif_parse) //Avoid disconnecting non-players, as pointed out by End of Exam [Skotlex]
set_eof(id);
@@ -1629,9 +1623,9 @@ static int clif_waitclose(int tid, unsigned int tick, int id, int data) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_setwaitclose(int fd) {
+ *------------------------------------------*/
+void clif_setwaitclose(int fd)
+{
struct map_session_data *sd;
// if player is not already in the game (double connection probably)
@@ -1644,9 +1638,9 @@ void clif_setwaitclose(int fd) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_changemap(struct map_session_data *sd, short map, int x, int y) {
+ *------------------------------------------*/
+int clif_changemap(struct map_session_data *sd, short map, int x, int y)
+{
int fd;
char map_name[MAP_NAME_LENGTH_EXT];
@@ -1690,16 +1684,17 @@ int clif_changemapserver(struct map_session_data* sd, const char* mapname, int x
return 0;
}
-int clif_blown(struct block_list *bl) {
+int clif_blown(struct block_list *bl)
+{
//Aegis packets says fixpos, but it's unsure whether slide works better or not.
// return clif_fixpos(bl);
return clif_slide(bl, bl->x, bl->y);
}
/*==========================================
*
- *------------------------------------------
- */
-int clif_fixpos(struct block_list *bl) {
+ *------------------------------------------*/
+int clif_fixpos(struct block_list *bl)
+{
unsigned char buf[16];
nullpo_retr(0, bl);
@@ -1718,9 +1713,9 @@ int clif_fixpos(struct block_list *bl) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_npcbuysell(struct map_session_data* sd, int id) {
+ *------------------------------------------*/
+int clif_npcbuysell(struct map_session_data* sd, int id)
+{
int fd;
nullpo_retr(0, sd);
@@ -1736,9 +1731,9 @@ int clif_npcbuysell(struct map_session_data* sd, int id) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
+ *------------------------------------------*/
+int clif_buylist(struct map_session_data *sd, struct npc_data *nd)
+{
struct item_data *id;
int fd,i,val;
@@ -1769,9 +1764,9 @@ int clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_selllist(struct map_session_data *sd) {
+ *------------------------------------------*/
+int clif_selllist(struct map_session_data *sd)
+{
int fd,i,c=0,val;
nullpo_retr(0, sd);
@@ -1803,9 +1798,9 @@ int clif_selllist(struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) {
+ *------------------------------------------*/
+int clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
+{
int fd = sd->fd;
int slen = strlen(mes) + 9;
WFIFOHEAD(fd, slen);
@@ -1820,9 +1815,9 @@ int clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptnext(struct map_session_data *sd,int npcid) {
+ *------------------------------------------*/
+int clif_scriptnext(struct map_session_data *sd,int npcid)
+{
int fd;
nullpo_retr(0, sd);
@@ -1838,9 +1833,9 @@ int clif_scriptnext(struct map_session_data *sd,int npcid) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptclose(struct map_session_data *sd, int npcid) {
+ *------------------------------------------*/
+int clif_scriptclose(struct map_session_data *sd, int npcid)
+{
int fd;
nullpo_retr(0, sd);
@@ -1856,9 +1851,9 @@ int clif_scriptclose(struct map_session_data *sd, int npcid) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
+ *------------------------------------------*/
+void clif_sendfakenpc(struct map_session_data *sd, int npcid)
+{
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x78));
sd->state.using_fake_npc = 1;
@@ -1875,9 +1870,9 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) {
+ *------------------------------------------*/
+int clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes)
+{
int fd = sd->fd;
int slen = strlen(mes) + 8;
struct block_list *bl = NULL;
@@ -1899,9 +1894,9 @@ int clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptinput(struct map_session_data *sd, int npcid) {
+ *------------------------------------------*/
+int clif_scriptinput(struct map_session_data *sd, int npcid)
+{
int fd;
struct block_list *bl = NULL;
@@ -1923,9 +1918,9 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) {
/*==========================================
*
- *------------------------------------------
- */
-int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
+ *------------------------------------------*/
+int clif_scriptinputstr(struct map_session_data *sd, int npcid)
+{
int fd;
struct block_list *bl = NULL;
@@ -1948,7 +1943,8 @@ int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
/// npc_id is ignored in the client
/// type=2 : Remove viewpoint
/// type=other : Show viewpoint
-int clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color) {
+int clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color)
+{
int fd;
nullpo_retr(0, sd);
@@ -1969,9 +1965,9 @@ int clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int
/*==========================================
*
- *------------------------------------------
- */
-int clif_cutin(struct map_session_data* sd, const char* image, int type) {
+ *------------------------------------------*/
+int clif_cutin(struct map_session_data* sd, const char* image, int type)
+{
int fd;
nullpo_retr(0, sd);
@@ -1988,8 +1984,7 @@ int clif_cutin(struct map_session_data* sd, const char* image, int type) {
/*==========================================
* Fills in card data from the given item and into the buffer. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static void clif_addcards(unsigned char* buf, struct item* item)
{
int i=0,j;
@@ -2042,9 +2037,9 @@ static void clif_addcards(unsigned char* buf, struct item* item)
/*==========================================
*
- *------------------------------------------
- */
-int clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
+ *------------------------------------------*/
+int clif_additem(struct map_session_data *sd, int n, int amount, int fail)
+{
int fd;
unsigned char *buf;
@@ -2097,8 +2092,7 @@ int clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_delitem(struct map_session_data *sd,int n,int amount)
{
int fd;
@@ -2402,9 +2396,7 @@ int clif_guild_xy(struct map_session_data *sd)
/*==========================================
* Sends x/y dot to a single fd. [Skotlex]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int clif_guild_xy_single(int fd, struct map_session_data *sd)
{
WFIFOHEAD(fd,packet_len(0x1eb));
@@ -2435,8 +2427,7 @@ int clif_guild_xy_remove(struct map_session_data *sd)
/*==========================================
* ステータスを送りつける
* 表示専用数字はこの中で計算して送る
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_updatestatus(struct map_session_data *sd,int type)
{
int fd,len=8;
@@ -2678,8 +2669,7 @@ int clif_changestatus(struct block_list *bl,int type,int val)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_changelook(struct block_list *bl,int type,int val)
{
unsigned char buf[32];
@@ -2829,8 +2819,7 @@ void clif_refreshlook(struct block_list *bl,int id,int type,int val,int area)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_initialstatus(struct map_session_data *sd)
{
int fd;
@@ -2892,8 +2881,7 @@ int clif_initialstatus(struct map_session_data *sd)
/*==========================================
*矢装備
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_arrowequip(struct map_session_data *sd,int val)
{
int fd;
@@ -2937,8 +2925,7 @@ int clif_arrow_fail(struct map_session_data *sd,int type)
/*==========================================
* 作成可能 矢リスト送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_arrow_create_list(struct map_session_data *sd)
{
int i, c, j;
@@ -2974,8 +2961,7 @@ int clif_arrow_create_list(struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
{
int fd;
@@ -2995,8 +2981,7 @@ int clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_equipitemack(struct map_session_data *sd,int n,int pos,int ok)
{
int fd;
@@ -3016,8 +3001,7 @@ int clif_equipitemack(struct map_session_data *sd,int n,int pos,int ok)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
{
int fd;
@@ -3037,8 +3021,7 @@ int clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_misceffect(struct block_list* bl,int type)
{
unsigned char buf[32];
@@ -3053,7 +3036,8 @@ int clif_misceffect(struct block_list* bl,int type)
return 0;
}
-int clif_misceffect2(struct block_list *bl, int type) {
+int clif_misceffect2(struct block_list *bl, int type)
+{
unsigned char buf[24];
nullpo_retr(0, bl);
@@ -3071,8 +3055,7 @@ int clif_misceffect2(struct block_list *bl, int type) {
}
/*==========================================
* 表示オプション変更
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_changeoption(struct block_list* bl)
{
unsigned char buf[32];
@@ -3146,8 +3129,7 @@ int clif_changeoption2(struct block_list* bl)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_useitemack(struct map_session_data *sd,int index,int amount,int ok)
{
nullpo_retr(0, sd);
@@ -3191,8 +3173,7 @@ int clif_useitemack(struct map_session_data *sd,int index,int amount,int ok)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_createchat(struct map_session_data *sd,int fail)
{
int fd;
@@ -3210,8 +3191,7 @@ int clif_createchat(struct map_session_data *sd,int fail)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_dispchat(struct chat_data *cd,int fd)
{
unsigned char buf[128]; // 最大title(60バイト)+17
@@ -3241,8 +3221,7 @@ int clif_dispchat(struct chat_data *cd,int fd)
/*==========================================
* chatの状態変更成功
* 外部の人用と命令コード(d7->df)が違うだけ
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_changechatstatus(struct chat_data *cd)
{
unsigned char buf[128]; // 最大title(60バイト)+17
@@ -3265,8 +3244,7 @@ int clif_changechatstatus(struct chat_data *cd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_clearchat(struct chat_data *cd,int fd)
{
unsigned char buf[32];
@@ -3288,8 +3266,7 @@ int clif_clearchat(struct chat_data *cd,int fd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_joinchatfail(struct map_session_data *sd,int fail)
{
int fd;
@@ -3308,8 +3285,7 @@ int clif_joinchatfail(struct map_session_data *sd,int fail)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
{
int fd;
@@ -3336,8 +3312,7 @@ int clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
{
unsigned char buf[32];
@@ -3355,8 +3330,7 @@ int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_changechatowner(struct chat_data* cd,struct map_session_data *sd)
{
unsigned char buf[64];
@@ -3378,8 +3352,7 @@ int clif_changechatowner(struct chat_data* cd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_leavechat(struct chat_data* cd,struct map_session_data *sd)
{
unsigned char buf[32];
@@ -3399,8 +3372,7 @@ int clif_leavechat(struct chat_data* cd,struct map_session_data *sd)
/*==========================================
* 取り引き要請受け
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_traderequest(struct map_session_data* sd, const char* name)
{
int fd;
@@ -3421,8 +3393,7 @@ int clif_traderequest(struct map_session_data* sd, const char* name)
/*==========================================
* 取り引き要求応答
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradestart(struct map_session_data *sd,int type)
{
int fd;
@@ -3440,8 +3411,7 @@ int clif_tradestart(struct map_session_data *sd,int type)
/*==========================================
* 相手方からのアイテム追加
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradeadditem(struct map_session_data *sd,struct map_session_data *tsd,int index,int amount)
{
int fd;
@@ -3481,8 +3451,7 @@ int clif_tradeadditem(struct map_session_data *sd,struct map_session_data *tsd,i
/*==========================================
* アイテム追加成功/失敗
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradeitemok(struct map_session_data *sd,int index,int fail)
{
int fd;
@@ -3501,8 +3470,7 @@ int clif_tradeitemok(struct map_session_data *sd,int index,int fail)
/*==========================================
* 取り引きok押し
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradedeal_lock(struct map_session_data *sd,int fail)
{
int fd;
@@ -3520,8 +3488,7 @@ int clif_tradedeal_lock(struct map_session_data *sd,int fail)
/*==========================================
* 取り引きがキャンセルされました
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradecancelled(struct map_session_data *sd)
{
int fd;
@@ -3538,8 +3505,7 @@ int clif_tradecancelled(struct map_session_data *sd)
/*==========================================
* 取り引き完了
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_tradecompleted(struct map_session_data *sd,int fail)
{
int fd;
@@ -3557,8 +3523,7 @@ int clif_tradecompleted(struct map_session_data *sd,int fail)
/*==========================================
* カプラ倉庫のアイテム数を更新
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_updatestorageamount(struct map_session_data *sd,struct storage *stor)
{
int fd;
@@ -3578,8 +3543,7 @@ int clif_updatestorageamount(struct map_session_data *sd,struct storage *stor)
/*==========================================
* カプラ倉庫にアイテムを追加する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int index,int amount)
{
int view,fd;
@@ -3607,8 +3571,7 @@ int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int i
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_updateguildstorageamount(struct map_session_data *sd,struct guild_storage *stor)
{
int fd;
@@ -3628,8 +3591,7 @@ int clif_updateguildstorageamount(struct map_session_data *sd,struct guild_stora
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage *stor,int index,int amount)
{
int view,fd;
@@ -3657,8 +3619,7 @@ int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage
/*==========================================
* カプラ倉庫からアイテムを取り去る
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_storageitemremoved(struct map_session_data *sd,int index,int amount)
{
int fd;
@@ -3677,8 +3638,7 @@ int clif_storageitemremoved(struct map_session_data *sd,int index,int amount)
/*==========================================
* カプラ倉庫を閉じる
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_storageclose(struct map_session_data *sd)
{
int fd;
@@ -3698,8 +3658,7 @@ int clif_storageclose(struct map_session_data *sd)
//
/*==========================================
* PC表示
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* dstsd)
{
int len;
@@ -3800,8 +3759,7 @@ void clif_getareachar_char(struct map_session_data* sd,struct block_list *bl)
/*==========================================
* Older fix pos packet.
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_fixpos2(struct block_list* bl)
{
struct unit_data *ud;
@@ -3834,10 +3792,9 @@ int clif_fixpos2(struct block_list* bl)
/*==========================================
* Estimates walk delay based on the damage criteria. [Skotlex]
- *------------------------------------------
- */
-static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, int div_) {
-
+ *------------------------------------------*/
+static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, int div_)
+{
if (type == 4 || type == 9 || damage <=0)
return 0;
@@ -3856,8 +3813,7 @@ static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int da
/*==========================================
* 通常攻撃エフェクト&ダメージ
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int type,int damage2)
{
unsigned char buf[256];
@@ -3922,8 +3878,7 @@ int clif_damage(struct block_list *src,struct block_list *dst,unsigned int tick,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fitem)
{
int view,fd;
@@ -3948,8 +3903,7 @@ void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fi
/*==========================================
* 場所スキルエフェクトが視界に入る
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_getareachar_skillunit(struct map_session_data *sd,struct skill_unit *unit)
{
int fd;
@@ -4041,8 +3995,7 @@ int clif_getareachar_skillunit(struct map_session_data *sd,struct skill_unit *un
/*==========================================
* 場所スキルエフェクトが視界から消える
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_clearchar_skillunit(struct skill_unit *unit,int fd)
{
nullpo_retr(0, unit);
@@ -4060,8 +4013,7 @@ int clif_clearchar_skillunit(struct skill_unit *unit,int fd)
/*==========================================
* Unknown... trap related?
* Only affects units with class [139,153] client-side
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_01ac(struct block_list *bl)
{
unsigned char buf[32];
@@ -4077,8 +4029,7 @@ int clif_01ac(struct block_list *bl)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_getareachar(struct block_list* bl,va_list ap)
{
struct map_session_data *sd;
@@ -4109,8 +4060,7 @@ int clif_01ac(struct block_list *bl)
/*==========================================
* tbl has gone out of view-size of bl
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_outsight(struct block_list *bl,va_list ap)
{
struct block_list *tbl;
@@ -4158,8 +4108,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
/*==========================================
* tbl has come into view of bl
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_insight(struct block_list *bl,va_list ap)
{
struct block_list *tbl;
@@ -4194,8 +4143,7 @@ int clif_insight(struct block_list *bl,va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
{
int fd,id;
@@ -4231,8 +4179,7 @@ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
/*==========================================
* スキルリストを送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skillinfoblock(struct map_session_data *sd)
{
int fd;
@@ -4270,8 +4217,7 @@ int clif_skillinfoblock(struct map_session_data *sd)
/*==========================================
* スキル割り振り通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skillup(struct map_session_data *sd,int skill_num)
{
int fd;
@@ -4293,8 +4239,7 @@ int clif_skillup(struct map_session_data *sd,int skill_num)
/*==========================================
* スキル詠唱エフェクトを送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skillcasting(struct block_list* bl,
int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl, int casttime)
{
@@ -4319,8 +4264,7 @@ int clif_skillcasting(struct block_list* bl,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skillcastcancel(struct block_list* bl)
{
unsigned char buf[16];
@@ -4403,8 +4347,7 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
/*==========================================
* スキル攻撃エフェクト&ダメージ
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_damage(struct block_list *src,struct block_list *dst,
unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type)
{
@@ -4493,8 +4436,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,
/*==========================================
* 吹き飛ばしスキル攻撃エフェクト&ダメージ
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_damage2(struct block_list *src,struct block_list *dst,
unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type)
{
@@ -4552,10 +4494,8 @@ int clif_skill_damage2(struct block_list *src,struct block_list *dst,
/*==========================================
* 支援/回復スキルエフェクト
- *------------------------------------------
- */
-int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
- int skill_id,int heal,int fail)
+ *------------------------------------------*/
+int clif_skill_nodamage(struct block_list *src,struct block_list *dst,int skill_id,int heal,int fail)
{
unsigned char buf[32];
@@ -4586,8 +4526,7 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
/*==========================================
* 場所スキルエフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y,int tick)
{
unsigned char buf[32];
@@ -4612,8 +4551,7 @@ int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y
/*==========================================
* 場所スキルエフェクト表示
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_setunit(struct skill_unit *unit)
{
unsigned char buf[128];
@@ -4704,10 +4642,10 @@ int clif_skill_setunit(struct skill_unit *unit)
return 0;
*/
}
+
/*==========================================
* 場所スキルエフェクト削除
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_delunit(struct skill_unit *unit)
{
unsigned char buf[16];
@@ -4719,10 +4657,10 @@ int clif_skill_delunit(struct skill_unit *unit)
clif_send(buf,packet_len(0x120),&unit->bl,AREA);
return 0;
}
+
/*==========================================
* ワープ場所選択
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_warppoint(struct map_session_data *sd,int skill_num,int skill_lv,
const char *map1,const char *map2,const char *map3,const char *map4)
{
@@ -4748,8 +4686,7 @@ int clif_skill_warppoint(struct map_session_data *sd,int skill_num,int skill_lv,
}
/*==========================================
* メモ応答
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_memo(struct map_session_data *sd,int flag)
{
int fd;
@@ -4780,8 +4717,7 @@ int clif_skill_teleportmessage(struct map_session_data *sd,int flag)
/*==========================================
* モンスター情報
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
{
struct status_data *status;
@@ -4818,8 +4754,7 @@ int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
}
/*==========================================
* アイテム合成可能リスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_skill_produce_mix_list(struct map_session_data *sd, int trigger)
{
int i,c,view,fd;
@@ -4854,8 +4789,7 @@ int clif_skill_produce_mix_list(struct map_session_data *sd, int trigger)
/*==========================================
* Sends a status change packet to the object only, used for loading status changes. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_status_load(struct block_list *bl,int type, int flag)
{
int fd;
@@ -4877,8 +4811,7 @@ int clif_status_load(struct block_list *bl,int type, int flag)
}
/*==========================================
* 状態異常アイコン/メッセージ表示
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_status_change(struct block_list *bl,int type,int flag)
{
unsigned char buf[16];
@@ -4898,8 +4831,7 @@ int clif_status_change(struct block_list *bl,int type,int flag)
/*==========================================
* Send message (modified by [Yor])
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_displaymessage(const int fd, const char* mes)
{
// invalid pointer?
@@ -4925,8 +4857,7 @@ int clif_displaymessage(const int fd, const char* mes)
/*==========================================
* 天の声を送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_GMmessage(struct block_list* bl, const char* mes, int len, int flag)
{
unsigned char *buf;
@@ -4955,8 +4886,7 @@ int clif_GMmessage(struct block_list* bl, const char* mes, int len, int flag)
/*==========================================
* グローバルメッセージ
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_GlobalMessage(struct block_list* bl, const char* message)
{
char buf[100];
@@ -4978,10 +4908,9 @@ void clif_GlobalMessage(struct block_list* bl, const char* message)
/*==========================================
* Send main chat message [LuzZza]
- *------------------------------------------
- */
-void clif_MainChatMessage(const char* message) {
-
+ *------------------------------------------*/
+void clif_MainChatMessage(const char* message)
+{
char buf[200];
int len;
@@ -5002,8 +4931,7 @@ void clif_MainChatMessage(const char* message) {
/*==========================================
* Does an announce message in the given color.
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_announce(struct block_list* bl, const char* mes, int len, unsigned long color, int flag)
{
unsigned char *buf;
@@ -5028,8 +4956,7 @@ int clif_announce(struct block_list* bl, const char* mes, int len, unsigned long
}
/*==========================================
* HPSP回復エフェクトを送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_heal(int fd,int type,int val)
{
WFIFOHEAD(fd,packet_len(0x13d));
@@ -5043,8 +4970,7 @@ int clif_heal(int fd,int type,int val)
/*==========================================
* 復活する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_resurrection(struct block_list *bl,int type)
{
unsigned char buf[16];
@@ -5064,8 +4990,7 @@ int clif_resurrection(struct block_list *bl,int type)
/*==========================================
* PVP実装?(仮)
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_set0199(int fd,int type)
{
WFIFOHEAD(fd,packet_len(0x199));
@@ -5078,8 +5003,7 @@ int clif_set0199(int fd,int type)
/*==========================================
* PVP実装?(仮)
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
{
int fd = sd->fd;
@@ -5113,8 +5037,7 @@ int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_send0199(int map,int type)
{
struct block_list bl;
@@ -5132,8 +5055,7 @@ int clif_send0199(int map,int type)
/*==========================================
* 精錬エフェクトを送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_refine(int fd, int fail, int index, int val)
{
WFIFOHEAD(fd,packet_len(0x188));
@@ -5159,8 +5081,7 @@ void clif_upgrademessage(int fd, int result, int item_id)
/*==========================================
* Wisp/page is transmitted to the destination player
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) // R 0097 <len>.w <nick>.24B <message>.?B
{
// printf("clif_wis_message(%d, %s, %s)\n", fd, nick, mes);
@@ -5175,10 +5096,14 @@ int clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) //
}
/*==========================================
- * The transmission result of Wisp/page is transmitted to the source player
- *------------------------------------------
- */
-int clif_wis_end(int fd, int flag) // R 0098 <type>.B: 0: success to send wisper, 1: target character is not loged in, 2: ignored by target, 3: everyone ignored by target
+ * Inform the player about the result of his whisper action
+ * R 0098 <type>.B
+ * 0: success to send wisper
+ * 1: target character is not loged in
+ * 2: ignored by target
+ * 3: everyone ignored by target
+ *------------------------------------------*/
+int clif_wis_end(int fd, int flag)
{
WFIFOHEAD(fd,packet_len(0x98));
WFIFOW(fd,0) = 0x98;
@@ -5189,8 +5114,7 @@ int clif_wis_end(int fd, int flag) // R 0098 <type>.B: 0: success to send wisper
/*==========================================
* キャラID名前引き結果を送信する
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_solved_charname(struct map_session_data *sd,int char_id)
{
char *p= map_charid2nick(char_id);
@@ -5214,8 +5138,7 @@ int clif_solved_charname(struct map_session_data *sd,int char_id)
/*==========================================
* カードの挿入可能リストを返す
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_use_card(struct map_session_data *sd,int idx)
{
int i,c,ep;
@@ -5268,8 +5191,7 @@ int clif_use_card(struct map_session_data *sd,int idx)
}
/*==========================================
* カードの挿入終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int flag)
{
int fd;
@@ -5288,8 +5210,7 @@ int clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int
/*==========================================
* 鑑定可能アイテムリスト送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_item_identify_list(struct map_session_data *sd)
{
int i,c;
@@ -5318,8 +5239,7 @@ int clif_item_identify_list(struct map_session_data *sd)
/*==========================================
* 鑑定結果
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_item_identified(struct map_session_data *sd,int idx,int flag)
{
int fd;
@@ -5337,8 +5257,7 @@ int clif_item_identified(struct map_session_data *sd,int idx,int flag)
/*==========================================
* 修理可能アイテムリスト送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_item_repair_list(struct map_session_data *sd,struct map_session_data *dstsd)
{
int i,c;
@@ -5393,8 +5312,7 @@ int clif_item_repaireffect(struct map_session_data *sd,int nameid,int flag)
/*==========================================
* Weapon Refining - Taken from jAthena
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_item_refine_list(struct map_session_data *sd)
{
int i,c;
@@ -5439,8 +5357,7 @@ int clif_item_refine_list(struct map_session_data *sd)
/*==========================================
* アイテムによる一時的なスキル効果
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv)
{
int fd;
@@ -5464,8 +5381,7 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv)
/*==========================================
* カートにアイテム追加
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
{
int view,fd;
@@ -5496,8 +5412,7 @@ int clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
/*==========================================
* カートからアイテム削除
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_cart_delitem(struct map_session_data *sd,int n,int amount)
{
int fd;
@@ -5518,8 +5433,7 @@ int clif_cart_delitem(struct map_session_data *sd,int n,int amount)
/*==========================================
* 露店開設
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_openvendingreq(struct map_session_data *sd,int num)
{
int fd;
@@ -5537,8 +5451,7 @@ int clif_openvendingreq(struct map_session_data *sd,int num)
/*==========================================
* 露店看板表示
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_showvendingboard(struct block_list* bl, const char* message, int fd)
{
unsigned char buf[128];
@@ -5560,8 +5473,7 @@ int clif_showvendingboard(struct block_list* bl, const char* message, int fd)
/*==========================================
* 露店看板消去
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_closevendingboard(struct block_list* bl,int fd)
{
unsigned char buf[16];
@@ -5582,8 +5494,7 @@ int clif_closevendingboard(struct block_list* bl,int fd)
}
/*==========================================
* 露店アイテムリスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_vendinglist(struct map_session_data *sd,int id,struct vending *vending)
{
struct item_data *data;
@@ -5630,8 +5541,7 @@ int clif_vendinglist(struct map_session_data *sd,int id,struct vending *vending)
/*==========================================
* 露店アイテム購入失敗
- *------------------------------------------
-*/
+ *------------------------------------------*/
int clif_buyvending(struct map_session_data *sd,int index,int amount,int fail)
{
int fd;
@@ -5651,8 +5561,7 @@ int clif_buyvending(struct map_session_data *sd,int index,int amount,int fail)
/*==========================================
* 露店開設成功
- *------------------------------------------
-*/
+ *------------------------------------------*/
int clif_openvending(struct map_session_data *sd,int id,struct vending *vending)
{
struct item_data *data;
@@ -5695,8 +5604,7 @@ int clif_openvending(struct map_session_data *sd,int id,struct vending *vending)
/*==========================================
* 露店アイテム販売報告
- *------------------------------------------
-*/
+ *------------------------------------------*/
int clif_vendingreport(struct map_session_data *sd,int index,int amount)
{
int fd;
@@ -5714,8 +5622,7 @@ int clif_vendingreport(struct map_session_data *sd,int index,int amount)
}
/*==========================================
* パーティ作成完了
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_created(struct map_session_data *sd,int flag)
{
int fd;
@@ -5804,8 +5711,7 @@ int clif_party_info(struct party_data* p, struct map_session_data *sd)
}
/*==========================================
* パーティ勧誘
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
{
int fd;
@@ -5834,8 +5740,7 @@ int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
* 2 -> party invite was accepted
* 3 -> party is full
* 4 -> char of the same account already joined the party
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_inviteack(struct map_session_data* sd, const char* nick, int flag)
{
int fd;
@@ -5856,8 +5761,7 @@ int clif_party_inviteack(struct map_session_data* sd, const char* nick, int flag
* flag & 0x001=exp変更ミス
* 0x010=item変更ミス
* 0x100=一人にのみ送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_option(struct party_data *p,struct map_session_data *sd,int flag)
{
unsigned char buf[16];
@@ -5883,8 +5787,7 @@ int clif_party_option(struct party_data *p,struct map_session_data *sd,int flag)
}
/*==========================================
* パーティ脱退(脱退前に呼ぶこと)
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_leaved(struct party_data* p, struct map_session_data* sd, int account_id, const char* name, int flag)
{
unsigned char buf[64];
@@ -5914,8 +5817,7 @@ int clif_party_leaved(struct party_data* p, struct map_session_data* sd, int acc
}
/*==========================================
* パーティメッセージ送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_message(struct party_data* p, int account_id, const char* mes, int len)
{
struct map_session_data *sd;
@@ -5937,8 +5839,7 @@ int clif_party_message(struct party_data* p, int account_id, const char* mes, in
}
/*==========================================
* パーティ座標通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_xy(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -5956,9 +5857,7 @@ int clif_party_xy(struct map_session_data *sd)
/*==========================================
* Sends x/y dot to a single fd. [Skotlex]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int clif_party_xy_single(int fd, struct map_session_data *sd)
{
WFIFOHEAD(fd,packet_len(0x107));
@@ -5973,8 +5872,7 @@ int clif_party_xy_single(int fd, struct map_session_data *sd)
/*==========================================
* パーティHP通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_hp(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -5996,8 +5894,7 @@ int clif_party_hp(struct map_session_data *sd)
/*==========================================
* Sends HP bar to a single fd. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static void clif_hpmeter_single(int fd, struct map_session_data *sd)
{
WFIFOHEAD(fd,packet_len(0x106));
@@ -6015,8 +5912,7 @@ static void clif_hpmeter_single(int fd, struct map_session_data *sd)
/*==========================================
* GMへ場所とHP通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_hpmeter(struct map_session_data *sd)
{
struct map_session_data *sd2;
@@ -6061,8 +5957,7 @@ int clif_hpmeter(struct map_session_data *sd)
/*==========================================
* パーティ場所移動(未使用)
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_party_move(struct party *p,struct map_session_data *sd,int online)
{
unsigned char buf[128];
@@ -6087,8 +5982,7 @@ int clif_party_move(struct party *p,struct map_session_data *sd,int online)
}
/*==========================================
* 攻撃するために移動が必要
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
{
int fd;
@@ -6110,8 +6004,7 @@ int clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
}
/*==========================================
* 製造エフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_produceeffect(struct map_session_data *sd,int flag,int nameid)
{
int view,fd;
@@ -6171,8 +6064,7 @@ int clif_pet_rulet(struct map_session_data *sd,int data)
/*==========================================
* pet卵リスト作成
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_sendegg(struct map_session_data *sd)
{
//R 01a6 <len>.w <index>.w*
@@ -6249,8 +6141,7 @@ int clif_send_petstatus(struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_pet_emotion(struct pet_data *pd,int param)
{
unsigned char buf[16];
@@ -6329,8 +6220,7 @@ int clif_pet_food(struct map_session_data *sd,int foodid,int fail)
/*==========================================
* オートスペル リスト送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_autospell(struct map_session_data *sd,int skilllv)
{
int fd;
@@ -6379,8 +6269,7 @@ int clif_autospell(struct map_session_data *sd,int skilllv)
/*==========================================
* ディボーションの青い糸
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_devotion(struct map_session_data *sd)
{
unsigned char buf[56];
@@ -6426,8 +6315,7 @@ int clif_marionette(struct block_list *src, struct block_list *target)
/*==========================================
* 氣球
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_spiritball(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -6443,8 +6331,7 @@ int clif_spiritball(struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_combo_delay(struct block_list *bl,int wait)
{
unsigned char buf[32];
@@ -6460,8 +6347,7 @@ int clif_combo_delay(struct block_list *bl,int wait)
}
/*==========================================
*白刃取り
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_bladestop(struct block_list *src,struct block_list *dst,
int _bool)
{
@@ -6482,8 +6368,7 @@ int clif_bladestop(struct block_list *src,struct block_list *dst,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_changemapcell(int m,int x,int y,int cell_type,int type)
{
struct block_list bl;
@@ -6511,8 +6396,7 @@ int clif_changemapcell(int m,int x,int y,int cell_type,int type)
/*==========================================
* MVPエフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_mvp_effect(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -6526,8 +6410,7 @@ int clif_mvp_effect(struct map_session_data *sd)
}
/*==========================================
* MVPアイテム所得
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_mvp_item(struct map_session_data *sd,int nameid)
{
int view,fd;
@@ -6546,8 +6429,7 @@ int clif_mvp_item(struct map_session_data *sd,int nameid)
}
/*==========================================
* MVP経験値所得
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_mvp_exp(struct map_session_data *sd,unsigned long exp)
{
int fd;
@@ -6564,8 +6446,7 @@ int clif_mvp_exp(struct map_session_data *sd,unsigned long exp)
/*==========================================
* ギルド作成可否通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_created(struct map_session_data *sd,int flag)
{
int fd;
@@ -6581,8 +6462,7 @@ int clif_guild_created(struct map_session_data *sd,int flag)
}
/*==========================================
* ギルド所属通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_belonginfo(struct map_session_data *sd,struct guild *g)
{
int ps,fd;
@@ -6605,8 +6485,7 @@ int clif_guild_belonginfo(struct map_session_data *sd,struct guild *g)
}
/*==========================================
* ギルドメンバログイン通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
{
unsigned char buf[64];
@@ -6635,8 +6514,8 @@ int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
// At next time the client would always show the message.
// The function sends all the statuses in the single packet
// to economize traffic. [LuzZza]
-int clif_guild_send_onlineinfo(struct map_session_data *sd) {
-
+int clif_guild_send_onlineinfo(struct map_session_data *sd)
+{
struct guild *g;
char buf[14*128];
int i, count=0, p_len;
@@ -6668,8 +6547,7 @@ int clif_guild_send_onlineinfo(struct map_session_data *sd) {
/*==========================================
* ギルドマスター通知(14dへの応答)
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_masterormember(struct map_session_data *sd)
{
int type=0x57,fd;
@@ -6687,8 +6565,7 @@ int clif_guild_masterormember(struct map_session_data *sd)
}
/*==========================================
* Basic Info (Territories [Valaris])
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_basicinfo(struct map_session_data *sd)
{
int fd,i,t=0;
@@ -6734,8 +6611,7 @@ int clif_guild_basicinfo(struct map_session_data *sd)
/*==========================================
* ギルド同盟/敵対情報
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_allianceinfo(struct map_session_data *sd)
{
int fd,i,c;
@@ -6765,8 +6641,7 @@ int clif_guild_allianceinfo(struct map_session_data *sd)
/*==========================================
* ギルドメンバーリスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_memberlist(struct map_session_data *sd)
{
int fd;
@@ -6808,8 +6683,7 @@ int clif_guild_memberlist(struct map_session_data *sd)
}
/*==========================================
* ギルド役職名リスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_positionnamelist(struct map_session_data *sd)
{
int i,fd;
@@ -6833,8 +6707,7 @@ int clif_guild_positionnamelist(struct map_session_data *sd)
}
/*==========================================
* ギルド役職情報リスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_positioninfolist(struct map_session_data *sd)
{
int i,fd;
@@ -6861,8 +6734,7 @@ int clif_guild_positioninfolist(struct map_session_data *sd)
}
/*==========================================
* ギルド役職変更通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_positionchanged(struct guild *g,int idx)
{
struct map_session_data *sd;
@@ -6883,8 +6755,7 @@ int clif_guild_positionchanged(struct guild *g,int idx)
}
/*==========================================
* ギルドメンバ変更通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_memberpositionchanged(struct guild *g,int idx)
{
struct map_session_data *sd;
@@ -6903,8 +6774,7 @@ int clif_guild_memberpositionchanged(struct guild *g,int idx)
}
/*==========================================
* ギルドエンブレム送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_emblem(struct map_session_data *sd,struct guild *g)
{
int fd;
@@ -6927,8 +6797,7 @@ int clif_guild_emblem(struct map_session_data *sd,struct guild *g)
}
/*==========================================
* ギルドスキル送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_skillinfo(struct map_session_data *sd)
{
int fd;
@@ -6967,8 +6836,7 @@ int clif_guild_skillinfo(struct map_session_data *sd)
}
/*==========================================
* ギルド告知送信
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_notice(struct map_session_data *sd,struct guild *g)
{
int fd;
@@ -6995,8 +6863,7 @@ int clif_guild_notice(struct map_session_data *sd,struct guild *g)
/*==========================================
* ギルドメンバ勧誘
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_invite(struct map_session_data *sd,struct guild *g)
{
int fd;
@@ -7014,8 +6881,7 @@ int clif_guild_invite(struct map_session_data *sd,struct guild *g)
}
/*==========================================
* ギルドメンバ勧誘結果
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_inviteack(struct map_session_data *sd,int flag)
{
int fd;
@@ -7031,8 +6897,7 @@ int clif_guild_inviteack(struct map_session_data *sd,int flag)
}
/*==========================================
* ギルドメンバ脱退通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_leave(struct map_session_data *sd,const char *name,const char *mes)
{
unsigned char buf[128];
@@ -7047,8 +6912,7 @@ int clif_guild_leave(struct map_session_data *sd,const char *name,const char *me
}
/*==========================================
* ギルドメンバ追放通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_expulsion(struct map_session_data *sd,const char *name,const char *mes,
int account_id)
{
@@ -7065,8 +6929,7 @@ int clif_guild_expulsion(struct map_session_data *sd,const char *name,const char
}
/*==========================================
* ギルド追放メンバリスト
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_expulsionlist(struct map_session_data *sd)
{
int fd;
@@ -7097,8 +6960,7 @@ int clif_guild_expulsionlist(struct map_session_data *sd)
/*==========================================
* ギルド会話
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
{
struct map_session_data *sd;
@@ -7119,8 +6981,7 @@ int clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
}
/*==========================================
* ギルドスキル割り振り通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_skillup(struct map_session_data *sd,int skill_num,int lv)
{
int fd;
@@ -7140,8 +7001,7 @@ int clif_guild_skillup(struct map_session_data *sd,int skill_num,int lv)
}
/*==========================================
* ギルド同盟要請
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_reqalliance(struct map_session_data *sd,int account_id,const char *name)
{
int fd;
@@ -7164,8 +7024,7 @@ int clif_guild_reqalliance(struct map_session_data *sd,int account_id,const char
* 2: You accepted the offer.
* 3: They have too any alliances
* 4: You have too many alliances.
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_allianceack(struct map_session_data *sd,int flag)
{
int fd;
@@ -7181,8 +7040,7 @@ int clif_guild_allianceack(struct map_session_data *sd,int flag)
}
/*==========================================
* ギルド関係解消通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
{
int fd;
@@ -7201,8 +7059,7 @@ int clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
}
/*==========================================
* ギルド敵対結果
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_oppositionack(struct map_session_data *sd,int flag)
{
int fd;
@@ -7218,8 +7075,7 @@ int clif_guild_oppositionack(struct map_session_data *sd,int flag)
}
/*==========================================
* ギルド関係追加
- *------------------------------------------
- */
+ *------------------------------------------*/
/*int clif_guild_allianceadded(struct guild *g,int idx)
{
unsigned char buf[64];
@@ -7233,8 +7089,7 @@ int clif_guild_oppositionack(struct map_session_data *sd,int flag)
/*==========================================
* ギルド解散通知
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_guild_broken(struct map_session_data *sd,int flag)
{
int fd;
@@ -7251,8 +7106,7 @@ int clif_guild_broken(struct map_session_data *sd,int flag)
/*==========================================
* エモーション
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_emotion(struct block_list *bl,int type)
{
unsigned char buf[8];
@@ -7267,8 +7121,7 @@ void clif_emotion(struct block_list *bl,int type)
/*==========================================
* トーキーボックス
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_talkiebox(struct block_list* bl, const char* talkie)
{
unsigned char buf[86];
@@ -7283,9 +7136,9 @@ void clif_talkiebox(struct block_list* bl, const char* talkie)
/*==========================================
* 結婚エフェクト
- *------------------------------------------
- */
-void clif_wedding_effect(struct block_list *bl) {
+ *------------------------------------------*/
+void clif_wedding_effect(struct block_list *bl)
+{
unsigned char buf[6];
nullpo_retv(bl);
@@ -7322,8 +7175,7 @@ void clif_callpartner(struct map_session_data *sd)
*/
/*==========================================
* Adopt baby [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_adopt_process(struct map_session_data *sd)
{
int fd;
@@ -7336,8 +7188,7 @@ void clif_adopt_process(struct map_session_data *sd)
}
/*==========================================
* Marry [DracoRPG]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_marriage_process(struct map_session_data *sd)
{
int fd;
@@ -7352,8 +7203,7 @@ void clif_marriage_process(struct map_session_data *sd)
/*==========================================
* Notice of divorce
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_divorced(struct map_session_data* sd, const char* name)
{
int fd;
@@ -7368,9 +7218,9 @@ void clif_divorced(struct map_session_data* sd, const char* name)
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_ReqAdopt(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ReqAdopt(int fd, struct map_session_data *sd)
+{
nullpo_retv(sd);
WFIFOHEAD(fd,packet_len(0x1f6));
@@ -7380,9 +7230,9 @@ void clif_parse_ReqAdopt(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_ReqMarriage(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ReqMarriage(int fd, struct map_session_data *sd)
+{
nullpo_retv(sd);
WFIFOHEAD(fd,packet_len(0x1e2));
@@ -7392,8 +7242,7 @@ void clif_parse_ReqMarriage(int fd, struct map_session_data *sd) {
/*==========================================
* 座る
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_sitting(struct map_session_data *sd)
{
unsigned char buf[64];
@@ -7408,8 +7257,7 @@ void clif_sitting(struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len)
{
int fd;
@@ -7426,8 +7274,7 @@ int clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len)
/*==========================================
* Displays a message using the guild-chat colors to the specified targets. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_disp_message(struct block_list* src, const char* mes, int len, int type)
{
unsigned char buf[1024];
@@ -7441,9 +7288,7 @@ void clif_disp_message(struct block_list* src, const char* mes, int len, int typ
/*==========================================
*
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int clif_GM_kickack(struct map_session_data *sd, int id)
{
int fd;
@@ -7499,9 +7344,7 @@ int clif_GM_silence(struct map_session_data *sd, struct map_session_data *tsd, i
/*==========================================
*
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int clif_timedout(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -7514,8 +7357,7 @@ int clif_timedout(struct map_session_data *sd)
/*==========================================
* Wis拒否許可応答
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_wisexin(struct map_session_data *sd,int type,int flag)
{
int fd;
@@ -7533,8 +7375,7 @@ int clif_wisexin(struct map_session_data *sd,int type,int flag)
}
/*==========================================
* Wis全拒否許可応答
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_wisall(struct map_session_data *sd,int type,int flag)
{
int fd;
@@ -7552,8 +7393,7 @@ int clif_wisall(struct map_session_data *sd,int type,int flag)
}
/*==========================================
* サウンドエフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_soundeffect(struct map_session_data *sd,struct block_list *bl,const char *name,int type)
{
int fd;
@@ -7618,7 +7458,8 @@ int clif_specialeffect(struct block_list *bl, int type, int flag)
}
// refresh the client's screen, getting rid of any effects
-int clif_refresh(struct map_session_data *sd) {
+int clif_refresh(struct map_session_data *sd)
+{
nullpo_retr(-1, sd);
clif_changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
clif_inventorylist(sd);
@@ -7853,8 +7694,7 @@ int clif_slide(struct block_list *bl, int x, int y){
/*------------------------------------------
* @me command by lordalfa, rewritten implementation by Skotlex
- *------------------------------------------
-*/
+ *------------------------------------------*/
int clif_disp_overhead(struct map_session_data *sd, const char* mes)
{
unsigned char buf[256]; //This should be more than sufficient, the theorical max is CHAT_SIZE + 8 (pads and extra inserted crap)
@@ -7884,8 +7724,7 @@ int clif_disp_overhead(struct map_session_data *sd, const char* mes)
/*==========================
* Minimap fix [Kevin]
* Remove dot from minimap
- *--------------------------
-*/
+ *--------------------------*/
int clif_party_xy_remove(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -7925,8 +7764,7 @@ void clif_gospel_info(struct map_session_data *sd, int type)
/*==========================================
* Info about Star Glaldiator save map [Komurka]
* type: 1: Information, 0: Map registered
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type)
{
int fd=sd->fd;
@@ -7946,8 +7784,7 @@ void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsig
/*==========================================
* Info about Star Glaldiator hate mob [Komurka]
* type: 1: Register mob, 0: Information.
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type)
{
int fd=sd->fd;
@@ -7967,8 +7804,7 @@ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int cl
/*==========================================
* Info about TaeKwon Do TK_MISSION mob [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress)
{
int fd=sd->fd;
@@ -7983,8 +7819,7 @@ void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char pr
/*==========================================
* Feel/Hate reset (thanks to Rayce) [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_feel_hate_reset(struct map_session_data *sd)
{
int fd=sd->fd;
@@ -8075,8 +7910,7 @@ static int clif_guess_PacketVer(int fd, int get_previous, int *error)
// パケット読み取って色々操作
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_WantToConnection(int fd, TBL_PC* sd)
{
int cmd, account_id, char_id, login_id1, sex;
@@ -8141,8 +7975,7 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
/*==========================================
* 007d クライアント側マップ読み込み完了
* map侵入時に必要なデータを全て送りつける
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
{
if(sd->bl.prev != NULL)
@@ -8368,9 +8201,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_TickSend(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_TickSend(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
sd->client_tick=RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
@@ -8386,9 +8219,9 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
+{
int x, y;
int cmd;
RFIFOHEAD(fd);
@@ -8421,9 +8254,9 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_QuitGame(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_QuitGame(int fd, struct map_session_data *sd)
+{
WFIFOHEAD(fd,packet_len(0x18b));
WFIFOW(fd,0) = 0x18b;
@@ -8442,9 +8275,9 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void check_fake_id(int fd, struct map_session_data *sd, int target_id) {
+ *------------------------------------------*/
+void check_fake_id(int fd, struct map_session_data *sd, int target_id)
+{
// if player asks for the fake player (only bot and modified client can see a hiden player)
/* if (target_id == server_char_id) {
char message_to_gm[strlen(msg_txt(536)) + strlen(msg_txt(540)) + strlen(msg_txt(507)) + strlen(msg_txt(508))];
@@ -8534,9 +8367,9 @@ void check_fake_id(int fd, struct map_session_data *sd, int target_id) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
+{
int account_id;
struct block_list* bl;
struct status_change *sc;
@@ -8717,11 +8550,10 @@ int clif_message(struct block_list *bl, const char* msg)
}
/*==========================================
- *
- *------------------------------------------
- */
-void clif_parse_MapMove(int fd, struct map_session_data *sd) {
-// /m /mapmove (as @rura GM command)
+ * /mm /mapmove (as @rura GM command)
+ *------------------------------------------*/
+void clif_parse_MapMove(int fd, struct map_session_data *sd)
+{
char output[MAP_NAME_LENGTH_EXT+15]; // Max length of a short: ' -6XXXX' -> 7 digits
char message[MAP_NAME_LENGTH_EXT+15+5]; // "/mm "+output
char *map_name;
@@ -8746,9 +8578,9 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_changed_dir(struct block_list *bl, int type) {
+ *------------------------------------------*/
+void clif_changed_dir(struct block_list *bl, int type)
+{
unsigned char buf[64];
WBUFW(buf,0) = 0x9c;
@@ -8768,9 +8600,9 @@ void clif_changed_dir(struct block_list *bl, int type) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_ChangeDir(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
+{
unsigned char headdir, dir;
RFIFOHEAD(fd);
@@ -8784,9 +8616,9 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_Emotion(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_Emotion(int fd, struct map_session_data *sd)
+{
unsigned char buf[64];
RFIFOHEAD(fd);
@@ -8813,9 +8645,9 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_HowManyConnections(int fd, struct map_session_data *sd)
+{
WFIFOHEAD(fd,packet_len(0xc2));
WFIFOW(fd,0) = 0xc2;
WFIFOL(fd,2) = map_getusers();
@@ -8910,9 +8742,9 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
clif_parse_ActionRequest_sub(sd,
RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]),
@@ -8923,9 +8755,9 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_Restart(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_Restart(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
switch(RFIFOB(fd,2)) {
@@ -8956,9 +8788,9 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) {
/*==========================================
* Transmission of a wisp (S 0096 <len>.w <nick>.24B <message>.?B)
- *------------------------------------------
- */
-void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <nick>.24B <message>.?B // rewritten by [Yor]
+ *------------------------------------------*/
+void clif_parse_Wis(int fd, struct map_session_data *sd)
+{
char *command, *msg;
struct map_session_data *dstsd;
int i=0;
@@ -9135,11 +8967,10 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
}
/*==========================================
- *
- *------------------------------------------
- */
-void clif_parse_GMmessage(int fd, struct map_session_data *sd) {
-// /b
+ * /b
+ *------------------------------------------*/
+void clif_parse_GMmessage(int fd, struct map_session_data *sd)
+{
char* mes;
int size, lv;
RFIFOHEAD(fd);
@@ -9162,9 +8993,9 @@ void clif_parse_GMmessage(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_TakeItem(int fd, struct map_session_data *sd)
+{
struct flooritem_data *fitem;
int map_object_id;
RFIFOHEAD(fd);
@@ -9206,9 +9037,9 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_DropItem(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_DropItem(int fd, struct map_session_data *sd)
+{
int item_index, item_amount;
RFIFOHEAD(fd);
@@ -9237,9 +9068,9 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_UseItem(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_UseItem(int fd, struct map_session_data *sd)
+{
int n;
RFIFOHEAD(fd);
@@ -9273,8 +9104,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_EquipItem(int fd,struct map_session_data *sd)
{
int index;
@@ -9321,8 +9151,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
{
int index;
@@ -9345,8 +9174,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
{
struct block_list *bl;
@@ -9379,8 +9207,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9391,8 +9218,7 @@ void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
{
int fail=0,n;
@@ -9416,8 +9242,7 @@ void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
{
int fail=0,n;
@@ -9442,8 +9267,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_CreateChatRoom(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9457,8 +9281,7 @@ void clif_parse_CreateChatRoom(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ChatAddMember(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9467,8 +9290,7 @@ void clif_parse_ChatAddMember(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ChatRoomStatusChange(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9477,8 +9299,7 @@ void clif_parse_ChatRoomStatusChange(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ChangeChatOwner(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9487,8 +9308,7 @@ void clif_parse_ChangeChatOwner(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9497,8 +9317,7 @@ void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ChatLeave(int fd,struct map_session_data *sd)
{
chat_leavechat(sd);
@@ -9520,8 +9339,7 @@ static void clif_noask_sub(struct map_session_data *src, struct map_session_data
/*==========================================
* 取引要請を相手に送る
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeRequest(int fd,struct map_session_data *sd)
{
struct map_session_data *t_sd;
@@ -9546,8 +9364,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd)
/*==========================================
* 取引要請
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeAck(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9556,8 +9373,7 @@ void clif_parse_TradeAck(int fd,struct map_session_data *sd)
/*==========================================
* アイテム追加
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9566,8 +9382,7 @@ void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
/*==========================================
* アイテム追加完了(ok押し)
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeOk(int fd,struct map_session_data *sd)
{
trade_tradeok(sd);
@@ -9575,8 +9390,7 @@ void clif_parse_TradeOk(int fd,struct map_session_data *sd)
/*==========================================
* 取引キャンセル
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
{
trade_tradecancel(sd);
@@ -9584,8 +9398,7 @@ void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
/*==========================================
* 取引許諾(trade押し)
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_TradeCommit(int fd,struct map_session_data *sd)
{
trade_tradecommit(sd);
@@ -9593,8 +9406,7 @@ void clif_parse_TradeCommit(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_StopAttack(int fd,struct map_session_data *sd)
{
pc_stop_attack(sd);
@@ -9602,8 +9414,7 @@ void clif_parse_StopAttack(int fd,struct map_session_data *sd)
/*==========================================
* カートへアイテムを移す
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_PutItemToCart(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9616,8 +9427,7 @@ void clif_parse_PutItemToCart(int fd,struct map_session_data *sd)
}
/*==========================================
* カートからアイテムを出す
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9628,8 +9438,7 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
/*==========================================
* 付属品(鷹,ペコ,カート)をはずす
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
{
//Can only remove Cart/Riding/Falcon.
@@ -9638,8 +9447,7 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
/*==========================================
* チェンジカート
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{
int type;
@@ -9659,8 +9467,7 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
/*==========================================
* ステータスアップ
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_StatusUp(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9669,8 +9476,7 @@ void clif_parse_StatusUp(int fd,struct map_session_data *sd)
/*==========================================
* スキルレベルアップ
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_SkillUp(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9707,9 +9513,9 @@ static void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_sess
/*==========================================
* スキル使用(ID指定)
- *------------------------------------------
- */
-void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
+{
int skillnum, skilllv, tmp, target_id;
unsigned int tick = gettick();
RFIFOHEAD(fd);
@@ -9823,8 +9629,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
/*==========================================
* スキル使用(場所指定)
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilllv, int skillnum, int x, int y, int skillmoreinfo)
{
int lv;
@@ -9887,7 +9692,8 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll
}
-void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) {
+void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (clif_cant_act(sd))
@@ -9904,7 +9710,8 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) {
);
}
-void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
+void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (clif_cant_act(sd))
@@ -9922,8 +9729,7 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
}
/*==========================================
* スキル使用(map指定)
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
{
int skill_num;
@@ -9944,8 +9750,7 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
}
/*==========================================
* メモ要求
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_RequestMemo(int fd,struct map_session_data *sd)
{
if (!pc_isdead(sd))
@@ -9953,8 +9758,7 @@ void clif_parse_RequestMemo(int fd,struct map_session_data *sd)
}
/*==========================================
* アイテム合成
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9973,8 +9777,7 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
}
/*==========================================
* 武器修理
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_RepairItem(int fd, struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -9993,9 +9796,9 @@ void clif_parse_RepairItem(int fd, struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
-void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
+{
int idx;
RFIFOHEAD(fd);
@@ -10014,8 +9817,7 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) {
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
{
uint8 select;
@@ -10033,8 +9835,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10043,8 +9844,7 @@ void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10054,8 +9854,7 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcStringInput(int fd,struct map_session_data *sd)
{
short message_len;
@@ -10078,8 +9877,7 @@ void clif_parse_NpcStringInput(int fd,struct map_session_data *sd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10089,8 +9887,7 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
/*==========================================
* アイテム鑑定
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10101,8 +9898,7 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
}
/*==========================================
* 矢作成
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10119,8 +9915,7 @@ void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
}
/*==========================================
* オートスペル受信
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10131,8 +9926,7 @@ void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
}
/*==========================================
* カード使用
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_UseCard(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10142,8 +9936,7 @@ void clif_parse_UseCard(int fd,struct map_session_data *sd)
}
/*==========================================
* カード挿入装備選択
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_InsertCard(int fd,struct map_session_data *sd)
{
RFIFOHEAD(fd);
@@ -10154,9 +9947,9 @@ void clif_parse_InsertCard(int fd,struct map_session_data *sd)
/*==========================================
* 0193 キャラID名前引き
- *------------------------------------------
- */
-void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_SolveCharName(int fd, struct map_session_data *sd)
+{
int char_id;
RFIFOHEAD(fd);
@@ -10166,9 +9959,9 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
/*==========================================
* 0197 /resetskill /resetstate
- *------------------------------------------
- */
-void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ResetChar(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (battle_config.atc_gmonly && !pc_isGM(sd))
return;
@@ -10186,9 +9979,9 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
/*==========================================
* 019c /lb等
- *------------------------------------------
- */
-void clif_parse_LGMmessage(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_LGMmessage(int fd, struct map_session_data *sd)
+{
unsigned char buf[CHAT_SIZE+4];
char *mes;
int len, lv;
@@ -10216,9 +10009,9 @@ void clif_parse_LGMmessage(int fd, struct map_session_data *sd) {
/*==========================================
* カプラ倉庫へ入れる
- *------------------------------------------
- */
-void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
+{
int item_index, item_amount;
RFIFOHEAD(fd);
@@ -10238,9 +10031,9 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) {
/*==========================================
* カプラ倉庫から出す
- *------------------------------------------
- */
-void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd)
+{
int item_index, item_amount;
RFIFOHEAD(fd);
@@ -10255,9 +10048,9 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
/*==========================================
* カプラ倉庫へカートから入れる
- *------------------------------------------
- */
-void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(sd->vender_id)
@@ -10272,9 +10065,9 @@ void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) {
/*==========================================
* カプラ倉庫から出す
- *------------------------------------------
- */
-void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (sd->vender_id)
@@ -10289,9 +10082,9 @@ void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) {
/*==========================================
* カプラ倉庫を閉じる
- *------------------------------------------
- */
-void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
+{
if (sd->state.storage_flag == 1)
storage_storageclose(sd);
else if (sd->state.storage_flag == 2)
@@ -10300,18 +10093,18 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
/*==========================================
* Kafra storage protection password system
- *------------------------------------------
- */
-void clif_parse_StoragePassword(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
+{
//TODO
}
/*==========================================
* パーティを作る
- *------------------------------------------
- */
-void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_CreateParty(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.partylock)
{ //Guild locked.
@@ -10326,9 +10119,9 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
/*==========================================
* パーティを作る
- *------------------------------------------
- */
-void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
+{
if(map[sd->bl.m].flag.partylock)
{ //Guild locked.
clif_displaymessage(fd, msg_txt(227));
@@ -10343,10 +10136,9 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
/*==========================================
* パーティに勧誘
- *------------------------------------------
- */
-void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
-
+ *------------------------------------------*/
+void clif_parse_PartyInvite(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
RFIFOHEAD(fd);
@@ -10369,9 +10161,9 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
/*==========================================
* パーティ勧誘返答
- *------------------------------------------
- */
-void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 5){
party_reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
@@ -10383,9 +10175,9 @@ void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) {
/*==========================================
* パーティ脱退要求
- *------------------------------------------
- */
-void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_LeaveParty(int fd, struct map_session_data *sd)
+{
if(map[sd->bl.m].flag.partylock)
{ //Guild locked.
clif_displaymessage(fd, msg_txt(227));
@@ -10396,9 +10188,9 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
/*==========================================
* パーティ除名要求
- *------------------------------------------
- */
-void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.partylock)
{ //Guild locked.
@@ -10410,9 +10202,9 @@ void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
/*==========================================
* パーティ設定変更要求
- *------------------------------------------
- */
-void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
+{
struct party_data *p;
RFIFOHEAD(fd);
@@ -10429,9 +10221,9 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) {
/*==========================================
* パーティメッセージ送信要求
- *------------------------------------------
- */
-void clif_parse_PartyMessage(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_PartyMessage(int fd, struct map_session_data *sd)
+{
char *mes;
int len;
@@ -10462,17 +10254,17 @@ void clif_parse_PartyMessage(int fd, struct map_session_data *sd) {
/*==========================================
* 露店閉鎖
- *------------------------------------------
- */
-void clif_parse_CloseVending(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_CloseVending(int fd, struct map_session_data *sd)
+{
vending_closevending(sd);
}
/*==========================================
* 露店アイテムリスト要求
- *------------------------------------------
- */
-void clif_parse_VendingListReq(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_VendingListReq(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
vending_vendinglistreq(sd,RFIFOL(fd,2));
@@ -10482,18 +10274,18 @@ void clif_parse_VendingListReq(int fd, struct map_session_data *sd) {
/*==========================================
* 露店アイテム購入
- *------------------------------------------
- */
-void clif_parse_PurchaseReq(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_PurchaseReq(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
vending_purchasereq(sd, RFIFOW(fd,2), RFIFOL(fd,4), RFIFOP(fd,8));
}
/*==========================================
* 露店開設
- *------------------------------------------
- */
-void clif_parse_OpenVending(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_OpenVending(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (clif_trading(sd))
return;
@@ -10504,9 +10296,9 @@ void clif_parse_OpenVending(int fd,struct map_session_data *sd) {
/*==========================================
* ギルドを作る
- *------------------------------------------
- */
-void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.guildlock)
{ //Guild locked.
@@ -10518,17 +10310,17 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
/*==========================================
* ギルドマスターかどうか確認
- *------------------------------------------
- */
-void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd)
+{
clif_guild_masterormember(sd);
}
/*==========================================
* ギルド情報要求
- *------------------------------------------
- */
-void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (!sd->status.guild_id) return;
switch(RFIFOL(fd,2)){
@@ -10559,9 +10351,9 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) {
/*==========================================
* ギルド役職変更
- *------------------------------------------
- */
-void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
+{
int i;
RFIFOHEAD(fd);
@@ -10575,9 +10367,9 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) {
/*==========================================
* ギルドメンバ役職変更
- *------------------------------------------
- */
-void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
+{
int i;
RFIFOHEAD(fd);
@@ -10592,9 +10384,9 @@ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) {
/*==========================================
* ギルドエンブレム要求
- *------------------------------------------
- */
-void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd)
+{
struct guild *g;
RFIFOHEAD(fd);
g=guild_search(RFIFOL(fd,2));
@@ -10604,9 +10396,9 @@ void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) {
/*==========================================
* ギルドエンブレム変更
- *------------------------------------------
- */
-void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(!sd->state.gmaster_flag)
@@ -10617,9 +10409,9 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド告知変更
- *------------------------------------------
- */
-void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(!sd->state.gmaster_flag)
@@ -10642,10 +10434,9 @@ void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド勧誘
- *------------------------------------------
- */
-void clif_parse_GuildInvite(int fd,struct map_session_data *sd) {
-
+ *------------------------------------------*/
+void clif_parse_GuildInvite(int fd,struct map_session_data *sd)
+{
struct map_session_data *t_sd;
RFIFOHEAD(fd);
@@ -10669,18 +10460,18 @@ void clif_parse_GuildInvite(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド勧誘返信
- *------------------------------------------
- */
-void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
guild_reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
}
/*==========================================
* ギルド脱退
- *------------------------------------------
- */
-void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildLeave(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.guildlock)
{ //Guild locked.
@@ -10692,9 +10483,9 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド追放
- *------------------------------------------
- */
-void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.guildlock)
{ //Guild locked.
@@ -10706,9 +10497,9 @@ void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド会話
- *------------------------------------------
- */
-void clif_parse_GuildMessage(int fd,struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildMessage(int fd,struct map_session_data *sd)
+{
char *mes;
int len;
@@ -10739,10 +10530,9 @@ void clif_parse_GuildMessage(int fd,struct map_session_data *sd) {
/*==========================================
* ギルド同盟要求
- *------------------------------------------
- */
-void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
-
+ *------------------------------------------*/
+void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
RFIFOHEAD(fd);
@@ -10769,18 +10559,18 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
/*==========================================
* ギルド同盟要求返信
- *------------------------------------------
- */
-void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
guild_reply_reqalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
/*==========================================
* ギルド関係解消
- *------------------------------------------
- */
-void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(!sd->state.gmaster_flag)
@@ -10796,10 +10586,9 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
/*==========================================
* ギルド敵対
- *------------------------------------------
- */
-void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
-
+ *------------------------------------------*/
+void clif_parse_GuildOpposition(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
RFIFOHEAD(fd);
@@ -10825,9 +10614,9 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
/*==========================================
* ギルド解散
- *------------------------------------------
- */
-void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GuildBreak(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if(map[sd->bl.m].flag.guildlock)
{ //Guild locked.
@@ -10838,17 +10627,20 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
}
// pet
-void clif_parse_PetMenu(int fd, struct map_session_data *sd) {
+void clif_parse_PetMenu(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
pet_menu(sd,RFIFOB(fd,2));
}
-void clif_parse_CatchPet(int fd, struct map_session_data *sd) {
+void clif_parse_CatchPet(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
pet_catch_process2(sd,RFIFOL(fd,2));
}
-void clif_parse_SelectEgg(int fd, struct map_session_data *sd) {
+void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_lv != -1)
return;
@@ -10856,20 +10648,23 @@ void clif_parse_SelectEgg(int fd, struct map_session_data *sd) {
sd->menuskill_lv = sd->menuskill_id = 0;
}
-void clif_parse_SendEmotion(int fd, struct map_session_data *sd) {
+void clif_parse_SendEmotion(int fd, struct map_session_data *sd)
+{
if(sd->pd) {
RFIFOHEAD(fd);
clif_pet_emotion(sd->pd,RFIFOL(fd,2));
}
}
-void clif_parse_ChangePetName(int fd, struct map_session_data *sd) {
+void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
pet_change_name(sd,(char*)RFIFOP(fd,2));
}
// Kick (right click menu for GM "(name) force to quit")
-void clif_parse_GMKick(int fd, struct map_session_data *sd) {
+void clif_parse_GMKick(int fd, struct map_session_data *sd)
+{
struct block_list *target;
int tid,lv;
@@ -10918,9 +10713,9 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) {
/*==========================================
* /shift
- *------------------------------------------
- */
-void clif_parse_Shift(int fd, struct map_session_data *sd) { // Rewriten by [Yor]
+ *------------------------------------------*/
+void clif_parse_Shift(int fd, struct map_session_data *sd)
+{
char *player_name;
int lv;
@@ -10943,9 +10738,9 @@ void clif_parse_Shift(int fd, struct map_session_data *sd) { // Rewriten by [Yor
/*==========================================
* /recall
- *------------------------------------------
- */
-void clif_parse_Recall(int fd, struct map_session_data *sd) { // Added by RoVeRT
+ *------------------------------------------*/
+void clif_parse_Recall(int fd, struct map_session_data *sd)
+{
char *player_name;
int lv;
@@ -10969,9 +10764,9 @@ void clif_parse_Recall(int fd, struct map_session_data *sd) { // Added by RoVeRT
/*==========================================
* /monster /item
- *------------------------------------------
- */
-void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
+{
char *monster_item_name;
char message[NAME_LENGTH+10]; //For logging.
int level;
@@ -11006,7 +10801,11 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
}
}
-void clif_parse_GMHide(int fd, struct map_session_data *sd) { // Modified by [Yor]
+/*==========================================
+ * /hide
+ *------------------------------------------*/
+void clif_parse_GMHide(int fd, struct map_session_data *sd)
+{
if (battle_config.atc_gmonly && !pc_isGM(sd))
return;
if (pc_isGM(sd) < get_atcommand_level(AtCommand_Hide))
@@ -11031,8 +10830,7 @@ void clif_parse_GMHide(int fd, struct map_session_data *sd) { // Modified by [Yo
/*==========================================
* GMによるチャット禁止時間付与
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd)
{
int type, limit, level;
@@ -11073,8 +10871,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd)
}
/*==========================================
* GMによるチャット禁止時間参照(?)
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_GMReqNoChatCount(int fd, struct map_session_data *sd)
{
int tid;
@@ -11105,7 +10902,8 @@ static int pstrcmp(const void *a, const void *b)
return 0;
}
-void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by [Yor]
+void clif_parse_PMIgnore(int fd, struct map_session_data *sd)
+{
char output[512];
char *nick; // S 00cf <nick>.24B <type>.B: 00 (/ex nick) deny speech from nick, 01 (/in nick) allow speech from nick
int i;
@@ -11189,7 +10987,8 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
return;
}
-void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten by [Yor]
+void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
+{
//printf("Ignore all: state: %d\n", RFIFOB(fd,2));
RFIFOHEAD(fd);
WFIFOHEAD(fd,packet_len(0xd2));
@@ -11229,8 +11028,7 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten
/*==========================================
* Wis拒否リスト
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
{
int i;
@@ -11248,9 +11046,9 @@ void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
/*==========================================
* スパノビの/doridoriによるSPR2倍
- *------------------------------------------
- */
-void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
+{
if (sd->state.doridori) return;
switch (sd->class_&MAPID_UPPERMASK)
@@ -11268,8 +11066,7 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) {
}
/*==========================================
* スパノビの爆裂波動
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
{
if(sd){
@@ -11294,8 +11091,7 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
/*==========================================
* Friends List
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int char_id, int online)
{ //Toggles a single friend online/offline [Skotlex]
int i, fd = sd->fd;
@@ -11327,7 +11123,8 @@ int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
}
//For sending the whole friends list.
-void clif_friendslist_send(struct map_session_data *sd) {
+void clif_friendslist_send(struct map_session_data *sd)
+{
int i = 0, n, fd = sd->fd;
// Send friends list
@@ -11375,7 +11172,8 @@ void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_dat
WFIFOSET(fd, packet_len(0x209));
}
-void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) {
+void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
+{
struct map_session_data *f_sd;
int i, f_fd;
RFIFOHEAD(fd);
@@ -11419,7 +11217,8 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) {
return;
}
-void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) {
+void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
+{
//<W: id> <L: Player 1 chara ID> <L: Player 1 AID> <B: Response>
struct map_session_data *f_sd;
int char_id, account_id;
@@ -11476,7 +11275,8 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) {
return;
}
-void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) {
+void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
+{
// 0x203 </o> <ID to be removed W 4B>
int account_id, char_id;
int i, j;
@@ -11513,8 +11313,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) {
/*==========================================
* /killall
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_GMKillAll(int fd,struct map_session_data *sd)
{
char message[50];
@@ -11527,8 +11326,7 @@ void clif_parse_GMKillAll(int fd,struct map_session_data *sd)
/*==========================================
* /pvpinfo
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
{
WFIFOHEAD(fd,packet_len(0x210));
@@ -11545,8 +11343,7 @@ void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
/*==========================================
* /blacksmith
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_Blacksmith(int fd,struct map_session_data *sd)
{
int i;
@@ -11589,8 +11386,7 @@ int clif_fame_blacksmith(struct map_session_data *sd, int points)
/*==========================================
* /alchemist
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_Alchemist(int fd,struct map_session_data *sd)
{
int i;
@@ -11633,8 +11429,7 @@ int clif_fame_alchemist(struct map_session_data *sd, int points)
/*==========================================
* /taekwon
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_Taekwon(int fd,struct map_session_data *sd)
{
int i;
@@ -11676,8 +11471,7 @@ int clif_fame_taekwon(struct map_session_data *sd, int points)
/*==========================================
* PK Ranking table?
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_RankingPk(int fd,struct map_session_data *sd)
{
int i;
@@ -11694,8 +11488,7 @@ void clif_parse_RankingPk(int fd,struct map_session_data *sd)
/*==========================================
* SG Feel save OK [Komurka]
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
{
char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
@@ -11718,9 +11511,9 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
/*==========================================
* Question about Star Glaldiator save map [Komurka]
- *------------------------------------------
- */
-void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv) {
+ *------------------------------------------*/
+void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv)
+{
WFIFOHEAD(fd,packet_len(0x253));
WFIFOW(fd,0)=0x253;
WFIFOSET(fd, packet_len(0x253));
@@ -11728,7 +11521,8 @@ void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv) {
sd->menuskill_lv=skilllv;
}
-void clif_parse_AdoptRequest(int fd,struct map_session_data *sd) {
+void clif_parse_AdoptRequest(int fd,struct map_session_data *sd)
+{
//TODO: add somewhere the adopt code, checks for exploits, etc, etc.
//Missing packets are the client's reply packets to the adopt request one.
//[Skotlex]
@@ -11749,15 +11543,15 @@ void clif_parse_AdoptRequest(int fd,struct map_session_data *sd) {
/*==========================================
* Homunculus packets
- *------------------------------------------
- */
-void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) {
+ *------------------------------------------*/
+void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd)
+{
RFIFOHEAD(fd);
merc_hom_change_name(sd,RFIFOP(fd,2));
}
-void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) { //[orn]
-
+void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
+{ //[orn]
nullpo_retv(sd);
if(!merc_is_hom_active(sd->hd))
@@ -11766,7 +11560,8 @@ void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) { //[orn]
unit_walktoxy(&sd->hd->bl, sd->bl.x,sd->bl.y-1, 4);
}
-void clif_parse_HomMoveTo(int fd,struct map_session_data *sd) { //[orn]
+void clif_parse_HomMoveTo(int fd,struct map_session_data *sd)
+{ //[orn]
int x,y,cmd;
RFIFOHEAD(fd);
nullpo_retv(sd);
@@ -11783,7 +11578,8 @@ void clif_parse_HomMoveTo(int fd,struct map_session_data *sd) { //[orn]
unit_walktoxy(&(sd->hd->bl),x,y,4);
}
-void clif_parse_HomAttack(int fd,struct map_session_data *sd) { //[orn]
+void clif_parse_HomAttack(int fd,struct map_session_data *sd)
+{ //[orn]
RFIFOHEAD(fd);
if(!merc_is_hom_active(sd->hd))
@@ -11792,7 +11588,8 @@ void clif_parse_HomAttack(int fd,struct map_session_data *sd) { //[orn]
unit_attack(&sd->hd->bl,RFIFOL(fd,6),0) ;
}
-void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
+void clif_parse_HomMenu(int fd, struct map_session_data *sd)
+{ //[orn]
int cmd;
RFIFOHEAD(fd);
@@ -11806,8 +11603,7 @@ void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
/*==========================================
* パケットデバッグ
- *------------------------------------------
- */
+ *------------------------------------------*/
void clif_parse_debug(int fd,struct map_session_data *sd)
{
int i, cmd, len;
@@ -11828,8 +11624,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd)
/*==========================================
* クライアントからのパケット解析
* socket.cのdo_parsepacketから呼び出される
- *------------------------------------------
- */
+ *------------------------------------------*/
int clif_parse(int fd)
{
int packet_len = 0, cmd, packet_ver, err, dump = 0;
@@ -11901,11 +11696,6 @@ int clif_parse(int fd)
WFIFOSET(fd,packet_len(0x6a));
RFIFOSKIP(fd, RFIFOREST(fd));
clif_setwaitclose(fd);
- /*
- //## TODO check if it still doesn't send and why. [FlavioJS]
- if (session[fd]->func_send) //socket.c doesn't wants to send the data when left on it's own... [Skotlex]
- session[fd]->func_send(fd);
- */
return 0;
}
}
@@ -12040,8 +11830,7 @@ int clif_parse(int fd)
/*==========================================
* パケットデータベース読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static int packetdb_readdb(void)
{
FILE *fp;
@@ -12408,8 +12197,7 @@ static int packetdb_readdb(void)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_clif(void)
{
clif_config.packet_db_ver = -1; // the main packet version of the DB
diff --git a/src/map/guild.c b/src/map/guild.c
index c5ce246b1..74d2a1978 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -86,8 +86,7 @@ int guild_checkskill(struct guild *g,int id)
/*==========================================
* guild_skill_tree.txt reading - from jA [Komurka]
- *------------------------------------------
- */
+ *------------------------------------------*/
int guild_read_guildskill_tree_db(void)
{
int i,k,id=0,ln=0;
@@ -131,8 +130,7 @@ int guild_read_guildskill_tree_db(void)
/*==========================================
* Guild skill check - from jA [Komurka]
- *------------------------------------------
- */
+ *------------------------------------------*/
int guild_check_skill_require(struct guild *g,int id)
{
int i;
@@ -1118,7 +1116,8 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
return 0;
}
-static void* create_expcache(DBKey key, va_list args) {
+static void* create_expcache(DBKey key, va_list args)
+{
struct guild_expcache *c;
struct map_session_data *sd = va_arg(args, struct map_session_data*);
@@ -1233,7 +1232,8 @@ int guild_get_alliance_count(struct guild *g,int flag)
}
// Blocks all guild skills which have a common delay time.
-void guild_block_skill(struct map_session_data *sd, int time) {
+void guild_block_skill(struct map_session_data *sd, int time)
+{
int skill_num[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL };
int i;
for (i = 0; i < 4; i++)
diff --git a/src/map/intif.c b/src/map/intif.c
index 8c087ea83..8b8bcf08c 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -45,7 +45,8 @@ extern int char_fd; // inter serverのfdはchar_fdを使う
//-----------------------------------------------------------------
// inter serverへの送信
-int CheckForCharServer(void) {
+int CheckForCharServer(void)
+{
return ((char_fd <= 0) || session[char_fd] == NULL || session[char_fd]->wdata == NULL);
}
@@ -176,7 +177,8 @@ int intif_announce(const char* mes,int len, unsigned long color, int flag)
}
// The transmission of Wisp/Page to inter-server (player not found on this server)
-int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) {
+int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len)
+{
nullpo_retr(0, sd);
if (CheckForCharServer())
return 0;
@@ -202,7 +204,8 @@ int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int me
}
// The reply of Wisp/page
-int intif_wis_replay(int id, int flag) {
+int intif_wis_replay(int id, int flag)
+{
if (CheckForCharServer())
return 0;
WFIFOHEAD(inter_fd,7);
@@ -218,7 +221,8 @@ int intif_wis_replay(int id, int flag) {
}
// The transmission of GM only Wisp/Page from server to inter-server
-int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes) {
+int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes)
+{
int mes_len;
if (CheckForCharServer())
return 0;
@@ -237,7 +241,8 @@ int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes) {
return 0;
}
-int intif_regtostr(char* str, struct global_reg *reg, int qty) {
+int intif_regtostr(char* str, struct global_reg *reg, int qty)
+{
int len =0, i;
for (i = 0; i < qty; i++) {
@@ -837,8 +842,9 @@ int intif_homunculus_requestdelete(int homun_id)
//-----------------------------------------------------------------
// Packets receive from inter server
-// Wisp/Page reception
-int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
+// Wisp/Page reception // rewritten by [Yor]
+int intif_parse_WisMessage(int fd)
+{
struct map_session_data* sd;
char *wisp_source;
char name[NAME_LENGTH];
@@ -876,7 +882,8 @@ int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
}
// Wisp/page transmission result reception
-int intif_parse_WisEnd(int fd) {
+int intif_parse_WisEnd(int fd)
+{
struct map_session_data* sd;
RFIFOHEAD(fd);
@@ -889,7 +896,8 @@ int intif_parse_WisEnd(int fd) {
return 0;
}
-static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) {
+static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
+{
int min_gm_level = va_arg(va, int);
char *wisp_name;
char *message;
@@ -903,7 +911,9 @@ static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) {
}
// Received wisp message from map-server via char-server for ALL gm
-int mapif_parse_WisToGM(int fd) { // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+// 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+int mapif_parse_WisToGM(int fd)
+{
int min_gm_level, mes_len;
char Wisp_name[NAME_LENGTH];
char mbuf[255];
@@ -927,7 +937,8 @@ int mapif_parse_WisToGM(int fd) { // 0x3003/0x3803 <packet_len>.w <wispname>.24B
}
// アカウント変数通知
-int intif_parse_Registers(int fd) {
+int intif_parse_Registers(int fd)
+{
int j,p,len,max, flag;
struct map_session_data *sd;
struct global_reg *reg;
@@ -979,7 +990,8 @@ int intif_parse_Registers(int fd) {
}
// 倉庫データ受信
-int intif_parse_LoadStorage(int fd) {
+int intif_parse_LoadStorage(int fd)
+{
struct storage *stor;
struct map_session_data *sd;
RFIFOHEAD(fd);
diff --git a/src/map/irc.c b/src/map/irc.c
index 1dab39903..7e72b3ea4 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -366,7 +366,8 @@ void do_init_irc(void)
}
//NAMES Packet(353) parser [Zido]
-int parse_names_packet(char *str) {
+int parse_names_packet(char *str)
+{
char *tok;
char source[256];
char numeric[10];
@@ -395,7 +396,8 @@ int parse_names_packet(char *str) {
}
//User access level prefix parser [Zido]
-int parse_names(char *str) {
+int parse_names(char *str)
+{
char *tok;
if (str == NULL) return 0; //Nothing to parse!
tok=strtok(str," ");
@@ -447,7 +449,8 @@ int parse_names(char *str) {
}
//Store user's access level [Zido]
-int set_access(char *nick,int newlevel) {
+int set_access(char *nick,int newlevel)
+{
int i=0;
for(i=0;i<=MAX_CHANNEL_USERS;i++) {
@@ -465,7 +468,8 @@ int set_access(char *nick,int newlevel) {
}
//Returns users access level [Zido]
-int get_access(char *nick) {
+int get_access(char *nick)
+{
int i=0;
for(i=0;i<=MAX_CHANNEL_USERS;i++) {
@@ -477,7 +481,8 @@ int get_access(char *nick) {
return -1;
}
-int irc_rmnames() {
+int irc_rmnames()
+{
int i=0;
for(i=0;i<=MAX_CHANNEL_USERS;i++) {
@@ -491,7 +496,8 @@ int irc_rmnames() {
return 0;
}
-int irc_read_conf(char *file) {
+int irc_read_conf(char *file)
+{
FILE *fp=NULL;
char w1[256];
char w2[256];
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index f872d386e..7e450fe4d 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -23,8 +23,7 @@ struct item_data dummy_item; //This is the default dummy item used for non-exist
/*==========================================
* 名前で検索用
- *------------------------------------------
- */
+ *------------------------------------------*/
// name = item alias, so we should find items aliases first. if not found then look for "jname" (full name)
int itemdb_searchname_sub(DBKey key,void *data,va_list ap)
{
@@ -49,8 +48,7 @@ int itemdb_searchname_sub(DBKey key,void *data,va_list ap)
/*==========================================
* 名前で検索
- *------------------------------------------
- */
+ *------------------------------------------*/
struct item_data* itemdb_searchname(const char *str)
{
struct item_data *item=NULL, *item2=NULL;
@@ -75,8 +73,7 @@ static int itemdb_searchname_array_sub(DBKey key,void * data,va_list ap)
/*==========================================
* Founds up to N matches. Returns number of matches [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_searchname_array(struct item_data** data, int size, const char *str)
{
return item_db->getall(item_db,(void**)data,size,itemdb_searchname_array_sub,str);
@@ -85,8 +82,7 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str)
/*==========================================
* 箱系アイテム検索
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_searchrandomid(int group)
{
if(group<1 || group>=MAX_ITEMGROUP) {
@@ -124,8 +120,7 @@ int itemdb_group_bonus(const int itemgrouphealrate[MAX_ITEMGROUP], int itemid)
/*==========================================
* DBの存在確認
- *------------------------------------------
- */
+ *------------------------------------------*/
struct item_data* itemdb_exists(int nameid)
{
struct item_data* id;
@@ -140,8 +135,7 @@ struct item_data* itemdb_exists(int nameid)
/*==========================================
* Converts the jobid from the format in itemdb
* to the format used by the map server. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
{
int i;
@@ -199,7 +193,8 @@ static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
bclass[0] |= 1<<MAPID_NINJA;
}
-static void create_dummy_data(void) {
+static void create_dummy_data(void)
+{
memset(&dummy_item, 0, sizeof(struct item_data));
dummy_item.nameid=500;
dummy_item.weight=1;
@@ -210,7 +205,8 @@ static void create_dummy_data(void) {
dummy_item.view_id = UNKNOWN_ITEM_ID;
}
-static void* create_item_data(DBKey key, va_list args) {
+static void* create_item_data(DBKey key, va_list args)
+{
struct item_data *id;
id=(struct item_data *)aCalloc(1,sizeof(struct item_data));
id->nameid = key.i;
@@ -221,8 +217,7 @@ static void* create_item_data(DBKey key, va_list args) {
/*==========================================
* Loads (and creates if not found) an item from the db.
- *------------------------------------------
- */
+ *------------------------------------------*/
struct item_data* itemdb_load(int nameid)
{
struct item_data *id = idb_ensure(item_db,nameid,create_item_data);
@@ -237,7 +232,8 @@ struct item_data* itemdb_load(int nameid)
return id;
}
-static void* return_dummy_data(DBKey key, va_list args) {
+static void* return_dummy_data(DBKey key, va_list args)
+{
if (battle_config.error_log)
ShowWarning("itemdb_search: Item ID %d does not exists in the item_db. Using dummy data.\n", key.i);
dummy_item.nameid = key.i;
@@ -246,8 +242,7 @@ static void* return_dummy_data(DBKey key, va_list args) {
/*==========================================
* Loads an item from the db. If not found, it will return the dummy item.
- *------------------------------------------
- */
+ *------------------------------------------*/
struct item_data* itemdb_search(int nameid)
{
return idb_ensure(item_db,nameid,return_dummy_data);
@@ -255,8 +250,7 @@ struct item_data* itemdb_search(int nameid)
/*==========================================
* Returns if given item is a player-equippable piece.
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isequip(int nameid)
{
int type=itemdb_type(nameid);
@@ -272,8 +266,7 @@ int itemdb_isequip(int nameid)
/*==========================================
* Alternate version of itemdb_isequip
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isequip2(struct item_data *data)
{
nullpo_retr(0, data);
@@ -288,9 +281,8 @@ int itemdb_isequip2(struct item_data *data)
}
/*==========================================
-* Returns if given item's type is stackable.
-*------------------------------------------
-*/
+ * Returns if given item's type is stackable.
+ *------------------------------------------*/
int itemdb_isstackable(int nameid)
{
int type=itemdb_type(nameid);
@@ -306,9 +298,8 @@ int itemdb_isstackable(int nameid)
}
/*==========================================
-* Alternate version of itemdb_isstackable
-*------------------------------------------
-*/
+ * Alternate version of itemdb_isstackable
+ *------------------------------------------*/
int itemdb_isstackable2(struct item_data *data)
{
nullpo_retr(0, data);
@@ -326,8 +317,7 @@ int itemdb_isstackable2(struct item_data *data)
/*==========================================
* Trade Restriction functions [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused)
{
return (item && (!(item->flag.trade_restriction&1) || gmlv >= item->gm_lv_trade_override));
@@ -384,8 +374,7 @@ int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(stru
/*==========================================
* Specifies if item-type should drop unidentified.
- *------------------------------------------
- */
+ *------------------------------------------*/
int itemdb_isidentified(int nameid)
{
int type=itemdb_type(nameid);
@@ -401,8 +390,7 @@ int itemdb_isidentified(int nameid)
/*==========================================
* アイテム使用可能フラグのオーバーライド
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_read_itemavail (void)
{
FILE *fp;
@@ -520,8 +508,7 @@ static void itemdb_read_itemgroup(void)
/*==========================================
* 装備制限ファイル読み出し
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_read_noequip(void)
{
FILE *fp;
@@ -566,8 +553,7 @@ static int itemdb_read_noequip(void)
/*==========================================
* Reads item trade restrictions [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_read_itemtrade(void)
{
FILE *fp;
@@ -612,8 +598,7 @@ static int itemdb_read_itemtrade(void)
/*======================================
* Applies gender restrictions according to settings. [Skotlex]
- *======================================
- */
+ *======================================*/
static int itemdb_gendercheck(struct item_data *id)
{
if (id->nameid == WEDDING_RING_M) //Grom Ring
@@ -630,9 +615,8 @@ static int itemdb_gendercheck(struct item_data *id)
#ifndef TXT_ONLY
/*======================================
-* SQL
-*===================================
-*/
+ * SQL
+ *======================================*/
static int itemdb_read_sqldb(void)
{
unsigned short nameid;
@@ -812,8 +796,7 @@ static int itemdb_read_sqldb(void)
/*==========================================
* アイテムデータベースの読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_readdb(void)
{
FILE *fp;
@@ -989,8 +972,7 @@ static int itemdb_readdb(void)
/*====================================
* Removed item_value_db, don't re-add
- *------------------------------------
- */
+ *------------------------------------*/
static void itemdb_read(void)
{
#ifndef TXT_ONLY
@@ -1008,8 +990,7 @@ static void itemdb_read(void)
/*==========================================
* Initialize / Finalize
- *------------------------------------------
- */
+ *------------------------------------------*/
static int itemdb_final_sub (DBKey key,void *data,va_list ap)
{
int flag;
diff --git a/src/map/log.c b/src/map/log.c
index 55124ddca..f6167247e 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -42,7 +42,8 @@ time_t curtime;
//12 - Log rare items (if their drop chance <= rare_log )
//check if this item should be logged according the settings
-int should_log_item(int filter, int nameid, int amount) {
+int should_log_item(int filter, int nameid, int amount)
+{
struct item_data *item_data;
if ((item_data= itemdb_exists(nameid)) == NULL) return 0;
if ((filter&1) || // Filter = 1, we log any item
diff --git a/src/map/map.c b/src/map/map.c
index 536d66d97..f59f9d148 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -176,8 +176,7 @@ int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing m
/*==========================================
* 全map鯖?計での接??設定
* (char鯖から送られてくる)
- *------------------------------------------
- */
+ *------------------------------------------*/
void map_setusers(int fd)
{
RFIFOHEAD(fd);
@@ -191,14 +190,15 @@ void map_setusers(int fd)
/*==========================================
* 全map鯖?計での接??取得 (/wへの?答用)
- *------------------------------------------
- */
-int map_getusers(void) {
+ *------------------------------------------*/
+int map_getusers(void)
+{
return map_users;
}
//Distance functions, taken from http://www.flipcode.com/articles/article_fastdistance.shtml
-int check_distance(int dx, int dy, int distance) {
+int check_distance(int dx, int dy, int distance)
+{
#ifdef CIRCULAR_AREA
//In this case, we just do a square comparison. Add 1 tile grace for diagonal range checks.
return (dx*dx + dy*dy <= distance*distance + (dx&&dy?1:0));
@@ -209,7 +209,8 @@ int check_distance(int dx, int dy, int distance) {
#endif
}
-unsigned int distance(int dx, int dy) {
+unsigned int distance(int dx, int dy)
+{
#ifdef CIRCULAR_AREA
unsigned int min, max;
@@ -244,8 +245,7 @@ unsigned int distance(int dx, int dy) {
/*==========================================
* blockをfreeするときfreeの?わりに呼ぶ
* ロックされているときはバッファにためる
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_freeblock (struct block_list *bl)
{
nullpo_retr(block_free_lock, bl);
@@ -264,8 +264,7 @@ int map_freeblock (struct block_list *bl)
}
/*==========================================
* blockのfreeを一市Iに禁止する
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_freeblock_lock (void)
{
return ++block_free_lock;
@@ -275,8 +274,7 @@ int map_freeblock_lock (void)
* blockのfreeのロックを解除する
* このとき、ロックが完全になくなると
* バッファにたまっていたblockを全部削除
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_freeblock_unlock (void)
{
if ((--block_free_lock) == 0) {
@@ -318,16 +316,14 @@ int map_freeblock_timer (int tid, unsigned int tick, int id, int data)
/*==========================================
* map[]のblock_listから?がっている場合に
* bl->prevにbl_headのアドレスを入れておく
- *------------------------------------------
- */
+ *------------------------------------------*/
static struct block_list bl_head;
#ifdef CELL_NOSTACK
/*==========================================
* These pair of functions update the counter of how many objects
* lie on a tile.
- *------------------------------------------
- */
+ *------------------------------------------*/
void map_addblcell(struct block_list *bl)
{
if(bl->m<0 || bl->x<0 || bl->x>=map[bl->m].xs
@@ -350,8 +346,7 @@ void map_delblcell(struct block_list *bl)
* Adds a block to the map.
* If flag is 1, then the block was just added
* otherwise it is part of a transition.
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_addblock_sub (struct block_list *bl, int flag)
{
int m, x, y, pos;
@@ -410,8 +405,7 @@ int map_addblock_sub (struct block_list *bl, int flag)
* Removes a block from the map.
* If flag is 1, then the block is removed for good
* otherwise it is part of a transition.
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_delblock_sub (struct block_list *bl, int flag)
{
int b;
@@ -463,9 +457,9 @@ int map_delblock_sub (struct block_list *bl, int flag)
* Moves a block a x/y target position. [Skotlex]
* Pass flag as 1 to prevent doing skill_unit_move checks
* (which are executed by default on BL_CHAR types)
- *------------------------------------------
- */
-int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
+ *------------------------------------------*/
+int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
+{
int x0 = bl->x, y0 = bl->y;
struct status_change *sc = NULL;
int moveblock = ( x0/BLOCK_SIZE != x1/BLOCK_SIZE || y0/BLOCK_SIZE != y1/BLOCK_SIZE);
@@ -523,8 +517,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
/*==========================================
* 周?のPC人?を?える (unused)
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_countnearpc (int m, int x, int y)
{
int bx, by, c = 0;
@@ -552,9 +545,9 @@ int map_countnearpc (int m, int x, int y)
/*==========================================
* Counts specified number of objects on given cell.
- *------------------------------------------
- */
-int map_count_oncell(int m, int x, int y, int type) {
+ *------------------------------------------*/
+int map_count_oncell(int m, int x, int y, int type)
+{
int bx,by;
struct block_list *bl=NULL;
int i,c;
@@ -615,10 +608,9 @@ struct skill_unit *map_find_skill_unit_oncell(struct block_list *target,int x,in
/*==========================================
* Adapted from foreachinarea for an easier invocation. [Skotlex]
- *------------------------------------------
- */
-
-int map_foreachinrange(int (*func)(struct block_list*,va_list),struct block_list *center, int range,int type,...) {
+ *------------------------------------------*/
+int map_foreachinrange(int (*func)(struct block_list*,va_list),struct block_list *center, int range,int type,...)
+{
va_list ap;
int bx,by,m;
int returnCount =0; //total sum of returned values of func() [Skotlex]
@@ -690,9 +682,9 @@ int map_foreachinrange(int (*func)(struct block_list*,va_list),struct block_list
/*==========================================
* Same as foreachinrange, but there must be a shoot-able range between center and target to be counted in. [Skotlex]
- *------------------------------------------
- */
-int map_foreachinshootrange(int (*func)(struct block_list*,va_list),struct block_list *center, int range,int type,...) {
+ *------------------------------------------*/
+int map_foreachinshootrange(int (*func)(struct block_list*,va_list),struct block_list *center, int range,int type,...)
+{
va_list ap;
int bx,by,m;
int returnCount =0; //total sum of returned values of func() [Skotlex]
@@ -770,9 +762,9 @@ int map_foreachinshootrange(int (*func)(struct block_list*,va_list),struct block
* map m (x0,y0)-(x1,y1)?の全objに?して
* funcを呼ぶ
* type!=0 ならその種類のみ
- *------------------------------------------
- */
-int map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int type,...) {
+ *------------------------------------------*/
+int map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int type,...)
+{
va_list ap;
int bx,by;
int returnCount =0; //total sum of returned values of func() [Skotlex]
@@ -846,9 +838,9 @@ int map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int y
* ?してfuncを呼ぶ
*
* dx,dyは-1,0,1のみとする(どんな値でもいいっぽい?)
- *------------------------------------------
- */
-int map_foreachinmovearea(int (*func)(struct block_list*,va_list),struct block_list *center,int range, int dx,int dy,int type,...) {
+ *------------------------------------------*/
+int map_foreachinmovearea(int (*func)(struct block_list*,va_list),struct block_list *center,int range, int dx,int dy,int type,...)
+{
int bx,by,m;
int returnCount =0; //total sum of returned values of func() [Skotlex]
struct block_list *bl=NULL;
@@ -986,7 +978,8 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list),struct block_l
// which only checks the exact single x/y passed to it rather than an
// area radius - may be more useful in some instances)
//
-int map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y,int type,...) {
+int map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y,int type,...)
+{
int bx,by;
int returnCount =0; //total sum of returned values of func() [Skotlex]
struct block_list *bl=NULL;
@@ -1042,8 +1035,7 @@ int map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y,
/*============================================================
* For checking a path between two points (x0, y0) and (x1, y1)
-*------------------------------------------------------------
- */
+*------------------------------------------------------------*/
int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int range,int type,...)
{
int returnCount =0; //total sum of returned values of func() [Skotlex]
@@ -1224,7 +1216,8 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
}
// Copy of map_foreachincell, but applied to the whole map. [Skotlex]
-int map_foreachinmap(int (*func)(struct block_list*,va_list),int m,int type,...) {
+int map_foreachinmap(int (*func)(struct block_list*,va_list),int m,int type,...)
+{
int b, bsize;
int returnCount =0; //total sum of returned values of func() [Skotlex]
struct block_list *bl=NULL;
@@ -1283,9 +1276,9 @@ int map_foreachinmap(int (*func)(struct block_list*,va_list),int m,int type,...)
* object[]への保存とid_db登?まで
*
* bl->idもこの中で設定して問題無い?
- *------------------------------------------
- */
-int map_addobject(struct block_list *bl) {
+ *------------------------------------------*/
+int map_addobject(struct block_list *bl)
+{
int i;
if( bl == NULL ){
ShowWarning("map_addobject nullpo?\n");
@@ -1310,9 +1303,9 @@ int map_addobject(struct block_list *bl) {
/*==========================================
* 一三bjectの解放
* map_delobjectのfreeしないバ?ジョン
- *------------------------------------------
- */
-int map_delobjectnofree(int id) {
+ *------------------------------------------*/
+int map_delobjectnofree(int id)
+{
if(objects[id]==NULL)
return 0;
@@ -1335,9 +1328,9 @@ int map_delobjectnofree(int id) {
* object dataのfree、object[]へのNULL代入
*
* addとの??性が無いのが?になる
- *------------------------------------------
- */
-int map_delobject(int id) {
+ *------------------------------------------*/
+int map_delobject(int id)
+{
struct block_list *obj = objects[id];
if(obj==NULL)
@@ -1352,9 +1345,9 @@ int map_delobject(int id) {
/*==========================================
* 全一三bj相手にfuncを呼ぶ
*
- *------------------------------------------
- */
-void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...) {
+ *------------------------------------------*/
+void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...)
+{
int i;
int blockcount=bl_list_count;
va_list ap;
@@ -1393,9 +1386,9 @@ void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...) {
*
* 後者は、map_clearflooritem(id)へ
* map.h?で#defineしてある
- *------------------------------------------
- */
-int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data) {
+ *------------------------------------------*/
+int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data)
+{
struct flooritem_data *fitem=NULL;
fitem = (struct flooritem_data *)objects[id];
@@ -1418,9 +1411,9 @@ int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data) {
* (m,x,y) locates a random available free cell around the given coordinates
* to place an BL_ITEM object. Scan area is 9x9, returns 1 on success.
* x and y are modified with the target cell when successful.
- *------------------------------------------
- */
-int map_searchrandfreecell(int m,int *x,int *y,int stack) {
+ *------------------------------------------*/
+int map_searchrandfreecell(int m,int *x,int *y,int stack)
+{
int free_cell,i,j;
int free_cells[9][2];
@@ -1464,9 +1457,9 @@ static int map_count_sub(struct block_list *bl,va_list ap)
* &1 = random cell must be around given m,x,y, not around src
* &2 = the target should be able to walk to the target tile.
* &4 = there shouldn't be any players around the target tile (use the no_spawn_on_player setting)
- *------------------------------------------
- */
-int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx, int ry, int flag) {
+ *------------------------------------------*/
+int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx, int ry, int flag)
+{
int tries, spawn=0;
int bx, by;
int rx2 = 2*rx+1;
@@ -1534,10 +1527,10 @@ int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx
*
* item_dataはamount以外をcopyする
* type flag: &1 MVP item. &2 do stacking check.
- *------------------------------------------
- */
+ *------------------------------------------*/
int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,struct map_session_data *first_sd,
- struct map_session_data *second_sd,struct map_session_data *third_sd,int type) {
+ struct map_session_data *second_sd,struct map_session_data *third_sd,int type)
+{
int r;
unsigned int tick;
struct flooritem_data *fitem=NULL;
@@ -1595,16 +1588,18 @@ int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,struct
return fitem->bl.id;
}
-static void* create_charid2nick(DBKey key, va_list args) {
+static void* create_charid2nick(DBKey key, va_list args)
+{
struct charid2nick *p;
p = (struct charid2nick *)aCallocA(1, sizeof (struct charid2nick));
return p;
}
+
/*==========================================
* charid_dbへ追加(返信待ちがあれば返信)
- *------------------------------------------
- */
-void map_addchariddb(int charid, char *name) {
+ *------------------------------------------*/
+void map_addchariddb(int charid, char *name)
+{
struct charid2nick *p;
int req = 0;
@@ -1622,9 +1617,9 @@ void map_addchariddb(int charid, char *name) {
/*==========================================
* charid_dbへ追加(返信要求のみ)
- *------------------------------------------
- */
-int map_reqchariddb(struct map_session_data * sd,int charid) {
+ *------------------------------------------*/
+int map_reqchariddb(struct map_session_data * sd,int charid)
+{
struct charid2nick *p=NULL;
nullpo_retr(0, sd);
@@ -1639,9 +1634,9 @@ int map_reqchariddb(struct map_session_data * sd,int charid) {
/*==========================================
* id_dbへblを追加
- *------------------------------------------
- */
-void map_addiddb(struct block_list *bl) {
+ *------------------------------------------*/
+void map_addiddb(struct block_list *bl)
+{
nullpo_retv(bl);
if (bl->type == BL_PC)
@@ -1651,9 +1646,9 @@ void map_addiddb(struct block_list *bl) {
/*==========================================
* id_dbからblを削除
- *------------------------------------------
- */
-void map_deliddb(struct block_list *bl) {
+ *------------------------------------------*/
+void map_deliddb(struct block_list *bl)
+{
nullpo_retv(bl);
if (bl->type == BL_PC)
@@ -1665,10 +1660,9 @@ void map_deliddb(struct block_list *bl) {
* PCのquit?理 map.c?分
*
* quit?理の主?が違うような?もしてきた
- *------------------------------------------
- */
-int map_quit(struct map_session_data *sd) {
-
+ *------------------------------------------*/
+int map_quit(struct map_session_data *sd)
+{
if(!sd->state.auth) { //Removing a player that hasn't even finished loading
TBL_PC *sd2 = map_id2sd(sd->status.account_id);
if (sd->pd) unit_free(&sd->pd->bl,-1);
@@ -1733,14 +1727,16 @@ int map_quit(struct map_session_data *sd) {
return 0;
}
-void map_quit_ack(struct map_session_data *sd) {
+void map_quit_ack(struct map_session_data *sd)
+{
if (sd && sd->state.finalsave) {
idb_remove(pc_db,sd->status.account_id);
aFree(sd);
}
}
-static int do_reconnect_map_sub(DBKey key,void *data,va_list va) {
+static int do_reconnect_map_sub(DBKey key,void *data,va_list va)
+{
struct map_session_data *sd = (TBL_PC*)data;
if (sd->state.finalsave) {
sd->state.finalsave = 0;
@@ -1750,25 +1746,25 @@ static int do_reconnect_map_sub(DBKey key,void *data,va_list va) {
return 0;
}
-void do_reconnect_map(void) {
+void do_reconnect_map(void)
+{
pc_db->foreach(pc_db,do_reconnect_map_sub);
}
/*==========================================
* id番?のPCを探す。居なければNULL
- *------------------------------------------
- */
-struct map_session_data * map_id2sd(int id) {
-// Now using pc_db to handle all players, should be quicker than both previous methods at a small expense of more memory. [Skotlex]
+ *------------------------------------------*/
+struct map_session_data * map_id2sd(int id)
+{
if (id <= 0) return NULL;
return (struct map_session_data*)idb_get(pc_db,id);
}
/*==========================================
* char_id番?の名前を探す
- *------------------------------------------
- */
-char * map_charid2nick(int id) {
+ *------------------------------------------*/
+char * map_charid2nick(int id)
+{
struct charid2nick *p = (struct charid2nick*)idb_get(charid_db,id);
if(p==NULL)
@@ -1776,7 +1772,8 @@ char * map_charid2nick(int id) {
return p->nick;
}
-struct map_session_data * map_charid2sd(int id) {
+struct map_session_data * map_charid2sd(int id)
+{
int i, users;
struct map_session_data **all_sd;
@@ -1794,9 +1791,9 @@ struct map_session_data * map_charid2sd(int id) {
* Search session data from a nick name
* (without sensitive case if necessary)
* return map_session_data pointer or NULL
- *------------------------------------------
- */
-struct map_session_data * map_nick2sd(const char *nick) {
+ *------------------------------------------*/
+struct map_session_data * map_nick2sd(const char *nick)
+{
int i, users;
struct map_session_data *pl_sd = NULL, **pl_allsd;
@@ -1835,8 +1832,7 @@ struct map_session_data * map_nick2sd(const char *nick) {
/*==========================================
* id番?の物を探す
* 一三bjectの場合は配列を引くのみ
- *------------------------------------------
- */
+ *------------------------------------------*/
struct block_list * map_id2bl(int id)
{
struct block_list *bl=NULL;
@@ -1861,9 +1857,9 @@ static int map_getallpc_sub(DBKey key,void * data,va_list ap)
* Returns an array of all players in the server (includes non connected ones) [Skotlex]
* The int pointer given returns the count of elements in the array.
* If null is passed, it is requested that the memory be freed (for shutdown), and null is returned.
- *------------------------------------------
- */
-struct map_session_data** map_getallusers(int *users) {
+ *------------------------------------------*/
+struct map_session_data** map_getallusers(int *users)
+{
static struct map_session_data **all_sd=NULL;
static unsigned int all_count = 0;
@@ -1893,7 +1889,8 @@ struct map_session_data** map_getallusers(int *users) {
return all_sd;
}
-void map_foreachpc(int (*func)(DBKey,void*,va_list),...) {
+void map_foreachpc(int (*func)(DBKey,void*,va_list),...)
+{
va_list ap;
va_start(ap,func);
pc_db->vforeach(pc_db,func,ap);
@@ -1902,9 +1899,9 @@ void map_foreachpc(int (*func)(DBKey,void*,va_list),...) {
/*==========================================
* id_db?の全てにfuncを?行
- *------------------------------------------
- */
-int map_foreachiddb(int (*func)(DBKey,void*,va_list),...) {
+ *------------------------------------------*/
+int map_foreachiddb(int (*func)(DBKey,void*,va_list),...)
+{
va_list ap;
va_start(ap,func);
@@ -1915,9 +1912,9 @@ int map_foreachiddb(int (*func)(DBKey,void*,va_list),...) {
/*==========================================
* map.npcへ追加 (warp等の領域持ちのみ)
- *------------------------------------------
- */
-int map_addnpc(int m,struct npc_data *nd) {
+ *------------------------------------------*/
+int map_addnpc(int m,struct npc_data *nd)
+{
int i;
if(m<0 || m>=map_num)
return -1;
@@ -1942,7 +1939,8 @@ int map_addnpc(int m,struct npc_data *nd) {
return i;
}
-void map_removenpc(void) {
+void map_removenpc(void)
+{
int i,m,n=0;
for(m=0;m<map_num;m++) {
@@ -1967,9 +1965,7 @@ void map_removenpc(void) {
/*=========================================
* Dynamic Mobs [Wizputer]
- *-----------------------------------------
- */
-
+ *-----------------------------------------*/
// allocates a struct when it there is place free in the cache,
// and returns NULL otherwise
// -- i'll just leave the old code in case it's needed ^^;
@@ -2007,7 +2003,8 @@ void map_spawnmobs(int m)
}
}
-int mob_cache_cleanup_sub(struct block_list *bl, va_list ap) {
+int mob_cache_cleanup_sub(struct block_list *bl, va_list ap)
+{
struct mob_data *md = (struct mob_data *)bl;
nullpo_retr(0, md);
@@ -2064,9 +2061,9 @@ void map_removemobs(int m)
/*==========================================
* map名からmap番?へ?換
- *------------------------------------------
- */
-int map_mapname2mapid(const char* name) {
+ *------------------------------------------*/
+int map_mapname2mapid(const char* name)
+{
unsigned short map_index;
map_index = mapindex_name2id(name);
if (!map_index)
@@ -2076,9 +2073,9 @@ int map_mapname2mapid(const char* name) {
/*==========================================
* Returns the map of the given mapindex. [Skotlex]
- *------------------------------------------
- */
-int map_mapindex2mapid(unsigned short mapindex) {
+ *------------------------------------------*/
+int map_mapindex2mapid(unsigned short mapindex)
+{
struct map_data *md=NULL;
if (!mapindex)
@@ -2107,9 +2104,9 @@ int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port)
/*==========================================
* Checks if both dirs point in the same direction.
- *------------------------------------------
- */
-int map_check_dir(int s_dir,int t_dir) {
+ *------------------------------------------*/
+int map_check_dir(int s_dir,int t_dir)
+{
if(s_dir == t_dir)
return 0;
switch(s_dir) {
@@ -2152,9 +2149,9 @@ int map_check_dir(int s_dir,int t_dir) {
/*==========================================
* Returns the direction of the given cell in absolute relation to the char
* (regardless of where the char is facing)
- *------------------------------------------
- */
-int map_calc_dir( struct block_list *src,int x,int y) {
+ *------------------------------------------*/
+int map_calc_dir( struct block_list *src,int x,int y)
+{
int dir=0;
int dx,dy;
@@ -2187,9 +2184,9 @@ int map_calc_dir( struct block_list *src,int x,int y) {
/*==========================================
* Randomizes target cell x,y to a random walkable cell that
* has the same distance from object as given coordinates do. [Skotlex]
- *------------------------------------------
- */
-int map_random_dir(struct block_list *bl, short *x, short *y) {
+ *------------------------------------------*/
+int map_random_dir(struct block_list *bl, short *x, short *y)
+{
struct walkpath_data wpd;
short xi = *x-bl->x;
short yi = *y-bl->y;
@@ -2221,9 +2218,7 @@ int map_random_dir(struct block_list *bl, short *x, short *y) {
// gat系
/*==========================================
* (m,x,y)の状態を調べる
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int map_getcell(int m,int x,int y,cell_t cellchk)
{
return (m < 0 || m >= MAX_MAP_PER_SERVER) ? 0 : map_getcellp(&map[m],x,y,cellchk);
@@ -2300,8 +2295,7 @@ int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
/*==========================================
* (m,x,y)の状態を設定する
- *------------------------------------------
- */
+ *------------------------------------------*/
void map_setcell(int m,int x,int y,int cell)
{
int j;
@@ -2354,7 +2348,8 @@ void map_setcell(int m,int x,int y,int cell)
break;
}
}
-static void* create_map_data_other_server(DBKey key, va_list args) {
+static void* create_map_data_other_server(DBKey key, va_list args)
+{
struct map_data_other_server *mdos;
unsigned short mapindex = (unsigned short)key.ui;
mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
@@ -2362,10 +2357,10 @@ static void* create_map_data_other_server(DBKey key, va_list args) {
memcpy(mdos->name, mapindex_id2name(mapindex), MAP_NAME_LENGTH);
return mdos;
}
+
/*==========================================
* 他鯖管理のマップをdbに追加
*------------------------------------------*/
-
int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
{
struct map_data_other_server *mdos=NULL;
@@ -2386,9 +2381,9 @@ int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
/*==========================================
* 他鯖管理のマップを全て削除
- *------------------------------------------
- */
-int map_eraseallipport_sub(DBKey key,void *data,va_list va) {
+ *------------------------------------------*/
+int map_eraseallipport_sub(DBKey key,void *data,va_list va)
+{
struct map_data_other_server *mdos = (struct map_data_other_server*)data;
if(mdos->gat == NULL) {
db_remove(map_db,key);
@@ -2397,7 +2392,8 @@ int map_eraseallipport_sub(DBKey key,void *data,va_list va) {
return 0;
}
-int map_eraseallipport(void) {
+int map_eraseallipport(void)
+{
map_db->foreach(map_db,map_eraseallipport_sub);
return 1;
}
@@ -2424,7 +2420,6 @@ int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port)
/*==========================================
* Map cache reading
*===========================================*/
-
int map_readfromcache(struct map_data *m, FILE *fp)
{
int i;
@@ -2458,7 +2453,8 @@ int map_readfromcache(struct map_data *m, FILE *fp)
return 0;
}
-int map_addmap(char *mapname) {
+int map_addmap(char *mapname)
+{
if (strcmpi(mapname,"clear")==0) {
map_num=0;
return 0;
@@ -2482,8 +2478,8 @@ static void map_delmapid(int id)
map_num--;
}
-int map_delmap(char *mapname) {
-
+int map_delmap(char *mapname)
+{
int i;
if (strcmpi(mapname, "all") == 0) {
@@ -2510,7 +2506,8 @@ int map_delmap(char *mapname) {
* Assumed path for file is data/mapname.rsw
* Credits to LittleWolf
*/
-int map_waterheight(char *mapname) {
+int map_waterheight(char *mapname)
+{
char fn[256];
char *rsw, *found;
float whtemp;
@@ -2549,8 +2546,7 @@ int map_waterheight(char *mapname) {
/*==================================
* .GAT format
- *----------------------------------
- */
+ *----------------------------------*/
int map_readgat (struct map_data *m)
{
char fn[256];
@@ -2590,8 +2586,7 @@ int map_readgat (struct map_data *m)
/*======================================
* Initiate maps loading stage
- *--------------------------------------
- */
+ *--------------------------------------*/
int map_readallmaps (void)
{
int i;
@@ -2709,8 +2704,7 @@ static int char_ip_set = 0;
/*==========================================
* Console Command Parser [Wizputer]
- *------------------------------------------
- */
+ *------------------------------------------*/
int parse_console(char* buf)
{
char type[64];
@@ -2774,9 +2768,9 @@ int parse_console(char* buf)
/*==========================================
* 設定ファイルを?み?む
- *------------------------------------------
- */
-int map_config_read(char *cfgName) {
+ *------------------------------------------*/
+int map_config_read(char *cfgName)
+{
char line[1024], w1[1024], w2[1024], *ptr;
FILE *fp;
@@ -2970,8 +2964,8 @@ int inter_config_read(char *cfgName)
/*=======================================
* MySQL Init
*---------------------------------------*/
-int map_sql_init(void){
-
+int map_sql_init(void)
+{
mysql_init(&mmysql_handle);
//DB connection start
@@ -3014,7 +3008,8 @@ int map_sql_init(void){
return 0;
}
-int map_sql_close(void){
+int map_sql_close(void)
+{
mysql_close(&mmysql_handle);
ShowStatus("Close Map DB Connection....\n");
@@ -3027,8 +3022,8 @@ int map_sql_close(void){
return 0;
}
-int log_sql_init(void){
-
+int log_sql_init(void)
+{
mysql_init(&logmysql_handle);
//DB connection start
@@ -3099,6 +3094,7 @@ int map_db_final(DBKey k,void *d,va_list ap)
aFree(mdos);
return 0;
}
+
int nick_db_final(void *k,void *d,va_list ap)
{
char *p = (char *) d;
@@ -3106,7 +3102,8 @@ int nick_db_final(void *k,void *d,va_list ap)
return 0;
}
-int cleanup_sub(struct block_list *bl, va_list ap) {
+int cleanup_sub(struct block_list *bl, va_list ap)
+{
nullpo_retr(0, bl);
switch(bl->type) {
@@ -3133,11 +3130,13 @@ int cleanup_sub(struct block_list *bl, va_list ap) {
return 1;
}
-static int cleanup_db_sub(DBKey key,void *data,va_list va) {
+static int cleanup_db_sub(DBKey key,void *data,va_list va)
+{
return cleanup_sub((struct block_list*)data, NULL);
}
-static int cleanup_db_subpc(DBKey key,void *data,va_list va) {
+static int cleanup_db_subpc(DBKey key,void *data,va_list va)
+{
struct map_session_data *sd = (TBL_PC*)data;
if (!sd->state.finalsave)
{ //Error?
@@ -3151,9 +3150,9 @@ static int cleanup_db_subpc(DBKey key,void *data,va_list va) {
/*==========================================
* map鯖終了・理
- *------------------------------------------
- */
-void do_final(void) {
+ *------------------------------------------*/
+void do_final(void)
+{
int i, j;
struct map_session_data **pl_allsd;
@@ -3241,7 +3240,8 @@ static int map_abort_sub(DBKey key,void * data,va_list ap)
// Function called when the server
// has received a crash signal.
//------------------------------
-void do_abort(void) {
+void do_abort(void)
+{
//Save all characters and then flush the inter-connection.
if (!chrif_isconnect())
{
@@ -3256,9 +3256,9 @@ void do_abort(void) {
/*======================================================
* Map-Server Version Screen [MC Cameri]
- *------------------------------------------------------
- */
-void map_helpscreen(int flag) { // by MC Cameri
+ *------------------------------------------------------*/
+void map_helpscreen(int flag)
+{
puts("Usage: map-server [options]");
puts("Options:");
puts(CL_WHITE" Commands\t\t\tDescription"CL_RESET);
@@ -3282,9 +3282,9 @@ void map_helpscreen(int flag) { // by MC Cameri
/*======================================================
* Map-Server Version Screen [MC Cameri]
- *------------------------------------------------------
- */
-void map_versionscreen(int flag) {
+ *------------------------------------------------------*/
+void map_versionscreen(int flag)
+{
printf("CL_WHITE" "eAthena version %d.%02d.%02d, Athena Mod version %d" CL_RESET"\n",
ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION,
ATHENA_MOD_VERSION);
diff --git a/src/map/mob.c b/src/map/mob.c
index 4e97c1bef..76a89f2e1 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -60,8 +60,7 @@ static struct eri *item_drop_list_ers;
/*==========================================
* Local prototype declaration (only required thing)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_makedummymobdb(int);
static int mob_spawn_guardian_sub(int,unsigned int,int,int);
int mobskill_use(struct mob_data *md,unsigned int tick,int event);
@@ -69,8 +68,7 @@ int mob_skillid2skillidx(int class_,int skillid);
/*==========================================
* Mob is searched with a name.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mobdb_searchname(const char *str)
{
int i;
@@ -100,8 +98,7 @@ static int mobdb_searchname_array_sub(struct mob_db* mob, const char *str)
/*==========================================
* Founds up to N matches. Returns number of matches [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int mobdb_searchname_array(struct mob_db** data, int size, const char *str)
{
int count = 0, i;
@@ -121,8 +118,7 @@ int mobdb_searchname_array(struct mob_db** data, int size, const char *str)
/*==========================================
* Id Mob is checked.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mobdb_checkid(const int id)
{
if (mob_db(id) == mob_dummy)
@@ -134,8 +130,7 @@ int mobdb_checkid(const int id)
/*==========================================
* Returns the view data associated to this mob class.
- *------------------------------------------
- */
+ *------------------------------------------*/
struct view_data * mob_get_viewdata(int class_)
{
if (mob_db(class_) == mob_dummy)
@@ -144,9 +139,9 @@ struct view_data * mob_get_viewdata(int class_)
}
/*==========================================
* Cleans up mob-spawn data to make it "valid"
- *------------------------------------------
- */
-int mob_parse_dataset(struct spawn_data *data) {
+ *------------------------------------------*/
+int mob_parse_dataset(struct spawn_data *data)
+{
int i;
//FIXME: This implementation is not stable, npc scripts will stop working once MAX_MOB_DB changes value! [Skotlex]
if(data->class_ > 2*MAX_MOB_DB){ // large/tiny mobs [Valaris]
@@ -197,8 +192,7 @@ int mob_parse_dataset(struct spawn_data *data) {
}
/*==========================================
* Generates the basic mob data using the spawn_data provided.
- *------------------------------------------
- */
+ *------------------------------------------*/
struct mob_data* mob_spawn_dataset(struct spawn_data *data)
{
struct mob_data *md = aCalloc(1, sizeof(struct mob_data));
@@ -244,10 +238,9 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
* &4: Selected monster should not be a boss type
* &8: Selected monster must give base exp.
* lv: Mob level to check against
- *------------------------------------------
- */
-
-int mob_get_random_id(int type, int flag, int lv) {
+ *------------------------------------------*/
+int mob_get_random_id(int type, int flag, int lv)
+{
struct mob_db *mob;
int i=0, class_;
if(type < 0 || type >= MAX_RANDOMMONSTER) {
@@ -308,8 +301,7 @@ struct mob_data *mob_once_spawn_sub(struct block_list *bl, int m,
}
/*==========================================
* The MOB appearance for one time (for scripts)
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_once_spawn (struct map_session_data *sd, const char *mapname,
short x, short y, const char *mobname, int class_, int amount, const char *event)
{
@@ -361,8 +353,7 @@ int mob_once_spawn (struct map_session_data *sd, const char *mapname,
}
/*==========================================
* The MOB appearance for one time (& area specification for scripts)
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_once_spawn_area(struct map_session_data *sd,const char *mapname,
int x0,int y0,int x1,int y1,
const char *mobname,int class_,int amount,const char *event)
@@ -403,8 +394,7 @@ int mob_once_spawn_area(struct map_session_data *sd,const char *mapname,
}
/*==========================================
* Set a Guardian's guild data [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
{ //Needed because the guild_data may not be available at guardian spawn time.
struct block_list* bl = map_id2bl(id);
@@ -456,8 +446,7 @@ static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
/*==========================================
* Summoning Guardians [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobname, int class_, const char* event, int guardian)
{
struct mob_data *md=NULL;
@@ -548,8 +537,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
* - MSS_LOOT: Looking for item, path must be easy.
* - MSS_RUSH: Chasing attacking player, path is complex
* - MSS_FOLLOW: Initiative/support seek, path is complex
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state)
{
int easy = 0;
@@ -571,8 +559,7 @@ int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state
/*==========================================
* Links nearby mobs (supportive mobs)
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_linksearch(struct block_list *bl,va_list ap)
{
struct mob_data *md;
@@ -603,8 +590,7 @@ int mob_linksearch(struct block_list *bl,va_list ap)
/*==========================================
* mob spawn with delay (timer function)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_delayspawn(int tid, unsigned int tick, int m, int n)
{
struct block_list *bl = map_id2bl(m);
@@ -615,8 +601,7 @@ static int mob_delayspawn(int tid, unsigned int tick, int m, int n)
/*==========================================
* spawn timing calculation
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_setdelayspawn(struct mob_data *md)
{
unsigned int spawntime, spawntime1, spawntime2, spawntime3;
@@ -647,8 +632,7 @@ static int mob_count_sub(struct block_list *bl,va_list ap)
/*==========================================
* Mob spawning. Initialization is also variously here.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_spawn (struct mob_data *md)
{
int i=0;
@@ -723,8 +707,7 @@ int mob_spawn (struct mob_data *md)
/*==========================================
* Determines if the mob can change target. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_can_changetarget(struct mob_data* md, struct block_list* target, int mode)
{
// if the monster was provoked ignore the above rule [celest]
@@ -756,8 +739,7 @@ static int mob_can_changetarget(struct mob_data* md, struct block_list* target,
/*==========================================
* Determination for an attack of a monster
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_target(struct mob_data *md,struct block_list *bl,int dist)
{
nullpo_retr(0, md);
@@ -781,8 +763,7 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist)
/*==========================================
* The ?? routine of an active monster
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
{
struct mob_data *md;
@@ -834,8 +815,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
/*==========================================
* chase target-change routine.
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_hard_changechase(struct block_list *bl,va_list ap)
{
struct mob_data *md;
@@ -864,8 +844,7 @@ static int mob_ai_sub_hard_changechase(struct block_list *bl,va_list ap)
/*==========================================
* loot monster item search
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
{
struct mob_data* md;
@@ -905,8 +884,7 @@ static int mob_ai_sub_hard_warpsearch(struct block_list *bl,va_list ap)
}
/*==========================================
* Processing of slave monsters
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
{
struct block_list *bl;
@@ -992,8 +970,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
* This also triggers idle skill/movement since the AI can get stuck
* when trying to pick new targets when the current chosen target is
* unreachable.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_unlocktarget(struct mob_data *md,int tick)
{
nullpo_retr(0, md);
@@ -1035,8 +1012,7 @@ int mob_unlocktarget(struct mob_data *md,int tick)
}
/*==========================================
* Random walk
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_randomwalk(struct mob_data *md,int tick)
{
const int retrycount=20;
@@ -1089,8 +1065,7 @@ int mob_randomwalk(struct mob_data *md,int tick)
/*==========================================
* AI of MOB whose is near a Player
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
{
struct mob_data *md;
@@ -1345,8 +1320,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
/*==========================================
* Serious processing for mob in PC field of view (foreachclient)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
{
unsigned int tick;
@@ -1358,8 +1332,7 @@ static int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
/*==========================================
* Negligent mode MOB AI (PC is not in near)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
{
struct mob_data *md = (struct mob_data *)data;
@@ -1425,8 +1398,7 @@ static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
/*==========================================
* Negligent processing for mob outside PC field of view (interval timer function)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_lazy(int tid,unsigned int tick,int id,int data)
{
map_foreachiddb(mob_ai_sub_lazy,tick);
@@ -1435,8 +1407,7 @@ static int mob_ai_lazy(int tid,unsigned int tick,int id,int data)
/*==========================================
* Serious processing for mob in PC field of view (interval timer function)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_ai_hard(int tid,unsigned int tick,int id,int data)
{
@@ -1450,8 +1421,7 @@ static int mob_ai_hard(int tid,unsigned int tick,int id,int data)
/*==========================================
* Initializes the delay drop structure for mob-dropped items.
- *------------------------------------------
- */
+ *------------------------------------------*/
static struct item_drop* mob_setdropitem(int nameid, int qty)
{
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
@@ -1465,8 +1435,7 @@ static struct item_drop* mob_setdropitem(int nameid, int qty)
/*==========================================
* Initializes the delay drop structure for mob-looted items.
- *------------------------------------------
- */
+ *------------------------------------------*/
static struct item_drop* mob_setlootitem(struct item* item)
{
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
@@ -1477,8 +1446,7 @@ static struct item_drop* mob_setlootitem(struct item* item)
/*==========================================
* item drop with delay (timer function)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
{
struct item_drop_list *list;
@@ -1501,9 +1469,7 @@ static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
* Sets the item_drop into the item_drop_list.
* Also performs logging and autoloot if enabled.
* rate is the drop-rate of the item, required for autoloot.
- *------------------------------------------
- * by [Skotlex]
- */
+ *------------------------------------------*/
static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate)
{
if(log_config.enable_logs&0x10)
@@ -1576,8 +1542,7 @@ int mob_convertslave(struct mob_data *md)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_deleteslave_sub(struct block_list *bl,va_list ap)
{
struct mob_data *md;
@@ -1595,8 +1560,7 @@ int mob_deleteslave_sub(struct block_list *bl,va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_deleteslave(struct mob_data *md)
{
nullpo_retr(0, md);
@@ -1734,8 +1698,7 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage)
/*==========================================
* Signals death of mob. type&1 -> no drops, type&2 -> no exp
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_dead(struct mob_data *md, struct block_list *src, int type)
{
struct status_data *status;
@@ -2322,8 +2285,7 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap)
/*==========================================
* Pick a random class for the mob
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_random_class (int *value, size_t count)
{
nullpo_retr(0, value);
@@ -2345,8 +2307,7 @@ int mob_random_class (int *value, size_t count)
/*==========================================
* Change mob base class
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_class_change (struct mob_data *md, int class_)
{
unsigned int tick = gettick();
@@ -2413,8 +2374,7 @@ int mob_class_change (struct mob_data *md, int class_)
/*==========================================
* mob回復
- *------------------------------------------
- */
+ *------------------------------------------*/
void mob_heal(struct mob_data *md,unsigned int heal)
{
if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS)
@@ -2427,8 +2387,7 @@ void mob_heal(struct mob_data *md,unsigned int heal)
/*==========================================
* Added by RoVeRT
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_warpslave_sub(struct block_list *bl,va_list ap)
{
struct mob_data *md=(struct mob_data *)bl;
@@ -2449,8 +2408,7 @@ int mob_warpslave_sub(struct block_list *bl,va_list ap)
* Added by RoVeRT
* Warps slaves. Range is the area around the master that they can
* appear in randomly.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_warpslave(struct block_list *bl, int range)
{
if (range < 1)
@@ -2461,8 +2419,7 @@ int mob_warpslave(struct block_list *bl, int range)
/*==========================================
* 画面内の取り巻きの数計算用(foreachinarea)
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_countslave_sub(struct block_list *bl,va_list ap)
{
int id;
@@ -2477,16 +2434,15 @@ int mob_countslave_sub(struct block_list *bl,va_list ap)
/*==========================================
* 画面内の取り巻きの数計算
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_countslave(struct block_list *bl)
{
return map_foreachinmap(mob_countslave_sub, bl->m, BL_MOB,bl->id);
}
+
/*==========================================
* Summons amount slaves contained in the value[5] array using round-robin. [adapted by Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
{
struct mob_data *md;
@@ -2585,8 +2541,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
/*==========================================
*MOBskillから該当skillidのskillidxを返す
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_skillid2skillidx(int class_,int skillid)
{
int i, max = mob_db(class_)->maxskill;
@@ -2605,8 +2560,7 @@ int mob_skillid2skillidx(int class_,int skillid)
/*==========================================
* Friendly Mob whose HP is decreasing by a nearby MOB is looked for.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_getfriendhprate_sub(struct block_list *bl,va_list ap)
{
int min_rate, max_rate,rate;
@@ -2648,8 +2602,7 @@ static struct block_list *mob_getfriendhprate(struct mob_data *md,int min_rate,i
}
/*==========================================
* Check hp rate of its master
- *------------------------------------------
- */
+ *------------------------------------------*/
struct block_list *mob_getmasterhpltmaxrate(struct mob_data *md,int rate)
{
if (md && md->master_id > 0) {
@@ -2662,8 +2615,7 @@ struct block_list *mob_getmasterhpltmaxrate(struct mob_data *md,int rate)
}
/*==========================================
* What a status state suits by nearby MOB is looked for.
- *------------------------------------------
- */
+ *------------------------------------------*/
int mob_getfriendstatus_sub(struct block_list *bl,va_list ap)
{
int cond1,cond2;
@@ -2696,6 +2648,7 @@ int mob_getfriendstatus_sub(struct block_list *bl,va_list ap)
return 0;
}
+
struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2)
{
struct mob_data *fr=NULL;
@@ -2709,8 +2662,7 @@ struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2)
/*==========================================
* Skill use judging
- *------------------------------------------
- */
+ *------------------------------------------*/
int mobskill_use(struct mob_data *md, unsigned int tick, int event)
{
struct mob_skill *ms;
@@ -2911,8 +2863,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
}
/*==========================================
* Skill use event processing
- *------------------------------------------
- */
+ *------------------------------------------*/
int mobskill_event(struct mob_data *md, struct block_list *src, unsigned int tick, int flag)
{
int target_id, res = 0;
@@ -3176,8 +3127,7 @@ int mob_script_callback(struct mob_data *md, struct block_list *target, short ac
//
/*==========================================
* Since un-setting [ mob ] up was used, it is an initial provisional value setup.
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_makedummymobdb(int class_)
{
if (mob_dummy != NULL)
@@ -3459,8 +3409,7 @@ int mob_parse_dbrow(char** str)
/*==========================================
* mob_db.txt reading
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_readdb(void)
{
FILE *fp;
@@ -3512,8 +3461,7 @@ static int mob_readdb(void)
#ifndef TXT_ONLY
/*==========================================
* SQL reading
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_read_sqldb(void)
{
char *mob_db_name[] = { mob_db_db, mob_db2_db };
@@ -3548,8 +3496,7 @@ static int mob_read_sqldb(void)
/*==========================================
* MOB display graphic change data reading
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_readdb_mobavail(void)
{
FILE *fp;
@@ -3620,8 +3567,7 @@ static int mob_readdb_mobavail(void)
/*==========================================
* Reading of random monster data
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_read_randommonster(void)
{
FILE *fp;
@@ -3670,8 +3616,7 @@ static int mob_read_randommonster(void)
/*==========================================
* mob_skill_db.txt reading
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_readskilldb(void)
{
FILE *fp;
@@ -3960,8 +3905,7 @@ static int mob_readskilldb(void)
}
/*==========================================
* mob_race_db.txt reading
- *------------------------------------------
- */
+ *------------------------------------------*/
static int mob_readdb_race(void)
{
FILE *fp;
@@ -4035,8 +3979,7 @@ void mob_reload(void)
/*==========================================
* Circumference initialization of mob
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_mob(void)
{ //Initialize the mob database
memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array
@@ -4072,8 +4015,7 @@ int do_init_mob(void)
/*==========================================
* Clean memory usage.
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_final_mob(void)
{
int i;
diff --git a/src/map/npc.c b/src/map/npc.c
index 49cb4f1a0..f037bea2d 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -82,8 +82,7 @@ struct view_data* npc_get_viewdata(int class_)
* NPCの無効化/有効化
* npc_enable
* npc_enable_sub 有効時にOnTouchイベントを実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_enable_sub( struct block_list *bl, va_list ap )
{
struct map_session_data *sd;
@@ -141,8 +140,7 @@ int npc_enable(const char *name,int flag)
/*==========================================
* NPCを名前で探す
- *------------------------------------------
- */
+ *------------------------------------------*/
struct npc_data* npc_name2id(const char *name)
{
return (struct npc_data *) strdb_get(npcname_db,(unsigned char*)name);
@@ -150,8 +148,7 @@ struct npc_data* npc_name2id(const char *name)
/*==========================================
* イベントキューのイベント処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_dequeue(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -187,8 +184,7 @@ int npc_event_dequeue(struct map_session_data *sd)
/*==========================================
* イベントの遅延実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_timer(int tid,unsigned int tick,int id,int data)
{
unsigned char *eventname = (unsigned char *)data;
@@ -278,11 +274,11 @@ int npc_timer(int tid,unsigned int tick,int id,int data) // Added by RoVeRT
aFree((void*)data);
return 0;
}*/
+
/*==========================================
* イベント用ラベルのエクスポート
* npc_parse_script->strdb_foreachから呼ばれる
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_export(char *lname,void *data,va_list ap)
{
int pos=(int)data;
@@ -315,8 +311,7 @@ int npc_event_export(char *lname,void *data,va_list ap)
int npc_event_sub(struct map_session_data *, struct event_data *, const unsigned char *); //[Lance]
/*==========================================
* 全てのNPCのOn*イベント実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_doall_sub(DBKey key,void *data,va_list ap)
{
const char*p = key.str;
@@ -393,8 +388,7 @@ int npc_event_do(const unsigned char *name)
/*==========================================
* 時計イベント実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
{
time_t timer;
@@ -437,8 +431,7 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
}
/*==========================================
* OnInitイベント実行(&時計イベント開始)
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event_do_oninit(void)
{
// int c = npc_event_doall("OnInit");
@@ -452,8 +445,7 @@ int npc_event_do_oninit(void)
}
/*==========================================
* OnTimer NPC event - by RoVeRT
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_addeventtimer(struct npc_data *nd,int tick,const char *name)
{
int i;
@@ -542,8 +534,7 @@ int npc_do_ontimer(int npc_id, int option)
/*==========================================
* タイマーイベント用ラベルの取り込み
* npc_parse_script->strdb_foreachから呼ばれる
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_timerevent_import(char *lname,void *data,va_list ap)
{
int pos=(int)data;
@@ -582,8 +573,7 @@ struct timer_event_data {
/*==========================================
* タイマーイベント実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_timerevent(int tid,unsigned int tick,int id,int data)
{
int next,t,old_rid,old_timer;
@@ -643,8 +633,7 @@ int npc_timerevent(int tid,unsigned int tick,int id,int data)
}
/*==========================================
* タイマーイベント開始
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_timerevent_start(struct npc_data *nd, int rid)
{
int j,n, next;
@@ -700,8 +689,7 @@ int npc_timerevent_start(struct npc_data *nd, int rid)
}
/*==========================================
* タイマーイベント終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_timerevent_stop(struct npc_data *nd)
{
struct map_session_data *sd =NULL;
@@ -733,9 +721,9 @@ int npc_timerevent_stop(struct npc_data *nd)
}
/*==========================================
* Aborts a running npc timer that is attached to a player.
- *------------------------------------------
- */
-void npc_timerevent_quit(struct map_session_data *sd) {
+ *------------------------------------------*/
+void npc_timerevent_quit(struct map_session_data *sd)
+{
struct TimerData *td;
struct npc_data* nd;
struct timer_event_data *ted;
@@ -787,8 +775,7 @@ void npc_timerevent_quit(struct map_session_data *sd) {
/*==========================================
* タイマー値の所得
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_gettimerevent_tick(struct npc_data *nd)
{
int tick;
@@ -801,8 +788,7 @@ int npc_gettimerevent_tick(struct npc_data *nd)
}
/*==========================================
* タイマー値の設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_settimerevent_tick(struct npc_data *nd,int newtimer)
{
int flag;
@@ -829,8 +815,8 @@ int npc_settimerevent_tick(struct npc_data *nd,int newtimer)
return 0;
}
-int npc_event_sub(struct map_session_data *sd, struct event_data *ev, const unsigned char *eventname){
-
+int npc_event_sub(struct map_session_data *sd, struct event_data *ev, const unsigned char *eventname)
+{
if ( sd->npc_id!=0) {
//Enqueue the event trigger.
int i;
@@ -854,8 +840,7 @@ int npc_event_sub(struct map_session_data *sd, struct event_data *ev, const unsi
/*==========================================
* イベント型のNPC処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_event (struct map_session_data *sd, const unsigned char *eventname, int mob_kill)
{
struct event_data *ev=strdb_get(ev_db,(unsigned char*)eventname);
@@ -932,8 +917,7 @@ int npc_command(struct map_session_data* sd, const char* npcname, const char* co
}
/*==========================================
* 接触型のNPC処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y)
{
int i,f=1;
@@ -1098,8 +1082,7 @@ int npc_check_areanpc(int flag,int m,int x,int y,int range)
/*==========================================
* 近くかどうかの判定
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_checknear2(struct map_session_data *sd,struct block_list *bl)
{
nullpo_retr(1, sd);
@@ -1144,8 +1127,7 @@ TBL_NPC *npc_checknear(struct map_session_data *sd,struct block_list *bl)
/*==========================================
* NPCのオープンチャット発言
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_globalmessage(const char *name,const char *mes)
{
struct npc_data *nd=(struct npc_data *) strdb_get(npcname_db,(unsigned char*)name);
@@ -1162,8 +1144,7 @@ int npc_globalmessage(const char *name,const char *mes)
/*==========================================
* クリック時のNPC処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_click(struct map_session_data *sd,struct npc_data *nd)
{
nullpo_retr(1, sd);
@@ -1195,8 +1176,7 @@ int npc_click(struct map_session_data *sd,struct npc_data *nd)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_scriptcont(struct map_session_data *sd,int id)
{
nullpo_retr(1, sd);
@@ -1223,8 +1203,7 @@ int npc_scriptcont(struct map_session_data *sd,int id)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_buysellsel(struct map_session_data *sd,int id,int type)
{
struct npc_data *nd;
@@ -1254,9 +1233,7 @@ int npc_buysellsel(struct map_session_data *sd,int id,int type)
}
//npc_buylist for script-controlled shops.
-static int npc_buylist_sub(
- struct map_session_data *sd,int n,
- unsigned short *item_list, struct npc_data *nd)
+static int npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd)
{
unsigned char npc_ev[51];
int i;
@@ -1273,8 +1250,7 @@ static int npc_buylist_sub(
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
{
struct npc_data *nd;
@@ -1371,8 +1347,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
{
double z;
@@ -1498,7 +1473,8 @@ int npc_remove_map(struct npc_data *nd)
return 0;
}
-static int npc_unload_ev(DBKey key,void *data,va_list ap) {
+static int npc_unload_ev(DBKey key,void *data,va_list ap)
+{
struct event_data *ev=(struct event_data *)data;
unsigned char *npcname=va_arg(ap,unsigned char *);
@@ -1654,8 +1630,7 @@ void npc_delsrcfile(const char* name)
/*==========================================
* warp行解析
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_parse_warp (char *w1,char *w2,char *w3,char *w4)
{
int x, y, xs, ys, to_x, to_y, m;
@@ -1717,8 +1692,7 @@ int npc_parse_warp (char *w1,char *w2,char *w3,char *w4)
/*==========================================
* shop行解析
- *------------------------------------------
- */
+ *------------------------------------------*/
static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4)
{
#define MAX_SHOPITEM 100
@@ -1816,8 +1790,7 @@ static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4)
/*==========================================
* NPCのラベルデータコンバート
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_convertlabel_db (DBKey key, void *data, va_list ap)
{
const char *lname = (const char*)key.str;
@@ -1861,9 +1834,9 @@ int npc_convertlabel_db (DBKey key, void *data, va_list ap)
/*==========================================
* script行解析
- *------------------------------------------
- */
-static void npc_parse_script_line(unsigned char *p,int *curly_count,int line) {
+ *------------------------------------------*/
+static void npc_parse_script_line(unsigned char *p,int *curly_count,int line)
+{
int i = strlen((char *)p),j;
int string_flag = 0;
static int comment_flag = 0;
@@ -2277,8 +2250,7 @@ void npc_movenpc(struct npc_data *nd, int x, int y)
}
/*==========================================
* function行解析
- *------------------------------------------
- */
+ *------------------------------------------*/
static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, char *first_line, FILE *fp, int *lines,const char* file)
{
unsigned char *srcbuf, *p;
@@ -2360,8 +2332,7 @@ static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, char *fir
* If cached =1, it is a dynamic cached mob
* index points to the index in the mob_list of the map_data cache.
* -1 indicates that it is not stored on the map.
- *------------------------------------------
- */
+ *------------------------------------------*/
int npc_parse_mob2 (struct spawn_data *mob, int index)
{
int i;
@@ -2511,8 +2482,7 @@ int npc_parse_mob (char *w1, char *w2, char *w3, char *w4)
/*==========================================
* マップフラグ行の解析
- *------------------------------------------
- */
+ *------------------------------------------*/
static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
{
int m;
@@ -2765,8 +2735,7 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
/*==========================================
* Setting up map cells
- *------------------------------------------
- */
+ *------------------------------------------*/
static int npc_parse_mapcell (char *w1, char *w2, char *w3, char *w4)
{
int m, cell, x, y, x0, y0, x1, y1;
@@ -2976,10 +2945,9 @@ void npc_read_event_script(void)
/*==========================================
*
- *------------------------------------------
- */
-
-static int npc_cleanup_sub (struct block_list *bl, va_list ap) {
+ *------------------------------------------*/
+static int npc_cleanup_sub (struct block_list *bl, va_list ap)
+{
nullpo_retr(0, bl);
switch(bl->type) {
@@ -2994,7 +2962,8 @@ static int npc_cleanup_sub (struct block_list *bl, va_list ap) {
return 0;
}
-static int npc_cleanup_dbsub(DBKey key,void * data,va_list ap) {
+static int npc_cleanup_dbsub(DBKey key,void * data,va_list ap)
+{
return npc_cleanup_sub((struct block_list*)data, 0);
}
@@ -3073,8 +3042,7 @@ int npc_reload (void)
/*==========================================
* 終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_final_npc(void)
{
int i;
@@ -3134,8 +3102,7 @@ static void npc_debug_warps(void)
/*==========================================
* npc初期化
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_npc(void)
{
struct npc_src_list *file;
@@ -3223,7 +3190,8 @@ int do_init_npc(void)
return 0;
}
// [Lance]
-int npc_changename(const char *name, const char *newname, short look){
+int npc_changename(const char *name, const char *newname, short look)
+{
struct npc_data *nd= (struct npc_data *) strdb_remove(npcname_db,(unsigned char*)name);
if (nd==NULL)
return 0;
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index fa184b624..7d3a9a2fa 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -113,7 +113,8 @@ struct npc_parse {
* This does NOT do the list management
*/
-void finalize_pcrematch_entry(struct pcrematch_entry *e) {
+void finalize_pcrematch_entry(struct pcrematch_entry *e)
+{
//TODO: For some odd reason this causes a already-free'd error under Windows, but not *nix! [Skotlex]
#ifndef _WIN32
if (e->pcre_) {
@@ -176,7 +177,8 @@ static struct pcrematch_set * lookup_pcreset(struct npc_data *nd,int setid)
* if the setid does not exist, this will silently return
*/
-static void activate_pcreset(struct npc_data *nd,int setid) {
+static void activate_pcreset(struct npc_data *nd,int setid)
+{
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
if (npcParse == NULL)
@@ -209,7 +211,8 @@ static void activate_pcreset(struct npc_data *nd,int setid) {
* if the setid does not exist, this will silently return
*/
-static void deactivate_pcreset(struct npc_data *nd,int setid) {
+static void deactivate_pcreset(struct npc_data *nd,int setid)
+{
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
if (npcParse == NULL)
@@ -244,7 +247,8 @@ static void deactivate_pcreset(struct npc_data *nd,int setid) {
/**
* delete a set of patterns.
*/
-static void delete_pcreset(struct npc_data *nd,int setid) {
+static void delete_pcreset(struct npc_data *nd,int setid)
+{
int active = 1;
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
@@ -294,7 +298,8 @@ static void delete_pcreset(struct npc_data *nd,int setid) {
/**
* create a new pattern entry
*/
-static struct pcrematch_entry *create_pcrematch_entry(struct pcrematch_set * set) {
+static struct pcrematch_entry *create_pcrematch_entry(struct pcrematch_set * set)
+{
struct pcrematch_entry * e = (struct pcrematch_entry *)
aCalloc(sizeof(struct pcrematch_entry), 1);
struct pcrematch_entry * last = set->head_;
@@ -476,7 +481,8 @@ int mob_chat_sub(struct block_list *bl, va_list ap){
// Various script builtins used to support these functions
-int buildin_defpattern(struct script_state *st) {
+int buildin_defpattern(struct script_state *st)
+{
int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
const char *pattern=conv_str(st,& (st->stack->stack_data[st->start+3]));
const char *label=conv_str(st,& (st->stack->stack_data[st->start+4]));
@@ -487,7 +493,8 @@ int buildin_defpattern(struct script_state *st) {
return 0;
}
-int buildin_activatepset(struct script_state *st) {
+int buildin_activatepset(struct script_state *st)
+{
int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
@@ -496,7 +503,8 @@ int buildin_activatepset(struct script_state *st) {
return 0;
}
-int buildin_deactivatepset(struct script_state *st) {
+int buildin_deactivatepset(struct script_state *st)
+{
int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
@@ -505,7 +513,8 @@ int buildin_deactivatepset(struct script_state *st) {
return 0;
}
-int buildin_deletepset(struct script_state *st) {
+int buildin_deletepset(struct script_state *st)
+{
int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
diff --git a/src/map/party.c b/src/map/party.c
index 87f75633b..4c1f512cd 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -30,9 +30,9 @@ int party_send_xy_timer(int tid,unsigned int tick,int id,int data);
/*==========================================
* Fills the given party_member structure according to the sd provided.
* Used when creating/adding people to a party. [Skotlex]
- *------------------------------------------
- */
-static void party_fill_member(struct party_member *member, struct map_session_data *sd) {
+ *------------------------------------------*/
+static void party_fill_member(struct party_member *member, struct map_session_data *sd)
+{
member->account_id = sd->status.account_id;
member->char_id = sd->status.char_id;
memcpy(member->name, sd->status.name, NAME_LENGTH);
@@ -45,8 +45,7 @@ static void party_fill_member(struct party_member *member, struct map_session_da
/*==========================================
* 終了
- *------------------------------------------
- */
+ *------------------------------------------*/
void do_final_party(void)
{
party_db->destroy(party_db,NULL);
@@ -182,7 +181,8 @@ int party_recv_noinfo(int party_id)
return 0;
}
-static void* create_party(DBKey key, va_list args) {
+static void* create_party(DBKey key, va_list args)
+{
struct party_data *p;
p=(struct party_data *)aCalloc(1,sizeof(struct party_data));
return p;
diff --git a/src/map/path.c b/src/map/path.c
index 79200a877..d79238b87 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -32,8 +32,7 @@ const char walk_choices [3][3] =
/*==========================================
* 経路探索補助heap push
- *------------------------------------------
- */
+ *------------------------------------------*/
static void push_heap_path(int *heap,struct tmp_path *tp,int index)
{
int i,h;
@@ -50,8 +49,7 @@ static void push_heap_path(int *heap,struct tmp_path *tp,int index)
/*==========================================
* 経路探索補助heap update
* costが減ったので根の方へ移動
- *------------------------------------------
- */
+ *------------------------------------------*/
static void update_heap_path(int *heap,struct tmp_path *tp,int index)
{
int i,h;
@@ -72,8 +70,7 @@ static void update_heap_path(int *heap,struct tmp_path *tp,int index)
/*==========================================
* 経路探索補助heap pop
- *------------------------------------------
- */
+ *------------------------------------------*/
static int pop_heap_path(int *heap,struct tmp_path *tp)
{
int i,h,k;
@@ -104,8 +101,7 @@ static int pop_heap_path(int *heap,struct tmp_path *tp)
/*==========================================
* 現在の点のcost計算
- *------------------------------------------
- */
+ *------------------------------------------*/
static int calc_cost(struct tmp_path *p,int x1,int y1)
{
int xd,yd;
@@ -119,8 +115,7 @@ static int calc_cost(struct tmp_path *p,int x1,int y1)
/*==========================================
* 必要ならpathを追加/修正する
- *------------------------------------------
- */
+ *------------------------------------------*/
static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int before,int cost)
{
int i;
@@ -159,8 +154,7 @@ static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int befor
/*==========================================
* (x,y)が移動不可能地帯かどうか
* flag 0x10000 遠距離攻撃判定
- *------------------------------------------
- */
+ *------------------------------------------*/
static int can_place(struct map_data *m,int x,int y,int flag)
{
if(map_getcellp(m,x,y,CELL_CHKPASS))
@@ -177,8 +171,7 @@ static int can_place(struct map_data *m,int x,int y,int flag)
/*==========================================
* (x0,y0)から(x1,y1)へ1歩で移動可能か計算
- *------------------------------------------
- */
+ *------------------------------------------*/
static int can_move(struct map_data *m,int x0,int y0,int x1,int y1,int flag)
{
if(x1<0 || y1<0 || x1>=m->xs || y1>=m->ys)
@@ -202,8 +195,7 @@ static int can_move(struct map_data *m,int x0,int y0,int x1,int y1,int flag)
/*==========================================
* (x0,y0)から(dx,dy)方向へcountセル分
* 吹き飛ばしたあとの座標を所得
- *------------------------------------------
- */
+ *------------------------------------------*/
int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
{
struct map_data *md;
@@ -243,8 +235,7 @@ int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
/*==========================================
* 遠距離攻撃が可能かどうかを返す
- *------------------------------------------
- */
+ *------------------------------------------*/
int path_search_long_real(struct shootpath_data *spd,int m,int x0,int y0,int x1,int y1,cell_t flag)
{
int dx, dy;
@@ -312,9 +303,7 @@ int path_search_long_real(struct shootpath_data *spd,int m,int x0,int y0,int x1,
/*==========================================
* path探索 (x0,y0)->(x1,y1)
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int path_search_real(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int flag,cell_t flag2)
{
int heap[MAX_HEAP+1];
@@ -483,12 +472,8 @@ int path_search_real(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1
}
/*==========================================
-
* path探索 (x0,y0)->(x1,y1)
-
- *------------------------------------------
-
- */
+ *------------------------------------------*/
#ifdef PATH_STANDALONETEST
char gat[64][64]={
@@ -502,8 +487,7 @@ struct map_data map[1];
/*==========================================
* 経路探索ルーチン単体テスト用main関数
- *------------------------------------------
- */
+ *------------------------------------------*/
void main(int argc,char *argv[])
{
struct walkpath_data wpd;
diff --git a/src/map/pc.c b/src/map/pc.c
index dd031aadb..2990e655e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -68,7 +68,8 @@ char motd_text[MOTD_LINE_SIZE][256]; // Message of the day buffer [Valaris]
static const char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
static const char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"};
-int pc_isGM(struct map_session_data *sd) {
+int pc_isGM(struct map_session_data *sd)
+{
int i;
nullpo_retr(0, sd);
@@ -83,7 +84,8 @@ int pc_isGM(struct map_session_data *sd) {
}
-int pc_set_gm_level(int account_id, int level) {
+int pc_set_gm_level(int account_id, int level)
+{
int i;
for (i = 0; i < GM_num; i++) {
if (account_id == gm_account[i].account_id) {
@@ -99,7 +101,8 @@ int pc_set_gm_level(int account_id, int level) {
return 0;
}
-static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
+static int pc_invincible_timer(int tid,unsigned int tick,int id,int data)
+{
struct map_session_data *sd;
if( (sd=(struct map_session_data *)map_id2sd(id)) == NULL || sd->bl.type!=BL_PC )
@@ -116,7 +119,8 @@ static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
return 0;
}
-int pc_setinvincibletimer(struct map_session_data *sd,int val) {
+int pc_setinvincibletimer(struct map_session_data *sd,int val)
+{
nullpo_retr(0, sd);
if(sd->invincible_timer != INVALID_TIMER)
@@ -125,13 +129,15 @@ int pc_setinvincibletimer(struct map_session_data *sd,int val) {
return 0;
}
-void pc_delinvincibletimer_sub(struct map_session_data *sd) {
+void pc_delinvincibletimer_sub(struct map_session_data *sd)
+{
delete_timer(sd->invincible_timer,pc_invincible_timer);
sd->invincible_timer = INVALID_TIMER;
skill_unit_move(&sd->bl,gettick(),1);
}
-static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
+static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data)
+{
struct map_session_data *sd;
if( (sd=(struct map_session_data *)map_id2sd(id)) == NULL || sd->bl.type!=BL_PC )
@@ -161,7 +167,8 @@ static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
return 0;
}
-int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
+int pc_addspiritball(struct map_session_data *sd,int interval,int max)
+{
nullpo_retr(0, sd);
if(max > MAX_SKILL_LEVEL)
@@ -185,7 +192,8 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
return 0;
}
-int pc_delspiritball(struct map_session_data *sd,int count,int type) {
+int pc_delspiritball(struct map_session_data *sd,int count,int type)
+{
int i;
nullpo_retr(0, sd);
@@ -219,7 +227,8 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type) {
}
// Increases a player's fame points and displays a notice to him
-void pc_addfame(struct map_session_data *sd,int count) {
+void pc_addfame(struct map_session_data *sd,int count)
+{
nullpo_retv(sd);
sd->status.fame += count;
if(sd->status.fame > MAX_FAME)
@@ -239,9 +248,10 @@ void pc_addfame(struct map_session_data *sd,int count) {
}
// Check whether a player ID is in the fame rankers' list of its job, returns his/her position if so, 0 else
-unsigned char pc_famerank(int char_id,int job) {
- int i;
-
+unsigned char pc_famerank(int char_id,int job)
+{
+ int i;
+
switch(job){
case MAPID_BLACKSMITH: // Blacksmith
for(i = 0; i < MAX_FAME_LIST; i++){
@@ -266,7 +276,8 @@ unsigned char pc_famerank(int char_id,int job) {
return 0;
}
-int pc_setrestartvalue(struct map_session_data *sd,int type) {
+int pc_setrestartvalue(struct map_session_data *sd,int type)
+{
struct status_data *status, *b_status;
nullpo_retr(0, sd);
@@ -296,17 +307,16 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
* Returns
1 = this GM can't do it
0 = this one can do it
- *------------------------------------------
- */
-int pc_can_give_items(int level) {
+ *------------------------------------------*/
+int pc_can_give_items(int level)
+{
return ( level >= battle_config.gm_cant_drop_min_lv
&& level <= battle_config.gm_cant_drop_max_lv);
}
/*==========================================
* prepares character for saving.
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_makesavestatus(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -356,9 +366,9 @@ int pc_makesavestatus(struct map_session_data *sd)
/*==========================================
* 接?暫フ初期化
- *------------------------------------------
- */
-int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) {
+ *------------------------------------------*/
+int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd)
+{
nullpo_retr(0, sd);
sd->bl.id = account_id;
@@ -567,8 +577,7 @@ int pc_isequip(struct map_session_data *sd,int n)
/*==========================================
* session idに問題無し
* char鯖から送られてきたステ?タスを設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_time, struct mmo_charstatus *st)
{
TBL_PC* old_sd;
@@ -757,10 +766,9 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
/*==========================================
* Closes a connection because it failed to be authenticated from the char server.
- *------------------------------------------
- */
-int pc_authfail(struct map_session_data *sd) {
-
+ *------------------------------------------*/
+int pc_authfail(struct map_session_data *sd)
+{
if (sd->state.auth) //Temporary debug. [Skotlex]
ShowDebug("pc_authfail: Received auth fail for already authentified client (account id %d)!\n", sd->bl.id);
@@ -799,8 +807,7 @@ int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
/*==========================================
* Invoked once after the char/account/account2 registry variables are received. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_reg_received(struct map_session_data *sd)
{
int i,j;
@@ -912,8 +919,7 @@ static int pc_calc_skillpoint(struct map_session_data* sd)
/*==========================================
* ?えられるスキルの計算
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_calc_skilltree(struct map_session_data *sd)
{
int i,id=0,flag;
@@ -1032,7 +1038,8 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
//Checks if you can learn a new skill after having leveled up a skill.
-static void pc_check_skilltree(struct map_session_data *sd, int skill) {
+static void pc_check_skilltree(struct map_session_data *sd, int skill)
+{
int i,id=0,flag;
int c=0;
@@ -1092,7 +1099,8 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill) {
// Make sure all the skills are in the correct condition
// before persisting to the backend.. [MouseJstr]
-int pc_clean_skilltree(struct map_session_data *sd) {
+int pc_clean_skilltree(struct map_session_data *sd)
+{
int i;
for (i = 0; i < MAX_SKILL; i++){
if (sd->status.skill[i].flag == 13 || sd->status.skill[i].flag == 1)
@@ -1109,7 +1117,8 @@ int pc_clean_skilltree(struct map_session_data *sd) {
return 0;
}
-int pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
+int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
+{
int skill_point;
int c = sd->class_;
@@ -1173,7 +1182,8 @@ int pc_updateweightstatus(struct map_session_data *sd)
return 0;
}
-int pc_disguise(struct map_session_data *sd, int class_) {
+int pc_disguise(struct map_session_data *sd, int class_)
+{
if (!class_ && !sd->disguise)
return 0;
if (class_ && (sd->disguise == class_ || pc_isriding(sd)))
@@ -1206,7 +1216,8 @@ int pc_disguise(struct map_session_data *sd, int class_) {
return 1;
}
-static int pc_bonus_autospell_del(struct s_autospell *spell, int max, short id, short lv, short rate, short card_id) {
+static int pc_bonus_autospell_del(struct s_autospell *spell, int max, short id, short lv, short rate, short card_id)
+{
int i, j;
for(i=max-1; i>=0 && !spell[i].id; i--);
if (i<0) return 0; //Nothing to substract from.
@@ -1236,7 +1247,8 @@ static int pc_bonus_autospell_del(struct s_autospell *spell, int max, short id,
return rate;
}
-static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) {
+static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id)
+{
int i;
if (rate < 0) return //Remove the autobonus.
pc_bonus_autospell_del(spell, max, id, lv, -rate, card_id);
@@ -1272,7 +1284,8 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor
return 1;
}
-static int pc_bonus_addeff(struct s_addeffect *effect, int max, short id, short rate, short arrow_rate, unsigned char flag) {
+static int pc_bonus_addeff(struct s_addeffect *effect, int max, short id, short rate, short arrow_rate, unsigned char flag)
+{
int i;
for (i = 0; i < max && effect[i].flag; i++) {
if (effect[i].id == id && effect[i].flag == flag)
@@ -1294,7 +1307,8 @@ static int pc_bonus_addeff(struct s_addeffect *effect, int max, short id, short
return 1;
}
-static int pc_bonus_item_drop(struct s_add_drop *drop, short *count, short id, short group, int race, int rate) {
+static int pc_bonus_item_drop(struct s_add_drop *drop, short *count, short id, short group, int race, int rate)
+{
int i;
//Apply config rate adjustment settings.
if (rate >= 0) { //Absolute drop.
@@ -1345,8 +1359,7 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, short *count, short id, s
/*==========================================
* ? 備品による能力等のボ?ナス設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_bonus(struct map_session_data *sd,int type,int val)
{
struct status_data *status;
@@ -1895,8 +1908,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
/*==========================================
* ? 備品による能力等のボ?ナス設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
{
int i;
@@ -2474,8 +2486,7 @@ int pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type4
* as the other two are assumed to be invoked from within it)
* 1 - Grant an item skill (temporary)
* 2 - Like 1, except the level granted can stack with previously learned level.
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_skill(TBL_PC* sd, int id, int level, int flag)
{
nullpo_retr(0, sd);
@@ -2525,8 +2536,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag)
}
/*==========================================
* カ?ド?入
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip)
{
int i, ep;
@@ -2578,8 +2588,7 @@ int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip)
/*==========================================
* スキルによる買い値修正
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate1 = 0,rate2 = 0;
@@ -2598,8 +2607,7 @@ int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
/*==========================================
* スキルによる?り値修正
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate = 0;
@@ -2616,8 +2624,7 @@ int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
/*==========================================
* アイテムを買った暫ノ、新しいアイテム欄を使うか、
* 3万個制限にかかるか確認
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
{
int i;
@@ -2642,8 +2649,7 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
/*==========================================
* 空きアイテム欄の個?
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_inventoryblank(struct map_session_data *sd)
{
int i,b;
@@ -2660,8 +2666,7 @@ int pc_inventoryblank(struct map_session_data *sd)
/*==========================================
* お金を?う
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_payzeny(struct map_session_data *sd,int zeny)
{
nullpo_retr(0, sd);
@@ -2683,8 +2688,7 @@ int pc_payzeny(struct map_session_data *sd,int zeny)
/*==========================================
* お金を得る
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_getzeny(struct map_session_data *sd,int zeny)
{
nullpo_retr(0, sd);
@@ -2711,8 +2715,7 @@ int pc_getzeny(struct map_session_data *sd,int zeny)
/*==========================================
* アイテムを探して、インデックスを返す
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_search_inventory(struct map_session_data *sd,int item_id)
{
int i;
@@ -2730,8 +2733,7 @@ int pc_search_inventory(struct map_session_data *sd,int item_id)
/*==========================================
* アイテム追加。個?のみitem構造?の?字を無視
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
{
struct item_data *data;
@@ -2794,8 +2796,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
/*==========================================
* アイテムを減らす
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_delitem(struct map_session_data *sd,int n,int amount,int type)
{
nullpo_retr(1, sd);
@@ -2821,8 +2822,7 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type)
/*==========================================
* アイテムを落す
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_dropitem(struct map_session_data *sd,int n,int amount)
{
nullpo_retr(1, sd);
@@ -2865,8 +2865,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
/*==========================================
* アイテムを拾う
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
{
int flag=0;
@@ -3012,8 +3011,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
/*==========================================
* アイテムを使う
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_useitem(struct map_session_data *sd,int n)
{
unsigned int tick = gettick();
@@ -3076,8 +3074,7 @@ int pc_useitem(struct map_session_data *sd,int n)
/*==========================================
* カ?トアイテム追加。個?のみitem構造?の?字を無視
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amount)
{
struct item_data *data;
@@ -3137,8 +3134,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
/*==========================================
* カ?トアイテムを減らす
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type)
{
nullpo_retr(1, sd);
@@ -3166,8 +3162,7 @@ int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type)
/*==========================================
* カ?トへアイテム移動
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) {
struct item *item_data;
@@ -3189,8 +3184,7 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) {
/*==========================================
* カ?ト?のアイテム?確認(個?の差分を返す)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_cartitem_amount(struct map_session_data *sd,int idx,int amount)
{
struct item *item_data;
@@ -3204,9 +3198,7 @@ int pc_cartitem_amount(struct map_session_data *sd,int idx,int amount)
}
/*==========================================
* カ?トからアイテム移動
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
{
struct item *item_data;
@@ -3230,8 +3222,7 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
/*==========================================
* スティル品公開
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_show_steal(struct block_list *bl,va_list ap)
{
struct map_session_data *sd;
@@ -3253,9 +3244,7 @@ int pc_show_steal(struct block_list *bl,va_list ap)
}
/*==========================================
*
- *------------------------------------------
- */
-//** pc.c:
+ *------------------------------------------*/
int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
{
int i,rate,itemid,flag;
@@ -3338,8 +3327,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
{
int rate,skill;
@@ -3374,8 +3362,7 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
* 1 - Invalid map index.
* 2 - Map not in this map-server, and failed to locate alternate map-server.
* 3 - Failed to warp player because it was in transition between maps.
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,int clrtype)
{
int m;
@@ -3503,9 +3490,9 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
/*==========================================
* PCのランダムワ?プ
- *------------------------------------------
- */
-int pc_randomwarp(struct map_session_data *sd, int type) {
+ *------------------------------------------*/
+int pc_randomwarp(struct map_session_data *sd, int type)
+{
int x,y,i=0;
int m;
@@ -3529,9 +3516,9 @@ int pc_randomwarp(struct map_session_data *sd, int type) {
/*==========================================
* 現在位置のメモ
- *------------------------------------------
- */
-int pc_memo(struct map_session_data *sd, int i) {
+ *------------------------------------------*/
+int pc_memo(struct map_session_data *sd, int i)
+{
int skill;
int j;
@@ -3583,8 +3570,7 @@ int pc_memo(struct map_session_data *sd, int i) {
//
/*==========================================
* スキルの?索 所有していた場合Lvが返る
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_checkskill(struct map_session_data *sd,int skill_id)
{
if(sd == NULL) return 0;
@@ -3609,8 +3595,7 @@ int pc_checkskill(struct map_session_data *sd,int skill_id)
* 返り値:
* 0 ?更なし
* -1 スキルを解除
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_checkallowskill(struct map_session_data *sd)
{
const int scw_list[] = {
@@ -3656,8 +3641,7 @@ int pc_checkallowskill(struct map_session_data *sd)
/*==========================================
* ? 備品のチェック
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_checkequip(struct map_session_data *sd,int pos)
{
int i;
@@ -3675,8 +3659,7 @@ int pc_checkequip(struct map_session_data *sd,int pos)
/*==========================================
* Convert's from the client's lame Job ID system
* to the map server's 'makes sense' system. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_jobid2mapid(unsigned short b_class)
{
int class_ = 0;
@@ -3768,7 +3751,8 @@ int pc_jobid2mapid(unsigned short b_class)
}
//Reverts the map-style class id to the client-style one.
-int pc_mapid2jobid(unsigned short class_, int sex) {
+int pc_mapid2jobid(unsigned short class_, int sex)
+{
switch(class_) {
case MAPID_NOVICE:
return JOB_NOVICE;
@@ -3917,9 +3901,9 @@ int pc_mapid2jobid(unsigned short class_, int sex) {
/*====================================================
* This function return the name of the job (by [Yor])
- *----------------------------------------------------
- */
-char * job_name(int class_) {
+ *----------------------------------------------------*/
+char* job_name(int class_)
+{
switch (class_) {
case JOB_NOVICE:
case JOB_SWORDMAN:
@@ -4207,8 +4191,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
/*==========================================
* Alters experienced based on self bonuses that do not get even shared to the party.
- *------------------------------------------
- */
+ *------------------------------------------*/
static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src)
{
int bonus = 0;
@@ -4256,8 +4239,7 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi
}
/*==========================================
* ??値取得
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp)
{
char output[256];
@@ -4331,21 +4313,20 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
/*==========================================
* Returns max level for this character.
- *------------------------------------------
- */
-
-unsigned int pc_maxbaselv(struct map_session_data *sd) {
+ *------------------------------------------*/
+unsigned int pc_maxbaselv(struct map_session_data *sd)
+{
return max_level[sd->status.class_][0];
};
-unsigned int pc_maxjoblv(struct map_session_data *sd) {
+unsigned int pc_maxjoblv(struct map_session_data *sd)
+{
return max_level[sd->status.class_][1];
};
/*==========================================
* base level側必要??値計算
- *------------------------------------------
- */
+ *------------------------------------------*/
unsigned int pc_nextbaseexp(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -4358,8 +4339,7 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
/*==========================================
* job level側必要??値計算
- *------------------------------------------
- */
+ *------------------------------------------*/
unsigned int pc_nextjobexp(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -4370,10 +4350,8 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
}
/*==========================================
-
* 必要ステ?タスポイント計算
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_need_status_point(struct map_session_data *sd,int type)
{
int val;
@@ -4394,8 +4372,7 @@ int pc_need_status_point(struct map_session_data *sd,int type)
/*==========================================
* 能力値成長
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_statusup(struct map_session_data *sd,int type)
{
int max, need,val = 0;
@@ -4467,8 +4444,7 @@ int pc_statusup(struct map_session_data *sd,int type)
/*==========================================
* 能力値成長
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_statusup2(struct map_session_data *sd,int type,int val)
{
int max;
@@ -4544,8 +4520,7 @@ int pc_statusup2(struct map_session_data *sd,int type,int val)
/*==========================================
* スキルポイント割り振り
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_skillup(struct map_session_data *sd,int skill_num)
{
nullpo_retr(0, sd);
@@ -4584,8 +4559,7 @@ int pc_skillup(struct map_session_data *sd,int skill_num)
/*==========================================
* /allskill
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_allskillup(struct map_session_data *sd)
{
int i,id;
@@ -4633,8 +4607,7 @@ int pc_allskillup(struct map_session_data *sd)
/*==========================================
* /resetlvl
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_resetlvl(struct map_session_data* sd,int type)
{
int i;
@@ -4719,8 +4692,7 @@ int pc_resetlvl(struct map_session_data* sd,int type)
}
/*==========================================
* /resetstate
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_resetstate(struct map_session_data* sd)
{
nullpo_retr(0, sd);
@@ -4790,8 +4762,7 @@ int pc_resetstate(struct map_session_data* sd)
* /resetskill
* if flag&1, perform block resync and status_calc call.
* if flag&2, just count total amount of skill points used by player, do not really reset.
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_resetskill(struct map_session_data* sd, int flag)
{
int i, lv, inf2, skill_point=0;
@@ -4862,8 +4833,7 @@ int pc_resetskill(struct map_session_data* sd, int flag)
/*==========================================
* /resetfeel [Komurka]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_resetfeel(struct map_session_data* sd)
{
int i;
@@ -4906,8 +4876,7 @@ static int pc_respawn(int tid,unsigned int tick,int id,int data)
/*==========================================
* Invoked when a player has received damage
- *------------------------------------------
- */
+ *------------------------------------------*/
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
if (sp) clif_updatestatus(sd,SP_SP);
@@ -5280,8 +5249,7 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp)
//
/*==========================================
* script用PCステ?タス?み出し
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_readparam(struct map_session_data *sd,int type)
{
int val=0;
@@ -5383,8 +5351,7 @@ int pc_readparam(struct map_session_data *sd,int type)
/*==========================================
* script用PCステ?タス設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setparam(struct map_session_data *sd,int type,int val)
{
int i = 0;
@@ -5507,8 +5474,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
/*==========================================
* HP/SP Healing. If flag is passed, the heal type is through clif_heal, otherwise update status.
- *------------------------------------------
- */
+ *------------------------------------------*/
void pc_heal(struct map_session_data *sd,unsigned int hp,unsigned int sp, int type)
{
if (type) {
@@ -5527,8 +5493,7 @@ void pc_heal(struct map_session_data *sd,unsigned int hp,unsigned int sp, int ty
/*==========================================
* HP/SP回復
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
{
int i, bonus;
@@ -5567,8 +5532,7 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
/*==========================================
* HP/SP回復
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_percentheal(struct map_session_data *sd,int hp,int sp)
{
nullpo_retr(0, sd);
@@ -5609,8 +5573,7 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
* 引? job 職業 0〜23
* upper 通常 0, ?生 1, 養子 2, そのまま -1
* Rewrote to make it tidider [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_jobchange(struct map_session_data *sd,int job, int upper)
{
int i, fame_flag=0;
@@ -5723,8 +5686,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
/*==========================================
* 見た目?更
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_equiplookall(struct map_session_data *sd)
{
nullpo_retr(0, sd);
@@ -5745,8 +5707,7 @@ int pc_equiplookall(struct map_session_data *sd)
/*==========================================
* 見た目?更
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_changelook(struct map_session_data *sd,int type,int val)
{
nullpo_retr(0, sd);
@@ -5809,8 +5770,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
/*==========================================
* 付?品(鷹,ペコ,カ?ト)設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setoption(struct map_session_data *sd,int type)
{
int p_type, new_look=0;
@@ -5883,8 +5843,7 @@ int pc_setoption(struct map_session_data *sd,int type)
/*==========================================
* カ?ト設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setcart(struct map_session_data *sd,int type)
{
int cart[6] = {0x0000,OPTION_CART1,OPTION_CART2,OPTION_CART3,OPTION_CART4,OPTION_CART5};
@@ -5909,8 +5868,7 @@ int pc_setcart(struct map_session_data *sd,int type)
/*==========================================
* 鷹設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setfalcon(TBL_PC* sd, int flag)
{
if( flag ){
@@ -5925,8 +5883,7 @@ int pc_setfalcon(TBL_PC* sd, int flag)
/*==========================================
* ペコペコ設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setriding(TBL_PC* sd, int flag)
{
if( flag ){
@@ -5941,8 +5898,7 @@ int pc_setriding(TBL_PC* sd, int flag)
/*==========================================
* アイテムドロップ可不可判定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_candrop(struct map_session_data *sd,struct item *item)
{
int level = pc_isGM(sd);
@@ -5953,8 +5909,7 @@ int pc_candrop(struct map_session_data *sd,struct item *item)
/*==========================================
* script用??の値を?む
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_readreg(struct map_session_data *sd,int reg)
{
int i;
@@ -5969,8 +5924,7 @@ int pc_readreg(struct map_session_data *sd,int reg)
}
/*==========================================
* script用??の値を設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setreg(struct map_session_data *sd,int reg,int val)
{
int i;
@@ -5994,8 +5948,7 @@ int pc_setreg(struct map_session_data *sd,int reg,int val)
/*==========================================
* script用文字列??の値を?む
- *------------------------------------------
- */
+ *------------------------------------------*/
char *pc_readregstr(struct map_session_data *sd,int reg)
{
int i;
@@ -6010,8 +5963,7 @@ char *pc_readregstr(struct map_session_data *sd,int reg)
}
/*==========================================
* script用文字列??の値を設定
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setregstr(struct map_session_data *sd,int reg,char *str)
{
int i;
@@ -6050,7 +6002,8 @@ int pc_setregstr(struct map_session_data *sd,int reg,char *str)
return 1;
}
-int pc_readregistry(struct map_session_data *sd,const char *reg,int type) {
+int pc_readregistry(struct map_session_data *sd,const char *reg,int type)
+{
struct global_reg *sd_reg;
int i,max;
@@ -6085,7 +6038,8 @@ int pc_readregistry(struct map_session_data *sd,const char *reg,int type) {
return 0;
}
-char* pc_readregistry_str(struct map_session_data *sd,char *reg,int type) {
+char* pc_readregistry_str(struct map_session_data *sd,char *reg,int type)
+{
struct global_reg *sd_reg;
int i,max;
@@ -6120,7 +6074,8 @@ char* pc_readregistry_str(struct map_session_data *sd,char *reg,int type) {
return NULL;
}
-int pc_setregistry(struct map_session_data *sd,const char *reg,int val,int type) {
+int pc_setregistry(struct map_session_data *sd,const char *reg,int val,int type)
+{
struct global_reg *sd_reg;
int i,*max, regmax;
@@ -6204,7 +6159,8 @@ int pc_setregistry(struct map_session_data *sd,const char *reg,int val,int type)
return 0;
}
-int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type) {
+int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type)
+{
struct global_reg *sd_reg;
int i,*max, regmax;
@@ -6284,8 +6240,7 @@ int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type)
/*==========================================
* イベントタイマ??理
- *------------------------------------------
- */
+ *------------------------------------------*/
static int pc_eventtimer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=map_id2sd(id);
@@ -6309,8 +6264,7 @@ static int pc_eventtimer(int tid,unsigned int tick,int id,int data)
/*==========================================
* イベントタイマ?追加
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
{
int i;
@@ -6333,8 +6287,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
/*==========================================
* イベントタイマ?削除
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_deleventtimer(struct map_session_data *sd,const char *name)
{
int i;
@@ -6361,8 +6314,7 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
/*==========================================
* イベントタイマ?カウント値追加
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
{
int i;
@@ -6381,8 +6333,7 @@ int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
/*==========================================
* イベントタイマ?全削除
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_cleareventtimer(struct map_session_data *sd)
{
int i;
@@ -6408,8 +6359,7 @@ int pc_cleareventtimer(struct map_session_data *sd)
//
/*==========================================
* アイテムを?備する
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
{
int i,pos,flag=0;
@@ -6562,8 +6512,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
* 0 - only unequip
* 1 - calculate status after unequipping
* 2 - force unequip
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_unequipitem(struct map_session_data *sd,int n,int flag)
{
int i;
@@ -6656,8 +6605,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
/*==========================================
* アイテムのindex番?を詰めたり
* ? 備品の?備可能チェックを行なう
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_checkitem(struct map_session_data *sd)
{
int i,j,k,id,calc_flag = 0;
@@ -6758,8 +6706,7 @@ int pc_checkitem(struct map_session_data *sd)
/*==========================================
* PVP順位計算用(foreachinarea)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
{
struct map_session_data *sd1,*sd2=NULL;
@@ -6773,8 +6720,7 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
}
/*==========================================
* PVP順位計算
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_calc_pvprank(struct map_session_data *sd)
{
int old;
@@ -6789,8 +6735,7 @@ int pc_calc_pvprank(struct map_session_data *sd)
}
/*==========================================
* PVP順位計算(timer)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=NULL;
@@ -6808,8 +6753,7 @@ int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
* sdは結婚しているか(?婚の場合は相方のchar_idを返す)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_ismarried(struct map_session_data *sd)
{
if(sd == NULL)
@@ -6821,8 +6765,7 @@ int pc_ismarried(struct map_session_data *sd)
}
/*==========================================
* sdがdstsdと結婚(dstsd→sdの結婚?理も同暫ノ行う)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
{
if(sd == NULL || dstsd == NULL ||
@@ -6836,8 +6779,7 @@ int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
/*==========================================
* sdが離婚(相手はsd->status.partner_idに依る)(相手も同暫ノ離婚?結婚指輪自動?奪)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_divorce(struct map_session_data *sd)
{
struct map_session_data *p_sd;
@@ -6869,7 +6811,7 @@ int pc_divorce(struct map_session_data *sd)
/*==========================================
* sd - father dstsd - mother jasd - child
- */
+ *------------------------------------------*/
int pc_adoption(struct map_session_data *sd,struct map_session_data *dstsd, struct map_session_data *jasd)
{
int j,level, job;
@@ -6916,8 +6858,7 @@ int pc_adoption(struct map_session_data *sd,struct map_session_data *dstsd, stru
/*==========================================
* sdの相方のmap_session_dataを返す
- *------------------------------------------
- */
+ *------------------------------------------*/
struct map_session_data *pc_get_partner(struct map_session_data *sd)
{
//struct map_session_data *p_sd = NULL;
@@ -6998,8 +6939,7 @@ void pc_bleeding (struct map_session_data *sd, unsigned int diff_tick)
/*==========================================
* セ?ブポイントの保存
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
{
nullpo_retr(0, sd);
@@ -7013,8 +6953,7 @@ int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
/*==========================================
* 自動セ?ブ 各クライアント
- *------------------------------------------
- */
+ *------------------------------------------*/
static int last_save_id=0,save_flag=0;
static int pc_autosave_sub(DBKey key,void * data,va_list ap)
{
@@ -7051,8 +6990,7 @@ static int pc_autosave_sub(DBKey key,void * data,va_list ap)
/*==========================================
* 自動セ?ブ (timer??)
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_autosave(int tid,unsigned int tick,int id,int data)
{
int interval;
@@ -7100,8 +7038,7 @@ static int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap)
/*================================================
* timer to do the day [Yor]
* data: 0 = called by timer, 1 = gmcommand/script
- *------------------------------------------------
- */
+ *------------------------------------------------*/
int map_day_timer(int tid, unsigned int tick, int id, int data)
{
char tmp_soutput[1024];
@@ -7122,8 +7059,7 @@ int map_day_timer(int tid, unsigned int tick, int id, int data)
/*================================================
* timer to do the night [Yor]
* data: 0 = called by timer, 1 = gmcommand/script
- *------------------------------------------------
- */
+ *------------------------------------------------*/
int map_night_timer(int tid, unsigned int tick, int id, int data)
{
char tmp_soutput[1024];
@@ -7154,10 +7090,9 @@ void pc_setstand(struct map_session_data *sd){
/*==========================================
* Duel organizing functions [LuzZza]
- *------------------------------------------
- */
-void duel_savetime(struct map_session_data* sd) {
-
+ *------------------------------------------*/
+void duel_savetime(struct map_session_data* sd)
+{
time_t timer;
struct tm *t;
@@ -7169,8 +7104,8 @@ void duel_savetime(struct map_session_data* sd) {
return;
}
-int duel_checktime(struct map_session_data* sd) {
-
+int duel_checktime(struct map_session_data* sd)
+{
int diff;
time_t timer;
struct tm *t;
@@ -7183,7 +7118,8 @@ int duel_checktime(struct map_session_data* sd) {
return !(diff >= 0 && diff < battle_config.duel_time_interval);
}
-static int duel_showinfo_sub(struct map_session_data* sd,va_list va) {
+static int duel_showinfo_sub(struct map_session_data* sd,va_list va)
+{
struct map_session_data *ssd = va_arg(va, struct map_session_data*);
int *p = va_arg(va, int*);
char output[256];
@@ -7261,7 +7197,8 @@ int duel_invite(
return 0;
}
-static int duel_leave_sub(struct map_session_data* sd,va_list va) {
+static int duel_leave_sub(struct map_session_data* sd,va_list va)
+{
int did = va_arg(va, int);
if (sd->duel_invite == did)
sd->duel_invite = 0;
@@ -7392,8 +7329,7 @@ int pc_split_atoui(char *str,unsigned int *val, char sep, int max)
* attr_fix.txt ?性修正テ?ブル
* size_fix.txt サイズ補正テ?ブル
* refine_db.txt 精?デ?タテ?ブル
- *------------------------------------------
- */
+ *------------------------------------------*/
int pc_readdb(void)
{
int i,j,k;
@@ -7605,7 +7541,8 @@ int pc_readdb(void)
}
// Read MOTD on startup. [Valaris]
-int pc_read_motd(void) {
+int pc_read_motd(void)
+{
FILE *fp;
int ln=0,i=0;
@@ -7635,14 +7572,16 @@ int pc_read_motd(void) {
/*==========================================
* pc? 係初期化
- *------------------------------------------
- */
-void do_final_pc(void) {
+ *------------------------------------------*/
+void do_final_pc(void)
+{
if (gm_account)
aFree(gm_account);
return;
}
-int do_init_pc(void) {
+
+int do_init_pc(void)
+{
pc_readdb();
pc_read_motd(); // Read MOTD [Valaris]
diff --git a/src/map/pet.c b/src/map/pet.c
index fd65f9565..02ae3b5e2 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -130,8 +130,7 @@ int pet_unlocktarget(struct pet_data *pd)
/*==========================================
* Pet Attack Skill [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pet_attackskill(struct pet_data *pd, int target_id)
{
struct block_list *bl;
@@ -204,8 +203,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
}
/*==========================================
* Pet SC Check [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pet_sc_check(struct map_session_data *sd, int type)
{
struct pet_data *pd;
@@ -1109,8 +1107,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
/*==========================================
* pet bonus giving skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=map_id2sd(id);
@@ -1155,8 +1152,7 @@ int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pet_recovery_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=map_id2sd(id);
@@ -1224,8 +1220,7 @@ int pet_heal_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
* pet support skills [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int pet_skill_support_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=map_id2sd(id);
@@ -1274,8 +1269,7 @@ int pet_skill_support_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
*ペットデータ読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
int read_petdb()
{
FILE *fp;
@@ -1370,8 +1364,7 @@ int read_petdb()
/*==========================================
* スキル関係初期化処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_pet(void)
{
memset(pet_db,0,sizeof(pet_db));
diff --git a/src/map/script.c b/src/map/script.c
index ca5f9bc2d..7432cad79 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -217,8 +217,7 @@ static struct linkdb_node *sleep_db;
/*==========================================
* ローカルプロトタイプ宣言 (必要な物のみ)
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* parse_subexpr(const char* p,int limit);
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -316,7 +315,8 @@ enum {
};
//Reports on the console the src of a script error.
-static void report_src(struct script_state *st) {
+static void report_src(struct script_state *st)
+{
struct block_list *bl;
if (!st->oid) return; //Can't report source.
bl = map_id2bl(st->oid);
@@ -340,8 +340,7 @@ static void report_src(struct script_state *st) {
/*==========================================
* エラーメッセージ出力
- *------------------------------------------
- */
+ *------------------------------------------*/
static void disp_error_message2(const char *mes,const char *pos,int report)
{
error_msg = aStrdup(mes);
@@ -362,8 +361,7 @@ static void check_event(struct script_state *st, const char *evt)
/*==========================================
* 文字列のハッシュを計算
- *------------------------------------------
- */
+ *------------------------------------------*/
#define calc_hash(x) (calc_hash2(x)%SCRIPT_HASH_SIZE)
static unsigned int calc_hash2(const unsigned char *p)
{
@@ -410,8 +408,7 @@ static unsigned int calc_hash2(const unsigned char *p)
/*==========================================
* str_dataの中に名前があるか検索する
- *------------------------------------------
- */
+ *------------------------------------------*/
// 既存のであれば番号、無ければ-1
static int search_str(const char *p)
{
@@ -428,8 +425,7 @@ static int search_str(const char *p)
/*==========================================
* str_dataに名前を登録
- *------------------------------------------
- */
+ *------------------------------------------*/
// 既存のであれば番号、無ければ登録して新規番号
int add_str(const char* p)
{
@@ -476,8 +472,7 @@ int add_str(const char* p)
/*==========================================
* スクリプトバッファサイズの確認と拡張
- *------------------------------------------
- */
+ *------------------------------------------*/
static void expand_script_buf(void)
{
script_size+=SCRIPT_BLOCK_SIZE;
@@ -486,8 +481,7 @@ static void expand_script_buf(void)
/*==========================================
* スクリプトバッファに1バイト書き込む
- *------------------------------------------
- */
+ *------------------------------------------*/
#define add_scriptb(a) if( script_pos+1>=script_size ) expand_script_buf(); script_buf[script_pos++]=(uint8)(a)
@@ -501,8 +495,7 @@ static void add_scriptb(int a)
/*==========================================
* スクリプトバッファにデータタイプを書き込む
- *------------------------------------------
- */
+ *------------------------------------------*/
static void add_scriptc(int a)
{
while(a>=0x40){
@@ -514,8 +507,7 @@ static void add_scriptc(int a)
/*==========================================
* スクリプトバッファに整数を書き込む
- *------------------------------------------
- */
+ *------------------------------------------*/
static void add_scripti(int a)
{
while(a>=0x40){
@@ -527,8 +519,7 @@ static void add_scripti(int a)
/*==========================================
* スクリプトバッファにラベル/変数/関数を書き込む
- *------------------------------------------
- */
+ *------------------------------------------*/
// 最大16Mまで
static void add_scriptl(int l)
{
@@ -568,8 +559,7 @@ static void add_scriptl(int l)
/*==========================================
* ラベルを解決する
- *------------------------------------------
- */
+ *------------------------------------------*/
void set_label(int l,int pos, const char* script_pos)
{
int i,next;
@@ -770,8 +760,7 @@ const char* parse_callfunc(const char* p, int require_paren)
/*==========================================
* 項の解析
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* parse_simpleexpr(const char *p)
{
int i;
@@ -856,8 +845,7 @@ const char* parse_simpleexpr(const char *p)
/*==========================================
* 式の解析
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* parse_subexpr(const char* p,int limit)
{
int op,opl,len;
@@ -926,8 +914,7 @@ const char* parse_subexpr(const char* p,int limit)
/*==========================================
* 式の評価
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* parse_expr(const char *p)
{
#ifdef DEBUG_FUNCIN
@@ -949,8 +936,7 @@ const char* parse_expr(const char *p)
/*==========================================
* 行の解析
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* parse_line(const char* p)
{
const char* p2;
@@ -999,7 +985,8 @@ const char* parse_line(const char* p)
}
// { ... } の閉じ処理
-const char* parse_curly_close(const char* p) {
+const char* parse_curly_close(const char* p)
+{
if(syntax.curly_count <= 0) {
disp_error_message("parse_curly_close: unexpected string",p);
return p + 1;
@@ -1483,7 +1470,8 @@ const char* parse_syntax_close(const char *p) {
// if, for , while , do の閉じ判定
// flag == 1 : 閉じられた
// flag == 0 : 閉じられない
-const char* parse_syntax_close_sub(const char* p,int* flag) {
+const char* parse_syntax_close_sub(const char* p,int* flag)
+{
char label[256];
int pos = syntax.curly_count - 1;
int l;
@@ -1646,8 +1634,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag) {
/*==========================================
* 組み込み関数の追加
- *------------------------------------------
- */
+ *------------------------------------------*/
static void add_buildin_func(void)
{
int i,n;
@@ -1680,8 +1667,7 @@ static void add_buildin_func(void)
/*==========================================
* 定数データベースの読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static void read_constdb(void)
{
FILE *fp;
@@ -1713,10 +1699,9 @@ static void read_constdb(void)
/*==========================================
* エラー表示
- *------------------------------------------
- */
-
-const char* script_print_line( const char *p, const char *mark, int line ) {
+ *------------------------------------------*/
+const char* script_print_line( const char *p, const char *mark, int line )
+{
int i;
if( p == NULL || !p[0] ) return NULL;
if( line < 0 )
@@ -1733,7 +1718,8 @@ const char* script_print_line( const char *p, const char *mark, int line ) {
return p+i+(p[i] == '\n' ? 1 : 0);
}
-void script_error(const char *src,const char *file,int start_line, const char *error_msg, const char *error_pos) {
+void script_error(const char *src,const char *file,int start_line, const char *error_msg, const char *error_pos)
+{
// エラーが発生した行を求める
int j;
int line = start_line;
@@ -1766,9 +1752,7 @@ void script_error(const char *src,const char *file,int start_line, const char *e
/*==========================================
* スクリプトの解析
- *------------------------------------------
- */
-
+ *------------------------------------------*/
struct script_code* parse_script(const char *src,const char *file,int line,int options)
{
const char *p,*tmpp;
@@ -2136,8 +2120,7 @@ int set_var(TBL_PC* sd, char* name, void* val)
/*==========================================
* 文字列への変換
- *------------------------------------------
- */
+ *------------------------------------------*/
const char* conv_str(struct script_state *st,struct script_data *data)
{
get_val(st,data);
@@ -2161,8 +2144,7 @@ const char* conv_str(struct script_state *st,struct script_data *data)
/*==========================================
* 数値へ変換
- *------------------------------------------
- */
+ *------------------------------------------*/
int conv_num(struct script_state *st,struct script_data *data)
{
char *p;
@@ -2270,9 +2252,9 @@ void pop_stack(struct script_stack* stack, int start, int end)
/*==========================================
* スクリプト依存変数、関数依存変数の解放
- *------------------------------------------
- */
-void script_free_vars(struct linkdb_node **node) {
+ *------------------------------------------*/
+void script_free_vars(struct linkdb_node **node)
+{
struct linkdb_node *n = *node;
while(n) {
char *name = str_buf + str_data[(int)(n->key)&0x00ffffff].str;
@@ -2288,9 +2270,9 @@ void script_free_vars(struct linkdb_node **node) {
/*==========================================
* Free's the whole stack. Invoked when clearing a character. [Skotlex]
- *------------------------------------------
- */
-void script_free_stack(struct script_stack *stack) {
+ *------------------------------------------*/
+void script_free_stack(struct script_stack *stack)
+{
int i;
for(i = 0; i < stack->sp; i++) {
if( stack->stack_data[i].type == C_STR ) {
@@ -2308,7 +2290,8 @@ void script_free_stack(struct script_stack *stack) {
aFree(stack);
}
-void script_free_code(struct script_code* code) {
+void script_free_code(struct script_code* code)
+{
script_free_vars( &code->script_vars );
aFree( code->script_buf );
aFree( code );
@@ -2319,8 +2302,7 @@ void script_free_code(struct script_code* code) {
//
/*==========================================
* コマンドの読み取り
- *------------------------------------------
- */
+ *------------------------------------------*/
static int unget_com_data=-1;
int get_com(unsigned char *script,int *pos)
{
@@ -2343,8 +2325,7 @@ int get_com(unsigned char *script,int *pos)
/*==========================================
* コマンドのプッシュバック
- *------------------------------------------
- */
+ *------------------------------------------*/
void unget_com(int c)
{
if(unget_com_data!=-1){
@@ -2356,8 +2337,7 @@ void unget_com(int c)
/*==========================================
* 数値の所得
- *------------------------------------------
- */
+ *------------------------------------------*/
int get_num(unsigned char *script,int *pos)
{
int i,j;
@@ -2371,8 +2351,7 @@ int get_num(unsigned char *script,int *pos)
/*==========================================
* スタックから値を取り出す
- *------------------------------------------
- */
+ *------------------------------------------*/
int pop_val(struct script_state* st)
{
if(st->stack->sp<=0)
@@ -2384,7 +2363,8 @@ int pop_val(struct script_state* st)
return 0;
}
-int isstr(struct script_data *c) {
+int isstr(struct script_data *c)
+{
if( data_isstring(c) )
return 1;
else if( data_isreference(c) ) {
@@ -2614,8 +2594,7 @@ void op_1(struct script_state* st, int op)
/*==========================================
* 関数の実行
- *------------------------------------------
- */
+ *------------------------------------------*/
int run_func(struct script_state *st)
{
int i,start_sp,end_sp,func;
@@ -2725,8 +2704,7 @@ int run_func(struct script_state *st)
/*==========================================
* スクリプトの実行
- *------------------------------------------
- */
+ *------------------------------------------*/
void run_script_main(struct script_state *st);
void run_script(struct script_code *rootscript,int pos,int rid,int oid)
@@ -2777,8 +2755,7 @@ void script_stop_sleeptimers(int id)
/*==========================================
* 指定ノードをsleep_dbから削除
- *------------------------------------------
- */
+ *------------------------------------------*/
struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
{
struct linkdb_node *retnode;
@@ -2798,8 +2775,7 @@ struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
/*==========================================
* sleep用タイマー関数
- *------------------------------------------
- */
+ *------------------------------------------*/
int run_script_timer(int tid, unsigned int tick, int id, int data)
{
struct script_state *st = (struct script_state *)data;
@@ -2827,8 +2803,7 @@ int run_script_timer(int tid, unsigned int tick, int id, int data)
/*==========================================
* スクリプトの実行メイン部分
- *------------------------------------------
- */
+ *------------------------------------------*/
void run_script_main(struct script_state *st)
{
int c;
@@ -3009,8 +2984,7 @@ void run_script_main(struct script_state *st)
/*==========================================
* マップ変数の変更
- *------------------------------------------
- */
+ *------------------------------------------*/
int mapreg_setreg(int num,int val)
{
#if !defined(TXT_ONLY) && defined(MAPREGSQL)
@@ -3049,8 +3023,7 @@ int mapreg_setreg(int num,int val)
}
/*==========================================
* 文字列型マップ変数の変更
- *------------------------------------------
- */
+ *------------------------------------------*/
int mapreg_setregstr(int num,const char *str)
{
char *p;
@@ -3096,8 +3069,7 @@ int mapreg_setregstr(int num,const char *str)
/*==========================================
* 永続的マップ変数の読み込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static int script_load_mapreg(void)
{
#if defined(TXT_ONLY) || !defined(MAPREGSQL)
@@ -3181,8 +3153,7 @@ static int script_load_mapreg(void)
}
/*==========================================
* 永続的マップ変数の書き込み
- *------------------------------------------
- */
+ *------------------------------------------*/
static int script_save_mapreg_intsub(DBKey key,void *data,va_list ap)
{
#if defined(TXT_ONLY) || !defined(MAPREGSQL)
@@ -3270,8 +3241,7 @@ static int script_autosave_mapreg(int tid,unsigned int tick,int id,int data)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static int set_posword(char *p)
{
char* np,* str[15];
@@ -3407,8 +3377,7 @@ static int do_final_userfunc_sub (DBKey key,void *data,va_list ap)
/*==========================================
* 終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_final_script()
{
#ifdef DEBUG_RUN
@@ -3494,8 +3463,7 @@ int do_final_script()
}
/*==========================================
* 初期化
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_script()
{
mapreg_db= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
@@ -4578,8 +4546,7 @@ BUILDIN_FUNC(goto)
/*==========================================
* ユーザー定義関数の呼び出し
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(callfunc)
{
struct script_code *scr, *oldscr;
@@ -4626,8 +4593,7 @@ BUILDIN_FUNC(callfunc)
}
/*==========================================
* サブルーティンの呼び出し
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(callsub)
{
int pos=script_getnum(st,2);
@@ -4670,8 +4636,7 @@ BUILDIN_FUNC(callsub)
/*==========================================
* 引数の所得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getarg)
{
int num=script_getnum(st,2);
@@ -4764,8 +4729,7 @@ BUILDIN_FUNC(rand)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(warp)
{
int x,y;
@@ -4791,8 +4755,7 @@ BUILDIN_FUNC(warp)
}
/*==========================================
* エリア指定ワープ
- *------------------------------------------
- */
+ *------------------------------------------*/
static int buildin_areawarp_sub(struct block_list *bl,va_list ap)
{
int x,y;
@@ -4841,8 +4804,7 @@ BUILDIN_FUNC(areawarp)
* Useful for warp one player from
* another player npc-session.
* Using: warpchar "mapname",x,y,Char_ID;
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(warpchar)
{
int x,y,a,i;
@@ -4879,8 +4841,7 @@ BUILDIN_FUNC(warpchar)
/*==========================================
* Warpparty - [Fredzilla]
* Syntax: warpparty "mapname",x,y,Party_ID;
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(warpparty)
{
int x,y;
@@ -4962,8 +4923,7 @@ BUILDIN_FUNC(warpparty)
/*==========================================
* Warpguild - [Fredzilla]
* Syntax: warpguild "mapname",x,y,Guild_ID;
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(warpguild)
{
int x,y;
@@ -5051,8 +5011,7 @@ BUILDIN_FUNC(warpguild)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(heal)
{
TBL_PC *sd;
@@ -5068,8 +5027,7 @@ BUILDIN_FUNC(heal)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(itemheal)
{
TBL_PC *sd;
@@ -5091,8 +5049,7 @@ BUILDIN_FUNC(itemheal)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(percentheal)
{
int hp,sp;
@@ -5112,8 +5069,7 @@ BUILDIN_FUNC(percentheal)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(jobchange)
{
int job, upper=-1;
@@ -5134,8 +5090,7 @@ BUILDIN_FUNC(jobchange)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(jobname)
{
int class_=script_getnum(st,2);
@@ -5145,8 +5100,7 @@ BUILDIN_FUNC(jobname)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(input)
{
TBL_PC *sd = script_rid2sd(st);
@@ -5190,8 +5144,7 @@ BUILDIN_FUNC(input)
/*==========================================
* 変数設定
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(set)
{
TBL_PC *sd=NULL;
@@ -5223,8 +5176,7 @@ BUILDIN_FUNC(set)
/*==========================================
* 配列変数設定
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setarray)
{
TBL_PC *sd=NULL;
@@ -5253,8 +5205,7 @@ BUILDIN_FUNC(setarray)
}
/*==========================================
* 配列変数クリア
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(cleararray)
{
TBL_PC *sd=NULL;
@@ -5284,8 +5235,7 @@ BUILDIN_FUNC(cleararray)
}
/*==========================================
* 配列変数コピー
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(copyarray)
{
TBL_PC *sd=NULL;
@@ -5373,8 +5323,7 @@ BUILDIN_FUNC(getarraysize)
}
/*==========================================
* 配列変数から要素削除
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(deletearray)
{
TBL_PC *sd=NULL;
@@ -5416,8 +5365,7 @@ BUILDIN_FUNC(deletearray)
/*==========================================
* 指定要素を表す値(キー)を所得する
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getelementofarray)
{
if( data_isreference(script_getdata(st, 2)) ){
@@ -5439,8 +5387,7 @@ BUILDIN_FUNC(getelementofarray)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setlook)
{
int type,val;
@@ -5455,8 +5402,7 @@ BUILDIN_FUNC(setlook)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(cutin)
{
clif_cutin(script_rid2sd(st),script_getstr(st,2),script_getnum(st,3));
@@ -5465,8 +5411,7 @@ BUILDIN_FUNC(cutin)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(viewpoint)
{
int type,x,y,id,color;
@@ -5484,8 +5429,7 @@ BUILDIN_FUNC(viewpoint)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(countitem)
{
int nameid, i;
@@ -5583,8 +5527,7 @@ BUILDIN_FUNC(countitem2)
/*==========================================
* 重量チェック
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(checkweight)
{
int nameid=0,amount,i;
@@ -5632,8 +5575,7 @@ BUILDIN_FUNC(checkweight)
/*==========================================
* getitem <item id>,<amount>{,<character ID>};
* getitem "<item name>",<amount>{,<character ID>};
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getitem)
{
int nameid,amount,flag = 0;
@@ -5708,8 +5650,7 @@ BUILDIN_FUNC(getitem)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getitem2)
{
int nameid,amount,flag = 0;
@@ -5797,8 +5738,7 @@ BUILDIN_FUNC(getitem2)
* getinscribeditem item_num, character_name
* Returned Qty is always 1, only works on equip-able
* equipment
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getnameditem)
{
int nameid;
@@ -5869,8 +5809,7 @@ BUILDIN_FUNC(getnameditem)
/*==========================================
* gets a random item ID from an item group [Skotlex]
* groupranditem group_num
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(grouprandomitem)
{
int group;
@@ -5882,8 +5821,7 @@ BUILDIN_FUNC(grouprandomitem)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(makeitem)
{
int nameid,amount,flag = 0;
@@ -5938,8 +5876,7 @@ BUILDIN_FUNC(makeitem)
}
/*==========================================
* script DELITEM command (fixed 2 bugs by Lupus, added deletion priority by Lupus)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(delitem)
{
int nameid=0,amount,i,important_item=0;
@@ -6041,9 +5978,8 @@ BUILDIN_FUNC(delitem)
}
/*==========================================
-* advanced version of delitem [modified by Mihilion]
-*------------------------------------------
-*/
+ * advanced version of delitem [modified by Mihilion]
+ *------------------------------------------*/
BUILDIN_FUNC(delitem2)
{
int nameid=0,amount,i=0;
@@ -6117,8 +6053,7 @@ BUILDIN_FUNC(delitem2)
/*==========================================
* Enables/Disables use of items while in an NPC [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(enableitemuse)
{
TBL_PC *sd;
@@ -6139,8 +6074,7 @@ BUILDIN_FUNC(disableitemuse)
/*==========================================
*キャラ関係のパラメータ取得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(readparam)
{
int type;
@@ -6163,8 +6097,7 @@ BUILDIN_FUNC(readparam)
}
/*==========================================
*キャラ関係のID取得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getcharid)
{
int num;
@@ -6191,8 +6124,7 @@ BUILDIN_FUNC(getcharid)
}
/*==========================================
*指定IDのPT名取得
- *------------------------------------------
- */
+ *------------------------------------------*/
char *buildin_getpartyname_sub(int party_id)
{
struct party_data *p;
@@ -6225,8 +6157,7 @@ BUILDIN_FUNC(getpartyname)
}
/*==========================================
*指定IDのPT人数とメンバーID取得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getpartymember)
{
struct party_data *p;
@@ -6262,8 +6193,7 @@ BUILDIN_FUNC(getpartymember)
/*==========================================
* Retrieves party leader. if flag is specified,
* return some of the leader data. Otherwise, return name.
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getpartyleader)
{
int party_id, type = 0, i=0;
@@ -6311,8 +6241,7 @@ BUILDIN_FUNC(getpartyleader)
/*==========================================
*指定IDのギルド名取得
- *------------------------------------------
- */
+ *------------------------------------------*/
char *buildin_getguildname_sub(int guild_id)
{
struct guild *g=NULL;
@@ -6341,8 +6270,7 @@ BUILDIN_FUNC(getguildname)
/*==========================================
*指定IDのGuildMaster名取得
- *------------------------------------------
- */
+ *------------------------------------------*/
char *buildin_getguildmaster_sub(int guild_id)
{
struct guild *g=NULL;
@@ -6390,8 +6318,7 @@ BUILDIN_FUNC(getguildmasterid)
/*==========================================
* キャラクタの名前
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(strcharinfo)
{
TBL_PC *sd;
@@ -6435,8 +6362,7 @@ unsigned int equip[10]={EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT
/*==========================================
* GetEquipID(Pos); Pos: 1-10
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipid)
{
int i,num;
@@ -6465,8 +6391,7 @@ BUILDIN_FUNC(getequipid)
/*==========================================
* 装備名文字列(精錬メニュー用)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipname)
{
int i,num;
@@ -6494,8 +6419,7 @@ BUILDIN_FUNC(getequipname)
/*==========================================
* getbrokenid [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getbrokenid)
{
int i,num,id=0,brokencounter=0;
@@ -6521,8 +6445,7 @@ BUILDIN_FUNC(getbrokenid)
/*==========================================
* repair [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(repair)
{
int i,num;
@@ -6551,8 +6474,7 @@ BUILDIN_FUNC(repair)
/*==========================================
* 装備チェック
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipisequiped)
{
int i,num;
@@ -6576,8 +6498,7 @@ BUILDIN_FUNC(getequipisequiped)
/*==========================================
* 装備品精錬可能チェック
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipisenableref)
{
int i,num;
@@ -6598,8 +6519,7 @@ BUILDIN_FUNC(getequipisenableref)
/*==========================================
* 装備品鑑定チェック
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipisidentify)
{
int i,num;
@@ -6618,8 +6538,7 @@ BUILDIN_FUNC(getequipisidentify)
/*==========================================
* 装備品精錬度
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequiprefinerycnt)
{
int i,num;
@@ -6638,8 +6557,7 @@ BUILDIN_FUNC(getequiprefinerycnt)
/*==========================================
* 装備品武器LV
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipweaponlv)
{
int i,num;
@@ -6658,8 +6576,7 @@ BUILDIN_FUNC(getequipweaponlv)
/*==========================================
* 装備品精錬成功率
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequippercentrefinery)
{
int i,num;
@@ -6678,8 +6595,7 @@ BUILDIN_FUNC(getequippercentrefinery)
/*==========================================
* 精錬成功
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(successrefitem)
{
int i,num,ep;
@@ -6731,8 +6647,7 @@ BUILDIN_FUNC(successrefitem)
/*==========================================
* 精錬失敗
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(failedrefitem)
{
int i,num;
@@ -6761,8 +6676,7 @@ BUILDIN_FUNC(failedrefitem)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(statusup)
{
int type;
@@ -6776,8 +6690,7 @@ BUILDIN_FUNC(statusup)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(statusup2)
{
int type,val;
@@ -7260,8 +7173,7 @@ BUILDIN_FUNC(savepoint)
/*==========================================
* GetTimeTick(0: System Tick, 1: Time Second Tick)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(gettimetick) /* Asgard Version */
{
int type;
@@ -7296,8 +7208,7 @@ BUILDIN_FUNC(gettimetick) /* Asgard Version */
* 1: Sec 2: Min 3: Hour
* 4: WeekDay 5: MonthDay 6: Month
* 7: Year
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(gettime) /* Asgard Version */
{
int type;
@@ -7343,8 +7254,7 @@ BUILDIN_FUNC(gettime) /* Asgard Version */
/*==========================================
* GetTimeStr("TimeFMT", Length);
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(gettimestr)
{
char *tmpstr;
@@ -7365,8 +7275,7 @@ BUILDIN_FUNC(gettimestr)
/*==========================================
* カプラ倉庫を開く
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(openstorage)
{
storage_storageopen(script_rid2sd(st));
@@ -7384,8 +7293,7 @@ BUILDIN_FUNC(guildopenstorage)
/*==========================================
* アイテムによるスキル発動
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(itemskill)
{
int id,lv;
@@ -7404,8 +7312,7 @@ BUILDIN_FUNC(itemskill)
}
/*==========================================
* アイテム作成
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(produce)
{
int trigger;
@@ -7417,8 +7324,7 @@ BUILDIN_FUNC(produce)
}
/*==========================================
* NPCでペット作る
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(makepet)
{
TBL_PC *sd = script_rid2sd(st);
@@ -7443,8 +7349,7 @@ BUILDIN_FUNC(makepet)
}
/*==========================================
* NPCで経験値上げる
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getexp)
{
TBL_PC *sd = script_rid2sd(st);
@@ -7462,8 +7367,7 @@ BUILDIN_FUNC(getexp)
/*==========================================
* Gain guild exp [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(guildgetexp)
{
TBL_PC *sd = script_rid2sd(st);
@@ -7480,8 +7384,7 @@ BUILDIN_FUNC(guildgetexp)
/*==========================================
* Changes the guild master of a guild [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(guildchangegm)
{
TBL_PC *sd;
@@ -7502,8 +7405,7 @@ BUILDIN_FUNC(guildchangegm)
/*==========================================
* モンスター発生
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(monster)
{
int class_,amount,x,y;
@@ -7529,8 +7431,7 @@ BUILDIN_FUNC(monster)
}
/*==========================================
* モンスター発生
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(areamonster)
{
int class_,amount,x0,y0,x1,y1;
@@ -7554,8 +7455,7 @@ BUILDIN_FUNC(areamonster)
}
/*==========================================
* モンスター削除
- *------------------------------------------
- */
+ *------------------------------------------*/
static int buildin_killmonster_sub(struct block_list *bl,va_list ap)
{
TBL_MOB* md = (TBL_MOB*)bl;
@@ -7609,8 +7509,7 @@ BUILDIN_FUNC(killmonsterall)
/*==========================================
* Creates a clone of a player.
* clone map, x, y, event, char_id, master_id, mode, flag, duration
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(clone)
{
TBL_PC *sd, *msd=NULL;
@@ -7659,8 +7558,7 @@ BUILDIN_FUNC(clone)
}
/*==========================================
* イベント実行
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(doevent)
{
const char *event;
@@ -7671,8 +7569,7 @@ BUILDIN_FUNC(doevent)
}
/*==========================================
* NPC主体イベント実行
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(donpcevent)
{
const char *event;
@@ -7683,8 +7580,7 @@ BUILDIN_FUNC(donpcevent)
}
/*==========================================
* イベントタイマー追加
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(addtimer)
{
const char *event;
@@ -7697,8 +7593,7 @@ BUILDIN_FUNC(addtimer)
}
/*==========================================
* イベントタイマー削除
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(deltimer)
{
const char *event;
@@ -7709,8 +7604,7 @@ BUILDIN_FUNC(deltimer)
}
/*==========================================
* イベントタイマーのカウント値追加
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(addtimercount)
{
const char *event;
@@ -7724,8 +7618,7 @@ BUILDIN_FUNC(addtimercount)
/*==========================================
* NPCタイマー初期化
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(initnpctimer)
{
struct npc_data *nd;
@@ -7764,8 +7657,7 @@ BUILDIN_FUNC(initnpctimer)
}
/*==========================================
* NPCタイマー開始
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(startnpctimer)
{
struct npc_data *nd;
@@ -7803,8 +7695,7 @@ BUILDIN_FUNC(startnpctimer)
}
/*==========================================
* NPCタイマー停止
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(stopnpctimer)
{
struct npc_data *nd;
@@ -7840,8 +7731,7 @@ BUILDIN_FUNC(stopnpctimer)
}
/*==========================================
* NPCタイマー情報所得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getnpctimer)
{
struct npc_data *nd;
@@ -7882,8 +7772,7 @@ BUILDIN_FUNC(getnpctimer)
}
/*==========================================
* NPCタイマー値設定
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setnpctimer)
{
int tick;
@@ -7900,8 +7789,7 @@ BUILDIN_FUNC(setnpctimer)
/*==========================================
* attaches the player rid to the timer [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(attachnpctimer)
{
TBL_PC *sd;
@@ -7922,8 +7810,7 @@ BUILDIN_FUNC(attachnpctimer)
/*==========================================
* detaches a player rid from the timer [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(detachnpctimer)
{
struct npc_data *nd;
@@ -7940,8 +7827,7 @@ BUILDIN_FUNC(detachnpctimer)
* To avoid "player not attached" script errors, this function is provided,
* it checks if there is a player attached to the current script. [Skotlex]
* If no, returns 0, if yes, returns the account_id of the attached player.
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(playerattached)
{
if(st->rid == 0 || map_id2sd(st->rid) == NULL)
@@ -7953,8 +7839,7 @@ BUILDIN_FUNC(playerattached)
/*==========================================
* 天の声アナウンス
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(announce)
{
const char *str, *color=NULL;
@@ -7981,8 +7866,7 @@ BUILDIN_FUNC(announce)
}
/*==========================================
* 天の声アナウンス(特定マップ)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int buildin_mapannounce_sub(struct block_list *bl,va_list ap)
{
char *str, *color;
@@ -8017,8 +7901,7 @@ BUILDIN_FUNC(mapannounce)
}
/*==========================================
* 天の声アナウンス(特定エリア)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(areaannounce)
{
const char *map,*str,*color=NULL;
@@ -8045,8 +7928,7 @@ BUILDIN_FUNC(areaannounce)
/*==========================================
* ユーザー数所得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getusers)
{
int flag=script_getnum(st,2);
@@ -8061,8 +7943,7 @@ BUILDIN_FUNC(getusers)
}
/*==========================================
* Works like @WHO - displays all online users names in window
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getusersname)
{
TBL_PC *sd, *pl_sd = NULL, **pl_allsd;
@@ -8087,8 +7968,7 @@ BUILDIN_FUNC(getusersname)
}
/*==========================================
* getmapguildusers("mapname",guild ID) Returns the number guild members present on a map [Reddozen]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getmapguildusers)
{
const char *str;
@@ -8116,8 +7996,7 @@ BUILDIN_FUNC(getmapguildusers)
}
/*==========================================
* マップ指定ユーザー数所得
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getmapusers)
{
const char *str;
@@ -8132,8 +8011,7 @@ BUILDIN_FUNC(getmapusers)
}
/*==========================================
* エリア指定ユーザー数所得
- *------------------------------------------
- */
+ *------------------------------------------*/
static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
{
int *users=va_arg(ap,int *);
@@ -8161,8 +8039,7 @@ BUILDIN_FUNC(getareausers)
/*==========================================
* エリア指定ドロップアイテム数所得
- *------------------------------------------
- */
+ *------------------------------------------*/
static int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
{
int item=va_arg(ap,int);
@@ -8208,8 +8085,7 @@ BUILDIN_FUNC(getareadropitem)
}
/*==========================================
* NPCの有効化
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(enablenpc)
{
const char *str;
@@ -8219,8 +8095,7 @@ BUILDIN_FUNC(enablenpc)
}
/*==========================================
* NPCの無効化
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(disablenpc)
{
const char *str;
@@ -8231,8 +8106,7 @@ BUILDIN_FUNC(disablenpc)
/*==========================================
* 隠れているNPCの表示
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(hideoffnpc)
{
const char *str;
@@ -8242,8 +8116,7 @@ BUILDIN_FUNC(hideoffnpc)
}
/*==========================================
* NPCをハイディング
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(hideonnpc)
{
const char *str;
@@ -8253,8 +8126,7 @@ BUILDIN_FUNC(hideonnpc)
}
/*==========================================
* 状態異常にかかる
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(sc_start)
{
struct block_list *bl;
@@ -8287,8 +8159,7 @@ BUILDIN_FUNC(sc_start)
/*==========================================
* 状態異常にかかる(確率指定)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(sc_start2)
{
struct block_list *bl;
@@ -8326,8 +8197,7 @@ BUILDIN_FUNC(sc_start2)
* Starts a SC_ change with the four values passed. [Skotlex]
* Final optional argument is the ID of player to affect.
* sc_start4 type, duration, val1, val2, val3, val4, <id>;
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(sc_start4)
{
struct block_list *bl;
@@ -8363,8 +8233,7 @@ BUILDIN_FUNC(sc_start4)
/*==========================================
* 状態異常が直る
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(sc_end)
{
struct block_list *bl;
@@ -8384,8 +8253,7 @@ BUILDIN_FUNC(sc_end)
}
/*==========================================
* 状態異常耐性を計算した確率を返す
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getscrate)
{
struct block_list *bl;
@@ -8407,8 +8275,7 @@ BUILDIN_FUNC(getscrate)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(debugmes)
{
const char *str;
@@ -8419,8 +8286,7 @@ BUILDIN_FUNC(debugmes)
/*==========================================
*捕獲アイテム使用
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(catchpet)
{
int pet_id;
@@ -8433,8 +8299,7 @@ BUILDIN_FUNC(catchpet)
/*==========================================
* [orn]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(homunculus_evolution)
{
TBL_PC *sd;
@@ -8484,8 +8349,7 @@ BUILDIN_FUNC(roclass)
/*==========================================
*携帯卵孵化機使用
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(birthpet)
{
TBL_PC *sd;
@@ -8496,8 +8360,7 @@ BUILDIN_FUNC(birthpet)
/*==========================================
* Added - AppleGirl For Advanced Classes, (Updated for Cleaner Script Purposes)
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(resetlvl)
{
TBL_PC *sd;
@@ -8510,8 +8373,7 @@ BUILDIN_FUNC(resetlvl)
}
/*==========================================
* ステータスリセット
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(resetstatus)
{
TBL_PC *sd;
@@ -8522,8 +8384,7 @@ BUILDIN_FUNC(resetstatus)
/*==========================================
* script command resetskill
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(resetskill)
{
TBL_PC *sd;
@@ -8534,8 +8395,7 @@ BUILDIN_FUNC(resetskill)
/*==========================================
* Counts total amount of skill points.
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(skillpointcount)
{
TBL_PC *sd;
@@ -8546,8 +8406,7 @@ BUILDIN_FUNC(skillpointcount)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(changebase)
{
TBL_PC *sd=NULL;
@@ -8584,8 +8443,7 @@ BUILDIN_FUNC(changebase)
/*==========================================
* 性別変換
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(changesex)
{
TBL_PC *sd = NULL;
@@ -8607,8 +8465,7 @@ BUILDIN_FUNC(changesex)
/*==========================================
* Works like 'announce' but outputs in the common chat window
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(globalmes)
{
struct block_list *bl = map_id2bl(st->oid);
@@ -8904,8 +8761,7 @@ BUILDIN_FUNC(disablearena)
/*==========================================
* RIDのアタッチ
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(attachrid)
{
st->rid=script_getnum(st,2);
@@ -8914,8 +8770,7 @@ BUILDIN_FUNC(attachrid)
}
/*==========================================
* RIDのデタッチ
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(detachrid)
{
st->rid=0;
@@ -8923,8 +8778,7 @@ BUILDIN_FUNC(detachrid)
}
/*==========================================
* 存在チェック
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(isloggedin)
{
push_val(st->stack,C_INT, map_id2sd(
@@ -8935,8 +8789,7 @@ BUILDIN_FUNC(isloggedin)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setmapflagnosave)
{
int m,x,y;
@@ -9359,8 +9212,7 @@ BUILDIN_FUNC(gvgoff)
/*==========================================
* Shows an emoticon on top of the player/npc
* emotion emotion#, <target: 0 - NPC, 1 - PC>
- *------------------------------------------
- */
+ *------------------------------------------*/
//Optional second parameter added by [Skotlex]
BUILDIN_FUNC(emotion)
{
@@ -9447,8 +9299,7 @@ BUILDIN_FUNC(agitend)
/*==========================================
* Returns whether woe is on or off. // choice script
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(agitcheck)
{
script_pushint(st,agit_flag);
@@ -9623,8 +9474,7 @@ BUILDIN_FUNC(setcastledata)
/* =====================================================================
* ギルド情報を要求する
- * ---------------------------------------------------------------------
- */
+ * ---------------------------------------------------------------------*/
BUILDIN_FUNC(requestguildinfo)
{
int guild_id=script_getnum(st,2);
@@ -9642,8 +9492,7 @@ BUILDIN_FUNC(requestguildinfo)
/* =====================================================================
* カードの数を得る
- * ---------------------------------------------------------------------
- */
+ * ---------------------------------------------------------------------*/
BUILDIN_FUNC(getequipcardcnt)
{
int i,num;
@@ -9671,8 +9520,7 @@ BUILDIN_FUNC(getequipcardcnt)
/* ================================================================
* カード取り外し成功
- * ----------------------------------------------------------------
- */
+ * ----------------------------------------------------------------*/
BUILDIN_FUNC(successremovecards)
{
int i,j,num,cardflag=0,flag;
@@ -9739,8 +9587,7 @@ BUILDIN_FUNC(successremovecards)
/* ================================================================
* カード取り外し失敗 slot,type
* type=0: 両方損失、1:カード損失、2:武具損失、3:損失無し
- * ----------------------------------------------------------------
- */
+ * ----------------------------------------------------------------*/
BUILDIN_FUNC(failedremovecards)
{
int i,j,num,cardflag=0,flag,typefail;
@@ -9824,8 +9671,7 @@ BUILDIN_FUNC(failedremovecards)
* mapwarp "<from map>","<to map>",<x>,<y>,<type>,<ID for Type>;
* type: 0=everyone, 1=guild, 2=party; [Reddozen]
* improved by [Lance]
- * ================================================================
- */
+ * ================================================================*/
BUILDIN_FUNC(mapwarp) // Added by RoVeRT
{
int x,y,m,check_val=0,check_ID=0,i=0;
@@ -10063,8 +9909,7 @@ BUILDIN_FUNC(warppartner)
/*================================================
* Script for Displaying MOB Information [Valaris]
- *------------------------------------------------
- */
+ *------------------------------------------------*/
BUILDIN_FUNC(strmobinfo)
{
@@ -10109,8 +9954,7 @@ BUILDIN_FUNC(strmobinfo)
/*==========================================
* Summon guardians [Valaris]
* guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,{,"<event label>"}{,<guardian index>};
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(guardian)
{
int class_=0,x=0,y=0,guardian=0;
@@ -10151,8 +9995,7 @@ BUILDIN_FUNC(guardian)
/*================================================
* Script for Displaying Guardian Info [Valaris]
- *------------------------------------------------
- */
+ *------------------------------------------------*/
BUILDIN_FUNC(guardianinfo)
{
int guardian=script_getnum(st,2);
@@ -10173,8 +10016,7 @@ BUILDIN_FUNC(guardianinfo)
}
/*==========================================
* IDからItem名
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getitemname)
{
int item_id=0;
@@ -10207,8 +10049,7 @@ BUILDIN_FUNC(getitemname)
}
/*==========================================
* Returns number of slots an item has. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getitemslots)
{
int item_id;
@@ -10246,8 +10087,7 @@ BUILDIN_FUNC(getitemslots)
12 elv;
13 wlv;
14 view id
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getiteminfo)
{
int item_id,n;
@@ -10288,8 +10128,7 @@ BUILDIN_FUNC(getiteminfo)
13 wlv;
14 view id
* Returns Value or -1 if the wrong field's been set
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setiteminfo)
{
int item_id,n,value;
@@ -10321,8 +10160,7 @@ BUILDIN_FUNC(setiteminfo)
it's useful when you want to check item cards or if it's signed
Useful for such quests as "Sign this refined item with players name" etc
Hat[0] +4 -> Player's Hat[0] +4
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getequipcardid)
{
int i,num,slot;
@@ -10342,9 +10180,7 @@ BUILDIN_FUNC(getequipcardid)
/*==========================================
* petskillbonus [Valaris] //Rewritten by [Skotlex]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(petskillbonus)
{
struct pet_data *pd;
@@ -10381,8 +10217,7 @@ BUILDIN_FUNC(petskillbonus)
/*==========================================
* pet looting [Valaris] //Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petloot)
{
int max;
@@ -10418,8 +10253,7 @@ BUILDIN_FUNC(petloot)
}
/*==========================================
* PCの所持品情報読み取り
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getinventorylist)
{
TBL_PC *sd=script_rid2sd(st);
@@ -10523,8 +10357,7 @@ BUILDIN_FUNC(undisguise)
* NPCクラスチェンジ
* classは変わりたいclass
* typeは通常0なのかな?
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(classchange)
{
int _class,type;
@@ -10540,8 +10373,7 @@ BUILDIN_FUNC(classchange)
/*==========================================
* NPCから発生するエフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(misceffect)
{
int type;
@@ -10560,8 +10392,7 @@ BUILDIN_FUNC(misceffect)
}
/*==========================================
* サウンドエフェクト
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(soundeffect)
{
@@ -10635,8 +10466,7 @@ BUILDIN_FUNC(soundeffectall)
}
/*==========================================
* pet status recovery [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petrecovery)
{
struct pet_data *pd;
@@ -10664,8 +10494,7 @@ BUILDIN_FUNC(petrecovery)
/*==========================================
* pet healing [Valaris] //Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petheal)
{
struct pet_data *pd;
@@ -10705,8 +10534,7 @@ BUILDIN_FUNC(petheal)
/*==========================================
* pet attack skills [Valaris] //Rewritten by [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petskillattack)
{
struct pet_data *pd;
@@ -10730,8 +10558,7 @@ BUILDIN_FUNC(petskillattack)
/*==========================================
* pet attack skills [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petskillattack2)
{
struct pet_data *pd;
@@ -10755,8 +10582,7 @@ BUILDIN_FUNC(petskillattack2)
/*==========================================
* pet support skills [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(petskillsupport)
{
struct pet_data *pd;
@@ -10795,8 +10621,7 @@ BUILDIN_FUNC(petskillsupport)
/*==========================================
* Scripted skill effects [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(skilleffect)
{
TBL_PC *sd;
@@ -10812,8 +10637,7 @@ BUILDIN_FUNC(skilleffect)
/*==========================================
* NPC skill effects [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(npcskilleffect)
{
struct block_list *bl= map_id2bl(st->oid);
@@ -10831,8 +10655,7 @@ BUILDIN_FUNC(npcskilleffect)
/*==========================================
* Special effects [Valaris]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(specialeffect)
{
struct block_list *bl=map_id2bl(st->oid);
@@ -10859,9 +10682,7 @@ BUILDIN_FUNC(specialeffect2)
/*==========================================
* Nude [Valaris]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(nude)
{
TBL_PC *sd=script_rid2sd(st);
@@ -10888,9 +10709,7 @@ BUILDIN_FUNC(nude)
*
* suggested on the forums...
* splitted into atcommand & charcommand by [Skotlex]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(atcommand)
{
TBL_PC *sd=NULL;
@@ -10969,8 +10788,7 @@ BUILDIN_FUNC(charcommand)
/*==========================================
* Displays a message for the player only (like system messages like "you got an apple" )
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(dispbottom)
{
TBL_PC *sd=script_rid2sd(st);
@@ -10983,9 +10801,8 @@ BUILDIN_FUNC(dispbottom)
/*==========================================
* All The Players Full Recovery
- (HP/SP full restore and resurrect if need)
- *------------------------------------------
- */
+ * (HP/SP full restore and resurrect if need)
+ *------------------------------------------*/
BUILDIN_FUNC(recovery)
{
TBL_PC *sd, **all_sd;
@@ -11008,8 +10825,7 @@ BUILDIN_FUNC(recovery)
* Get your pet info: getpetinfo(n)
* n -> 0:pet_id 1:pet_class 2:pet_name
* 3:friendly 4:hungry, 5: rename flag.
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getpetinfo)
{
TBL_PC *sd=script_rid2sd(st);
@@ -11053,8 +10869,7 @@ BUILDIN_FUNC(getpetinfo)
* Shows wether your inventory(and equips) contain
selected card or not.
checkequipedcard(4001);
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(checkequipedcard)
{
TBL_PC *sd=script_rid2sd(st);
@@ -11104,8 +10919,7 @@ BUILDIN_FUNC(jump_zero)
returns mob counts on a set map:
e.g. GetMapMobs("prontera")
use "this" - for player's map
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getmapmobs)
{
const char *str=NULL;
@@ -11147,9 +10961,7 @@ BUILDIN_FUNC(getmapmobs)
/*==========================================
* movenpc [MouseJstr]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(movenpc)
{
TBL_NPC *nd = NULL;
@@ -11169,9 +10981,7 @@ BUILDIN_FUNC(movenpc)
/*==========================================
* message [MouseJstr]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(message)
{
TBL_PC *sd;
@@ -11215,9 +11025,7 @@ BUILDIN_FUNC(npctalk)
* hasitems (checks to see if player has any
* items on them, if so will return a 1)
* [Valaris]
- *------------------------------------------
- */
-
+ *------------------------------------------*/
BUILDIN_FUNC(hasitems)
{
int i;
@@ -11279,9 +11087,8 @@ BUILDIN_FUNC(npcstop)
/*==========================================
- * getlook char info. getlook(arg)
- *------------------------------------------
- */
+ * getlook char info. getlook(arg)
+ *------------------------------------------*/
BUILDIN_FUNC(getlook)
{
int type,val;
@@ -11324,9 +11131,8 @@ BUILDIN_FUNC(getlook)
}
/*==========================================
- * get char save point. argument: 0- map name, 1- x, 2- y
- *------------------------------------------
-*/
+ * get char save point. argument: 0- map name, 1- x, 2- y
+ *------------------------------------------*/
BUILDIN_FUNC(getsavepoint)
{
int x,y,type;
@@ -11378,8 +11184,7 @@ BUILDIN_FUNC(getsavepoint)
* Return:
* 0 - success
* -1 - some error, MapName$,MapX,MapY contains unknown value.
- *------------------------------------------
-*/
+ *------------------------------------------*/
BUILDIN_FUNC(getmapxy)
{
struct block_list *bl = NULL;
@@ -11502,8 +11307,7 @@ BUILDIN_FUNC(getmapxy)
/*==========================================
* Allows player to write NPC logs (i.e. Bank NPC, etc) [Lupus]
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(logmes)
{
const char *str;
@@ -11549,8 +11353,7 @@ BUILDIN_FUNC(summon)
/*==========================================
* Checks whether it is daytime/nighttime
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(isnight)
{
script_pushint(st,(night_flag == 1));
@@ -11566,8 +11369,7 @@ BUILDIN_FUNC(isday)
/*================================================
* Check whether another item/card has been
* equipped - used for 2/15's cards patch [celest]
- *------------------------------------------------
- */
+ *------------------------------------------------*/
// leave this here, just in case
#if 0
BUILDIN_FUNC(isequipped)
@@ -11629,8 +11431,7 @@ BUILDIN_FUNC(isequipped)
/*================================================
* Check how many items/cards in the list are
* equipped - used for 2/15's cards patch [celest]
- *------------------------------------------------
- */
+ *------------------------------------------------*/
BUILDIN_FUNC(isequippedcnt)
{
TBL_PC *sd;
@@ -11682,8 +11483,7 @@ BUILDIN_FUNC(isequippedcnt)
* equipped - used for 2/15's cards patch [celest]
* -- Items checked cannot be reused in another
* card set to prevent exploits
- *------------------------------------------------
- */
+ *------------------------------------------------*/
BUILDIN_FUNC(isequipped)
{
TBL_PC *sd;
@@ -11770,8 +11570,7 @@ BUILDIN_FUNC(isequipped)
/*================================================
* Check how many given inserted cards in the CURRENT
* weapon - used for 2/15's cards patch [Lupus]
- *------------------------------------------------
- */
+ *------------------------------------------------*/
BUILDIN_FUNC(cardscnt)
{
TBL_PC *sd;
@@ -11812,8 +11611,7 @@ BUILDIN_FUNC(cardscnt)
/*=======================================================
* Returns the refined number of the current item, or an
* item with inventory index specified
- *-------------------------------------------------------
- */
+ *-------------------------------------------------------*/
BUILDIN_FUNC(getrefine)
{
TBL_PC *sd;
@@ -11826,8 +11624,7 @@ BUILDIN_FUNC(getrefine)
/*=======================================================
* Allows 2 Parents to adopt a character as a Baby
- *-------------------------------------------------------
- */
+ *-------------------------------------------------------*/
BUILDIN_FUNC(adopt)
{
int ret;
@@ -11853,8 +11650,7 @@ BUILDIN_FUNC(adopt)
/*=======================================================
* Day/Night controls
- *-------------------------------------------------------
- */
+ *-------------------------------------------------------*/
BUILDIN_FUNC(night)
{
if (night_flag != 1) map_night_timer(night_timer_tid, 0, 0, 1);
@@ -12441,8 +12237,7 @@ BUILDIN_FUNC(npcshopattach)
0 - script
1 - Equip script
2 - Unequip script
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(setitemscript)
{
int item_id,n=0;
@@ -12505,12 +12300,12 @@ BUILDIN_FUNC(delmonsterdrop)
}
}
*/
+
/*==========================================
* Returns some values of a monster [Lupus]
* Name, Level, race, size, etc...
getmonsterinfo(monsterID,queryIndex);
- *------------------------------------------
- */
+ *------------------------------------------*/
BUILDIN_FUNC(getmonsterinfo)
{
struct mob_db *mob;
diff --git a/src/map/skill.c b/src/map/skill.c
index 7f0959f2f..af4a34eed 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -705,7 +705,8 @@ const char* skill_get_name( int id ){
return skill_db[id].name;
}
-int skill_tree_get_max(int id, int b_class){
+int skill_tree_get_max(int id, int b_class)
+{
int i, skillid;
for(i=0;(skillid=skill_tree[b_class][i].id)>0;i++)
if (id == skillid) return skill_tree[b_class][i].max;
@@ -974,8 +975,7 @@ struct skill_unit_layout *skill_get_unit_layout (int skillid, int skilllv, struc
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_additional_effect (struct block_list* src, struct block_list *bl, int skillid, int skilllv, int attack_type, unsigned int tick)
{
struct map_session_data *sd=NULL, *dstsd=NULL;
@@ -1854,9 +1854,7 @@ int skill_blown (struct block_list *src, struct block_list *target, int count)
* packet shouldn't display a skill animation)
* flag&0x2000 is used to signal that the skilllv should be passed as -1 to the
* client (causes player characters to not scream skill name)
- *-------------------------------------------------------------------------
- */
-
+ *-------------------------------------------------------------------------*/
int skill_attack (int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
{
struct Damage dmg;
@@ -2207,8 +2205,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
* T =タ?ゲット選?用(BCT_*)
* ffff=自由に使用可能
* 0 =予約?B0に固定
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_area_temp[8];
static int skill_unit_temp[64]; /* For storing skill_unit ids as players move in/out of them. [Skotlex] */
static int skill_unit_index=0; //Well, yeah... am too lazy to pass pointers around :X
@@ -2386,8 +2383,7 @@ int skill_guildaura_sub (struct block_list *bl, va_list ap)
* Flag:
* &1: finished casting the skill (invoke hp/sp/item consumption)
* &2: picked menu entry (Warp Portal, Teleport and other menu based skills)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv, int type)
{
struct status_data *status;
@@ -2506,9 +2502,9 @@ static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv,
return 1;
}
-/*=========================================================================
+/*==========================================
*
- */
+ *------------------------------------------*/
int skill_area_sub_count (struct block_list *src, struct block_list *target, int skillid, int skilllv, unsigned int tick, int flag)
{
if(skill_area_temp[0] < 0xffff)
@@ -2541,8 +2537,7 @@ int skill_count_water (struct block_list *src, int range)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_timerskill (int tid, unsigned int tick, int id, int data)
{
struct block_list *src = map_id2bl(id),*target;
@@ -2634,8 +2629,7 @@ static int skill_timerskill (int tid, unsigned int tick, int id, int data)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_addtimerskill (struct block_list *src, unsigned int tick, int target, int x,int y, int skill_id, int skill_lv, int type, int flag)
{
int i;
@@ -2663,8 +2657,7 @@ int skill_addtimerskill (struct block_list *src, unsigned int tick, int target,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_cleartimerskill (struct block_list *src)
{
int i;
@@ -2699,8 +2692,7 @@ static int skill_reveal_trap (struct block_list *bl, va_list ap)
/*==========================================
*
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
{
struct map_session_data *sd = NULL, *tsd = NULL;
@@ -3301,8 +3293,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
{
struct map_session_data *sd = NULL;
@@ -4568,7 +4559,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_fail(sd,skillid,0,0); //Nothing stripped.
break;
- /* PotionPitcher */
case AM_BERSERKPITCHER:
case AM_POTIONPITCHER:
{
@@ -5051,7 +5041,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
break;
-// parent-baby skills
+ // parent-baby skills
case WE_BABY:
if(sd){
struct map_session_data *f_sd = pc_get_father(sd);
@@ -5623,8 +5613,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_id (int tid, unsigned int tick, int id, int data)
{
struct block_list *target, *src = map_id2bl(id);
@@ -5847,8 +5836,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_pos (int tid, unsigned int tick, int id, int data)
{
struct block_list* src = map_id2bl(id);
@@ -5966,8 +5954,7 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int skilllv, unsigned int tick, int flag)
{
struct map_session_data *sd=NULL;
@@ -6346,8 +6333,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castend_map (struct map_session_data *sd, int skill_num, const char *map)
{
int x=0,y=0;
@@ -6525,8 +6511,7 @@ int skill_dance_overlap(struct skill_unit *unit, int flag)
* Converts this group information so that it is handled
* as a Dissonance or Ugly Dance cell.
* Flag: 0 - Convert, 1 - Revert, 2 - Initialize.
- *------------------------------------------
- */
+ *------------------------------------------*/
#define skill_dance_switch(unit, group, flag) (((group)->state.song_dance&0x1 && (unit)->val2&UF_ENSEMBLE)?skill_dance_switch_sub(unit, group, flag):0)
static int skill_dance_switch_sub(struct skill_unit *unit, struct skill_unit_group *group, int flag)
{
@@ -6578,8 +6563,7 @@ static int skill_dance_switch_sub(struct skill_unit *unit, struct skill_unit_gro
* Initializes and sets a ground skill.
* flag&1 is used to determine when the skill 'morphs' (Warp portal becomes active, or Fire Pillar becomes active)
* flag&2 is used to determine if this skill was casted with Magic Power active.
- *------------------------------------------
- */
+ *------------------------------------------*/
struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, int skilllv, int x, int y, int flag)
{
struct skill_unit_group *group;
@@ -6964,8 +6948,7 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned int tick)
{
struct skill_unit_group *sg;
@@ -7106,8 +7089,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, unsigned int tick)
{
struct skill_unit_group *sg;
@@ -7518,8 +7500,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned int tick)
{
struct skill_unit_group *sg;
@@ -7566,8 +7547,7 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
/*==========================================
* Triggered when a char steps out of a skill group [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int tick)
{
struct status_change *sc;
@@ -7664,8 +7644,7 @@ static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int
* flag values:
* flag&1: Invoke onplace function (otherwise invoke onout)
* flag&4: Invoke a onleft call (the unit might be scheduled for deletion)
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_effect (struct block_list *bl, va_list ap)
{
struct skill_unit *unit;
@@ -7713,8 +7692,7 @@ int skill_unit_effect (struct block_list *bl, va_list ap)
/*==========================================
* If flag, this is a forced delete, otherwise, it's natural expiration.
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_onlimit (struct skill_unit *src, unsigned int tick, int flag)
{
struct skill_unit_group *sg;
@@ -7761,8 +7739,7 @@ int skill_unit_onlimit (struct skill_unit *src, unsigned int tick, int flag)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int damage, unsigned int tick)
{
struct skill_unit_group *sg;
@@ -7786,9 +7763,7 @@ int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int dam
/*==========================================
*
- *------------------------------------------
- */
-
+ *------------------------------------------*/
static int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
{
int *c, skillid;
@@ -7856,8 +7831,7 @@ static int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
/*==========================================
* Checks and stores partners for ensemble skills [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_check_pc_partner (struct map_session_data *sd, int skill_id, int* skill_lv, int range, int cast_flag)
{
static int c=0;
@@ -7905,9 +7879,7 @@ int skill_check_pc_partner (struct map_session_data *sd, int skill_id, int* skil
/*==========================================
*
- *------------------------------------------
- */
-
+ *------------------------------------------*/
static int skill_check_condition_mob_master_sub (struct block_list *bl, va_list ap)
{
int *c,src_id,mob_class,skill;
@@ -7932,8 +7904,7 @@ static int skill_check_condition_mob_master_sub (struct block_list *bl, va_list
/*==========================================
* Determines if a given skill should be made to consume ammo
* when used by the player. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_isammotype (TBL_PC *sd, int skill)
{
return (
@@ -7951,8 +7922,7 @@ int skill_isammotype (TBL_PC *sd, int skill)
* Flag:
* &1: finished casting the skill (invoke hp/sp/item consumption)
* &2: picked menu entry (Warp Portal, Teleport and other menu based skills)
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_check_condition (struct map_session_data *sd, int skill, int lv, int type)
{
struct status_data *status;
@@ -8684,9 +8654,6 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
if(index[i] >= 0)
pc_delitem(sd,index[i],amount[i],0);
}
-// Ammo is now reduced in battle_calc_weapon_attack. [Skotlex]
-// if (ammo && battle_config.arrow_decrement)
-// pc_delitem(sd,sd->equip_index[10],ammo_qty,0);
}
if(type&2)
@@ -8704,8 +8671,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castfix (struct block_list *bl, int skill_id, int skill_lv)
{
int time = skill_get_cast(skill_id, skill_lv);
@@ -8736,8 +8702,7 @@ int skill_castfix (struct block_list *bl, int skill_id, int skill_lv)
/*==========================================
* Does cast-time reductions based on sc data.
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_castfix_sc (struct block_list *bl, int time)
{
struct status_change *sc = status_get_sc(bl);
@@ -8760,8 +8725,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
{
int delaynochange = skill_get_delaynodex(skill_id, skill_lv);
@@ -8834,8 +8798,7 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
/*=========================================
*
- *----------------------------------------
- */
+ *-----------------------------------------*/
void skill_brandishspear_first (struct square *tc, int dir, int x, int y)
{
nullpo_retv(tc);
@@ -8941,8 +8904,7 @@ void skill_brandishspear_first (struct square *tc, int dir, int x, int y)
/*=========================================
*
- *-----------------------------------------
- */
+ *-----------------------------------------*/
void skill_brandishspear_dir (struct square *tc, int dir, int are)
{
int c;
@@ -8972,8 +8934,7 @@ void skill_brandishspear_dir (struct square *tc, int dir, int are)
/*==========================================
* Weapon Repair [Celest/DracoRPG]
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_repairweapon (struct map_session_data *sd, int idx)
{
int material;
@@ -9018,8 +8979,7 @@ void skill_repairweapon (struct map_session_data *sd, int idx)
/*==========================================
* Item Appraisal
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_identify (struct map_session_data *sd, int idx)
{
int flag=1;
@@ -9037,8 +8997,7 @@ void skill_identify (struct map_session_data *sd, int idx)
/*==========================================
* Weapon Refine [Celest]
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_weaponrefine (struct map_session_data *sd, int idx)
{
int i = 0, ep = 0, per;
@@ -9107,8 +9066,7 @@ void skill_weaponrefine (struct map_session_data *sd, int idx)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_autospell (struct map_session_data *sd, int skillid)
{
int skilllv;
@@ -9151,8 +9109,7 @@ int skill_autospell (struct map_session_data *sd, int skillid)
/*==========================================
* Sitting skills functions.
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_sit_count (struct block_list *bl, va_list ap)
{
struct map_session_data *sd;
@@ -9245,8 +9202,7 @@ int skill_sit (struct map_session_data *sd, int type)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_frostjoke_scream (struct block_list *bl, va_list ap)
{
struct block_list *src;
@@ -9280,8 +9236,7 @@ int skill_frostjoke_scream (struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_unitsetmapcell (struct skill_unit *src, int skill_num, int skill_lv, int flag)
{
int i,x,y,range = skill_get_unit_range(skill_num,skill_lv);
@@ -9296,8 +9251,7 @@ void skill_unitsetmapcell (struct skill_unit *src, int skill_num, int skill_lv,
/*==========================================
* Sets a map cell around the caster, according to the skill's splash range.
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_setmapcell (struct block_list *src, int skill_num, int skill_lv, int flag)
{
int i,x,y,range = skill_get_splash(skill_num, skill_lv);
@@ -9312,8 +9266,7 @@ void skill_setmapcell (struct block_list *src, int skill_num, int skill_lv, int
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_attack_area (struct block_list *bl, va_list ap)
{
struct block_list *src,*dsrc;
@@ -9348,8 +9301,7 @@ int skill_attack_area (struct block_list *bl, va_list ap)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_clear_group (struct block_list *bl, int flag)
{
struct unit_data *ud = unit_bl2ud(bl);
@@ -9386,8 +9338,7 @@ int skill_clear_group (struct block_list *bl, int flag)
/*==========================================
* Returns the first element field found [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
struct skill_unit_group *skill_locate_element_field(struct block_list *bl)
{
struct unit_data *ud = unit_bl2ud(bl);
@@ -9443,8 +9394,7 @@ int skill_greed (struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_cell_overlap(struct block_list *bl, va_list ap)
{
int skillid;
@@ -9538,8 +9488,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap)
/*==========================================
* variation of skill_cell_overlap
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_ganbatein (struct block_list *bl, va_list ap)
{
struct skill_unit *unit;
@@ -9558,8 +9507,7 @@ int skill_ganbatein (struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap)
{
struct mob_data* md;
@@ -9580,8 +9528,7 @@ int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap)
/*==========================================
* 謖螳夂ッ蝗イ蜀縺ァsrc縺ォ蟇セ縺励※譛牙柑縺ェ繧ソ繝シ繧イ繝繝医ョbl縺ョ謨ー繧呈焚縺医k(foreachinarea)
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_count_target (struct block_list *bl, va_list ap)
{
struct block_list *src = va_arg(ap,struct block_list *);
@@ -9591,8 +9538,7 @@ int skill_count_target (struct block_list *bl, va_list ap)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_trap_splash (struct block_list *bl, va_list ap)
{
struct block_list *src;
@@ -9656,8 +9602,7 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_enchant_elemental_end (struct block_list *bl, int type)
{
struct status_change *sc;
@@ -9726,17 +9671,10 @@ int skill_check_cloaking(struct block_list *bl, struct status_change *sc)
return end;
}
-/*
- *----------------------------------------------------------------------------
- *
- *----------------------------------------------------------------------------
- */
-
/*==========================================
*
*
- *------------------------------------------
- */
+ *------------------------------------------*/
void skill_stop_dancing (struct block_list *src)
{
struct status_change* sc;
@@ -9773,8 +9711,7 @@ void skill_stop_dancing (struct block_list *src)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2)
{
struct skill_unit *unit;
@@ -9824,8 +9761,7 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
/*==========================================
* if flag =1 -> forced removal, 0 is for natural expiration.
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_delunit (struct skill_unit *unit, int flag)
{
struct skill_unit_group *group;
@@ -9875,8 +9811,7 @@ int skill_delunit (struct skill_unit *unit, int flag)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
static int skill_unit_group_newid = MAX_SKILL_DB;
struct skill_unit_group *skill_initunitgroup (struct block_list *src, int count, int skillid, int skilllv, int unit_id, int limit, int interval)
{
@@ -9932,8 +9867,7 @@ struct skill_unit_group *skill_initunitgroup (struct block_list *src, int count,
/*==========================================
* If flag, this is a forced deletion, otherwise it's natural expiration.
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_delunitgroup (struct block_list *src, struct skill_unit_group *group, int flag)
{
struct unit_data *ud;
@@ -10008,8 +9942,7 @@ int skill_delunitgroup (struct block_list *src, struct skill_unit_group *group,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_clear_unitgroup (struct block_list *src)
{
struct unit_data *ud = unit_bl2ud(src);
@@ -10023,8 +9956,7 @@ int skill_clear_unitgroup (struct block_list *src)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
struct skill_unit_group_tickset *skill_unitgrouptickset_search (struct block_list *bl, struct skill_unit_group *group, int tick)
{
int i,j=-1,k,s,id;
@@ -10067,8 +9999,7 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search (struct block_lis
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_timer_sub_onplace (struct block_list *bl, va_list ap)
{
struct skill_unit *unit;
@@ -10096,8 +10027,7 @@ int skill_unit_timer_sub_onplace (struct block_list *bl, va_list ap)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_timer_sub (struct block_list *bl, va_list ap)
{
struct skill_unit *unit;
@@ -10191,8 +10121,7 @@ int skill_unit_timer_sub (struct block_list *bl, va_list ap)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_timer (int tid, unsigned int tick, int id, int data)
{
map_freeblock_lock();
@@ -10206,8 +10135,7 @@ int skill_unit_timer (int tid, unsigned int tick, int id, int data)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_move_sub (struct block_list *bl, va_list ap)
{
struct skill_unit *unit = (struct skill_unit *)bl;
@@ -10315,8 +10243,7 @@ int skill_unit_move_sub (struct block_list *bl, va_list ap)
* flag&2: this function is being invoked twice as a bl moves, store in memory the affected
* units to figure out when they have left a group.
* flag&4: Force a onleft event (triggered when the bl is killed, for example)
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_move (struct block_list *bl, unsigned int tick, int flag)
{
nullpo_retr(0, bl);
@@ -10346,8 +10273,7 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_unit_move_unit_group (struct skill_unit_group *group, int m, int dx, int dy)
{
int i,j;
@@ -10435,15 +10361,9 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int m, int dx, i
return 0;
}
-/*----------------------------------------------------------------------------
- *
- *----------------------------------------------------------------------------
- */
-
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger, int qty)
{
int i,j;
@@ -10497,8 +10417,7 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, int slot1, int slot2, int slot3, int qty)
{
int slot[3];
@@ -10893,8 +10812,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_blockpc_end (int tid, unsigned int tick, int id, int data)
{
struct map_session_data *sd = map_id2sd(id);
@@ -10955,10 +10873,6 @@ int skill_blockmerc_start(struct homun_data *hd, int skillid, int tick) //[orn]
}
-/*----------------------------------------------------------------------------
- *
- */
-
/*
*
*/
@@ -11255,8 +11169,7 @@ void skill_init_unit_layout (void)
* produce_db.txt
* create_arrow_db.txt
* abra_db.txt
- *------------------------------------------
- */
+ *------------------------------------------*/
int skill_readdb (void)
{
int i,j,k,l,m;
@@ -11680,8 +11593,7 @@ void skill_reload (void)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_skill (void)
{
skill_readdb();
diff --git a/src/map/status.c b/src/map/status.c
index d75ab7c6a..81b28abb7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -88,7 +88,8 @@ static void set_sc(int skill, int sc, int icon, unsigned int flag)
//Initializes the StatusIconChangeTable variable. May seem somewhat slower than directly defining the array,
//but it is much less prone to errors. [Skotlex]
-void initChangeTables(void) {
+void initChangeTables(void)
+{
int i;
for (i = 0; i < SC_MAX; i++)
StatusIconChangeTable[i] = SI_BLANK;
@@ -485,7 +486,8 @@ int SkillStatusChangeTable(int skill)
return SkillStatusChangeTableArray[sk];
}
int StatusIconChangeTable[SC_MAX]; //Stores the icon that should be associated to this status change.
-static void initDummyData(void) {
+static void initDummyData(void)
+{
memset(&dummy_status, 0, sizeof(dummy_status));
dummy_status.hp =
dummy_status.max_hp =
@@ -507,8 +509,7 @@ static void initDummyData(void) {
/*==========================================
* 精錬ボーナス
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_getrefinebonus(int lv,int type)
{
if (lv >= 0 && lv < 5 && type >= 0 && type < 3)
@@ -933,8 +934,7 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per
* src MAY be null to indicate we shouldn't check it, this is a ground-based skill attack.
* target MAY Be null, in which case the checks are only to see
* whether the source can cast or not the skill on the ground.
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_check_skilluse(struct block_list *src, struct block_list *target, int skill_num, int flag)
{
struct status_data *status;
@@ -1435,7 +1435,6 @@ int status_calc_mob(struct mob_data* md, int first)
//Skotlex: Calculates the stats of the given pet.
int status_calc_pet(struct pet_data *pd, int first)
{
-
nullpo_retr(0, pd);
if (first) {
@@ -3111,8 +3110,7 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
}
/*==========================================
* Apply shared stat mods from status changes [DracoRPG]
- *------------------------------------------
- */
+ *------------------------------------------*/
static unsigned short status_calc_str(struct block_list *bl, struct status_change *sc, int str)
{
if(!sc || !sc->count)
@@ -3923,8 +3921,7 @@ static unsigned short status_calc_mode(struct block_list *bl, struct status_chan
/*==========================================
* Quick swap of adelay/speed when starting ending SA_FREECAST
- *------------------------------------------
- */
+ *------------------------------------------*/
void status_freecast_switch(struct map_session_data *sd)
{
struct status_data *status;
@@ -3969,8 +3966,7 @@ const char * status_get_name(struct block_list *bl)
/*==========================================
* 対象のClassを返す(汎用)
* 戻りは整数で0以上
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_get_class(struct block_list *bl)
{
nullpo_retr(0, bl);
@@ -3987,8 +3983,7 @@ int status_get_class(struct block_list *bl)
/*==========================================
* 対象のレベルを返す(汎用)
* 戻りは整数で0以上
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_get_lv(struct block_list *bl)
{
nullpo_retr(0, bl);
@@ -4522,8 +4517,7 @@ int status_get_sc_def(struct block_list *bl, int type, int rate, int tick, int f
* &2: Tick should not be reduced (by vit, luk, lv, etc)
* &4: sc_data loaded, no value has to be altered.
* &8: rate should not be reduced
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_start(struct block_list *bl,int type,int rate,int val1,int val2,int val3,int val4,int tick,int flag)
{
struct map_session_data *sd = NULL;
@@ -6008,8 +6002,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
}
/*==========================================
* ステータス異常全解除
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_clear(struct block_list *bl,int type)
{
struct status_change* sc;
@@ -6066,8 +6059,7 @@ int status_change_clear(struct block_list *bl,int type)
/*==========================================
* ステータス異常終了
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_end( struct block_list* bl , int type,int tid )
{
struct map_session_data *sd;
@@ -6534,8 +6526,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
/*==========================================
* ステータス異常終了タイマー
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_timer(int tid, unsigned int tick, int id, int data)
{
int type = data;
@@ -6916,8 +6907,7 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
/*==========================================
* ステータス異常タイマー範囲処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_timer_sub(struct block_list *bl, va_list ap )
{
struct block_list *src;
@@ -6980,8 +6970,7 @@ int status_change_timer_sub(struct block_list *bl, va_list ap )
/*==========================================
* Clears buffs/debuffs of a character.
* type&1 -> buffs, type&2 -> debuffs
- *------------------------------------------
- */
+ *------------------------------------------*/
int status_change_clear_buffs (struct block_list *bl, int type)
{
int i;
@@ -7280,7 +7269,8 @@ static int status_calc_sigma(void)
return 0;
}
-int status_readdb(void) {
+int status_readdb(void)
+{
int i,j;
FILE *fp;
char line[1024], path[1024],*p;
@@ -7417,8 +7407,7 @@ int status_readdb(void) {
/*==========================================
* スキル関係初期化処理
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_status(void)
{
add_timer_func_list(status_change_timer,"status_change_timer");
diff --git a/src/map/storage.c b/src/map/storage.c
index 12d5b5696..574028872 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -25,8 +25,7 @@ static struct dbt *guild_storage_db;
/*==========================================
* 倉庫内アイテムソート
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_comp_item(const void *_i1, const void *_i2)
{
struct item *i1 = (struct item *)_i1;
@@ -55,8 +54,7 @@ void storage_gsortitem (struct guild_storage* gstor)
/*==========================================
* 初期化とか
- *------------------------------------------
- */
+ *------------------------------------------*/
int do_init_storage(void) // map.c::do_init()から呼ばれる
{
storage_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
@@ -95,7 +93,8 @@ void do_reconnect_storage(void)
guild_storage_db->foreach(guild_storage_db, storage_reconnect_sub, 1);
}
-static void* create_storage(DBKey key, va_list args) {
+static void* create_storage(DBKey key, va_list args)
+{
struct storage *stor;
stor = (struct storage *) aCallocA (sizeof(struct storage), 1);
stor->account_id = key.i;
@@ -123,8 +122,7 @@ int storage_delete(int account_id)
* 0 - success
* 1 - fail
* 2 - Storage requested from char-server (will open automatically later)
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storageopen(struct map_session_data *sd)
{
struct storage *stor;
@@ -159,8 +157,8 @@ int storage_storageopen(struct map_session_data *sd)
}
// helper function
-int compare_item(struct item *a, struct item *b) {
-
+int compare_item(struct item *a, struct item *b)
+{
if (a->nameid == b->nameid &&
a->identify == b->identify &&
a->refine == b->refine &&
@@ -175,8 +173,7 @@ int compare_item(struct item *a, struct item *b) {
/*==========================================
* Internal add-item function.
- *------------------------------------------
- */
+ *------------------------------------------*/
static int storage_additem(struct map_session_data *sd,struct storage *stor,struct item *item_data,int amount)
{
struct item_data *data;
@@ -228,8 +225,7 @@ static int storage_additem(struct map_session_data *sd,struct storage *stor,stru
}
/*==========================================
* Internal del-item function
- *------------------------------------------
- */
+ *------------------------------------------*/
static int storage_delitem(struct map_session_data *sd,struct storage *stor,int n,int amount)
{
@@ -251,8 +247,7 @@ static int storage_delitem(struct map_session_data *sd,struct storage *stor,int
}
/*==========================================
* Add an item to the storage from the inventory.
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storageadd(struct map_session_data *sd,int index,int amount)
{
struct storage *stor;
@@ -282,8 +277,7 @@ int storage_storageadd(struct map_session_data *sd,int index,int amount)
/*==========================================
* Retrieve an item from the storage.
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storageget(struct map_session_data *sd,int index,int amount)
{
struct storage *stor;
@@ -311,8 +305,7 @@ int storage_storageget(struct map_session_data *sd,int index,int amount)
}
/*==========================================
* Move an item from cart to storage.
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storageaddfromcart(struct map_session_data *sd,int index,int amount)
{
struct storage *stor;
@@ -340,8 +333,7 @@ int storage_storageaddfromcart(struct map_session_data *sd,int index,int amount)
/*==========================================
* Get from Storage to the Cart
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storagegettocart(struct map_session_data *sd,int index,int amount)
{
struct storage *stor;
@@ -370,8 +362,7 @@ int storage_storagegettocart(struct map_session_data *sd,int index,int amount)
/*==========================================
* Modified By Valaris to save upon closing [massdriller]
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storageclose(struct map_session_data *sd)
{
struct storage *stor;
@@ -394,8 +385,7 @@ int storage_storageclose(struct map_session_data *sd)
/*==========================================
* When quitting the game.
- *------------------------------------------
- */
+ *------------------------------------------*/
int storage_storage_quit(struct map_session_data *sd, int flag)
{
struct storage *stor;
@@ -473,7 +463,8 @@ int storage_storage_saved(int account_id)
return 0;
}
-static void* create_guildstorage(DBKey key, va_list args) {
+static void* create_guildstorage(DBKey key, va_list args)
+{
struct guild_storage *gs = NULL;
gs = (struct guild_storage *) aCallocA(sizeof(struct guild_storage), 1);
gs->guild_id=key.i;
diff --git a/src/map/trade.c b/src/map/trade.c
index f8c939424..73d5a6d42 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -23,9 +23,9 @@
/*==========================================
* Initiates a trade request.
- *------------------------------------------
- */
-void trade_traderequest(struct map_session_data *sd, struct map_session_data *target_sd) {
+ *------------------------------------------*/
+void trade_traderequest(struct map_session_data *sd, struct map_session_data *target_sd)
+{
int level;
nullpo_retv(sd);
@@ -89,9 +89,9 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
* 4: Cancel
* Weird enough, the client should only send 3/4
* and the server is the one that can reply 0~2
- *------------------------------------------
- */
-void trade_tradeack(struct map_session_data *sd, int type) {
+ *------------------------------------------*/
+void trade_tradeack(struct map_session_data *sd, int type)
+{
struct map_session_data *tsd;
nullpo_retv(sd);
@@ -159,9 +159,9 @@ void trade_tradeack(struct map_session_data *sd, int type) {
* Check here hacker for duplicate item in trade
* normal client refuse to have 2 same types of item (except equipment) in same trade window
* normal client authorise only no equiped item and only from inventory
- *------------------------------------------
- */
-int impossible_trade_check(struct map_session_data *sd) {
+ *------------------------------------------*/
+int impossible_trade_check(struct map_session_data *sd)
+{
struct item inventory[MAX_INVENTORY];
char message_to_gm[200];
int i, index;
@@ -221,9 +221,9 @@ int impossible_trade_check(struct map_session_data *sd) {
/*==========================================
* Checks if trade is possible (against zeny limits, inventory limits, etc)
- *------------------------------------------
- */
-int trade_check(struct map_session_data *sd, struct map_session_data *tsd) {
+ *------------------------------------------*/
+int trade_check(struct map_session_data *sd, struct map_session_data *tsd)
+{
struct item inventory[MAX_INVENTORY];
struct item inventory2[MAX_INVENTORY];
struct item_data *data;
@@ -310,9 +310,9 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) {
/*==========================================
* Adds an item/qty to the trade window [rewrite by Skotlex]
- *------------------------------------------
- */
-void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
+ *------------------------------------------*/
+void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
+{
struct map_session_data *target_sd;
struct item *item;
int trade_i, trade_weight;
@@ -402,9 +402,9 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
/*==========================================
* 'Ok' button on the trade window is pressed.
- *------------------------------------------
- */
-void trade_tradeok(struct map_session_data *sd) {
+ *------------------------------------------*/
+void trade_tradeok(struct map_session_data *sd)
+{
struct map_session_data *target_sd;
if(sd->state.deal_locked || !sd->state.trading)
@@ -422,9 +422,9 @@ void trade_tradeok(struct map_session_data *sd) {
/*==========================================
* 'Cancel' is pressed. (or trade was force-cancelled by the code)
- *------------------------------------------
- */
-void trade_tradecancel(struct map_session_data *sd) {
+ *------------------------------------------*/
+void trade_tradecancel(struct map_session_data *sd)
+{
struct map_session_data *target_sd;
int trade_i;
@@ -472,9 +472,9 @@ void trade_tradecancel(struct map_session_data *sd) {
/*==========================================
* 取引許諾(trade押し)
- *------------------------------------------
- */
-void trade_tradecommit(struct map_session_data *sd) {
+ *------------------------------------------*/
+void trade_tradecommit(struct map_session_data *sd)
+{
struct map_session_data *tsd;
int trade_i;
int flag;
diff --git a/src/map/unit.c b/src/map/unit.c
index f8f6daa59..d3738393e 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -33,7 +33,8 @@
const int dirx[8]={0,-1,-1,-1,0,1,1,1};
const int diry[8]={1,1,0,-1,-1,-1,0,1};
-struct unit_data* unit_bl2ud(struct block_list *bl) {
+struct unit_data* unit_bl2ud(struct block_list *bl)
+{
if( bl == NULL) return NULL;
if( bl->type == BL_PC) return &((struct map_session_data*)bl)->ud;
if( bl->type == BL_MOB) return &((struct mob_data*)bl)->ud;
@@ -271,7 +272,8 @@ static int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, int dat
//&1 -> 1/0 = easy/hard
//&2 -> force walking
//&4 -> Delay walking if the reason you can't walk is the canwalk delay
-int unit_walktoxy( struct block_list *bl, int x, int y, int flag) {
+int unit_walktoxy( struct block_list *bl, int x, int y, int flag)
+{
struct unit_data *ud = NULL;
struct status_change *sc = NULL;
@@ -332,7 +334,8 @@ static int unit_walktobl_sub(int tid,unsigned int tick,int id,int data)
// Chases a tbl. If the flag&1, use hard-path seek,
// if flag&2, start attacking upon arrival within range, otherwise just walk to that character.
-int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag) {
+int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag)
+{
struct unit_data *ud = NULL;
struct status_change *sc = NULL;
nullpo_retr(0, bl);
@@ -619,8 +622,7 @@ int unit_warp(struct block_list *bl,int m,short x,short y,int type)
/*==========================================
* 歩行停止
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_stop_walking(struct block_list *bl,int type)
{
struct unit_data *ud;
@@ -661,8 +663,8 @@ int unit_stop_walking(struct block_list *bl,int type)
return 1;
}
-int unit_skilluse_id(struct block_list *src, int target_id, int skill_num, int skill_lv) {
-
+int unit_skilluse_id(struct block_list *src, int target_id, int skill_num, int skill_lv)
+{
if(skill_num < 0) return 0;
return unit_skilluse_id2(
@@ -682,8 +684,7 @@ int unit_is_walking(struct block_list *bl)
/*==========================================
* Determines if the bl can move based on status changes. [Skotlex]
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_can_move(struct block_list *bl)
{
struct map_session_data *sd;
@@ -748,8 +749,7 @@ int unit_can_move(struct block_list *bl)
* Applies walk delay to character, considering that
* if type is 0, this is a damage induced delay: if previous delay is active, do not change it.
* if type is 1, this is a skill induced delay: walk-delay may only be increased, not decreased.
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type)
{
struct unit_data *ud = unit_bl2ud(bl);
@@ -777,7 +777,8 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
return 1;
}
-int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int skill_lv, int casttime, int castcancel) {
+int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int skill_lv, int casttime, int castcancel)
+{
struct unit_data *ud;
struct status_data *tstatus;
struct status_change *sc;
@@ -1042,7 +1043,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
return 1;
}
-int unit_skilluse_pos(struct block_list *src, int skill_x, int skill_y, int skill_num, int skill_lv) {
+int unit_skilluse_pos(struct block_list *src, int skill_x, int skill_y, int skill_num, int skill_lv)
+{
if(skill_num < 0)
return 0;
return unit_skilluse_pos2(
@@ -1052,7 +1054,8 @@ int unit_skilluse_pos(struct block_list *src, int skill_x, int skill_y, int skil
);
}
-int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int skill_num, int skill_lv, int casttime, int castcancel) {
+int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int skill_num, int skill_lv, int casttime, int castcancel)
+{
struct map_session_data *sd = NULL;
struct unit_data *ud = NULL;
struct status_change *sc;
@@ -1164,7 +1167,8 @@ int unit_stop_attack(struct block_list *bl)
}
//Means current target is unattackable. For now only unlocks mobs.
-int unit_unattackable(struct block_list *bl) {
+int unit_unattackable(struct block_list *bl)
+{
struct unit_data *ud = unit_bl2ud(bl);
if (ud) {
ud->target = 0;
@@ -1181,9 +1185,7 @@ int unit_unattackable(struct block_list *bl) {
/*==========================================
* 攻撃要求
* typeが1なら継続攻撃
- *------------------------------------------
- */
-
+ *------------------------------------------*/
int unit_attack(struct block_list *src,int target_id,int continuous)
{
struct block_list *target;
@@ -1263,8 +1265,7 @@ int unit_cancel_combo(struct block_list *bl)
}
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_can_reach_pos(struct block_list *bl,int x,int y, int easy)
{
struct walkpath_data wpd;
@@ -1283,8 +1284,7 @@ int unit_can_reach_pos(struct block_list *bl,int x,int y, int easy)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range, int easy, short *x, short *y)
{
struct walkpath_data wpd;
@@ -1328,8 +1328,7 @@ int unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range, i
/*==========================================
* PCの攻撃 (timer関数)
- *------------------------------------------
- */
+ *------------------------------------------*/
static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick)
{
struct block_list *target;
@@ -1445,7 +1444,8 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
return 1;
}
-static int unit_attack_timer(int tid,unsigned int tick,int id,int data) {
+static int unit_attack_timer(int tid,unsigned int tick,int id,int data)
+{
struct block_list *bl;
bl = map_id2bl(id);
if(bl && unit_attack_timer_sub(bl, tid, tick) == 0)
@@ -1457,8 +1457,7 @@ static int unit_attack_timer(int tid,unsigned int tick,int id,int data) {
* Cancels an ongoing skill cast.
* flag&1: Cast-Cancel invoked.
* flag&2: Cancel only if skill is cancellable.
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_skillcastcancel(struct block_list *bl,int type)
{
struct map_session_data *sd = NULL;
@@ -1506,7 +1505,8 @@ int unit_skillcastcancel(struct block_list *bl,int type)
}
// unit_data の初期化処理
-void unit_dataset(struct block_list *bl) {
+void unit_dataset(struct block_list *bl)
+{
struct unit_data *ud;
nullpo_retv(ud = unit_bl2ud(bl));
@@ -1551,8 +1551,7 @@ int unit_counttargeted(struct block_list* bl, int target_lv)
/*==========================================
*
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int tick,int sdelay,int ddelay,int damage,int div,int type,int damage2)
{
nullpo_retr(0, target);
@@ -1565,8 +1564,7 @@ int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int
/*==========================================
* 見た目のサイズを変更する
- *------------------------------------------
- */
+ *------------------------------------------*/
int unit_changeviewsize(struct block_list *bl,short size)
{
nullpo_retr(0, bl);
@@ -1590,9 +1588,9 @@ int unit_changeviewsize(struct block_list *bl,short size)
* if clrtype is 1 (death), appropiate cleanup is performed.
* Otherwise it is assumed bl is being warped.
* On-Kill specific stuff is not performed here, look at status_damage for that.
- *------------------------------------------
- */
-int unit_remove_map(struct block_list *bl, int clrtype) {
+ *------------------------------------------*/
+int unit_remove_map(struct block_list *bl, int clrtype)
+{
struct unit_data *ud = unit_bl2ud(bl);
struct status_change *sc = status_get_sc(bl);
nullpo_retr(0, ud);
@@ -1738,10 +1736,9 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
* if unit is on map, it is removed using the clrtype specified
* If clrtype is <0, no saving is performed. This is only for non-authed
* objects that shouldn't be on a map yet.
- *------------------------------------------
- */
-
-int unit_free(struct block_list *bl, int clrtype) {
+ *------------------------------------------*/
+int unit_free(struct block_list *bl, int clrtype)
+{
struct unit_data *ud = unit_bl2ud( bl );
nullpo_retr(0, ud);
@@ -1922,7 +1919,8 @@ int unit_free(struct block_list *bl, int clrtype) {
return 0;
}
-int do_init_unit(void) {
+int do_init_unit(void)
+{
add_timer_func_list(unit_attack_timer, "unit_attack_timer");
add_timer_func_list(unit_walktoxy_timer,"unit_walktoxy_timer");
add_timer_func_list(unit_walktobl_sub, "unit_walktobl_sub");
@@ -1930,7 +1928,8 @@ int do_init_unit(void) {
return 0;
}
-int do_final_unit(void) {
+int do_final_unit(void)
+{
// nothing to do
return 0;
}
diff --git a/src/map/vending.c b/src/map/vending.c
index 2f2e132bc..a84189407 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -20,8 +20,7 @@
/*==========================================
* 露店閉鎖
- *------------------------------------------
-*/
+ *------------------------------------------*/
void vending_closevending(struct map_session_data *sd)
{
nullpo_retv(sd);
@@ -34,8 +33,7 @@ void vending_closevending(struct map_session_data *sd)
/*==========================================
* 露店アイテムリスト要求
- *------------------------------------------
- */
+ *------------------------------------------*/
void vending_vendinglistreq(struct map_session_data *sd,int id)
{
struct map_session_data *vsd;
@@ -51,8 +49,7 @@ void vending_vendinglistreq(struct map_session_data *sd,int id)
/*==========================================
* 露店アイテム購入
- *------------------------------------------
- */
+ *------------------------------------------*/
void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned char *p)
{
int i, j, w, new_ = 0, blank, vend_list[MAX_VENDING];
@@ -208,8 +205,7 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
/*==========================================
* 露店開設
- *------------------------------------------
- */
+ *------------------------------------------*/
void vending_openvending(struct map_session_data *sd,int len,char *message,int flag,unsigned char *p)
{
int i, j;
diff --git a/src/plugins/gui.c b/src/plugins/gui.c
index e8c097d21..84b61dab1 100644
--- a/src/plugins/gui.c
+++ b/src/plugins/gui.c
@@ -31,7 +31,8 @@ int (*add_timer_interval)(unsigned int,int (*)(int,unsigned int,int,int),int,int
//Used to output 'I'm Alive' every few seconds
//Intended to let frontends know if the app froze
//-----------------------------------------------------
-int imalive_timer(int tid, unsigned int tick, int id, int data){
+int imalive_timer(int tid, unsigned int tick, int id, int data)
+{
printf("I'm Alive\n");
return 0;
}
@@ -40,7 +41,8 @@ int imalive_timer(int tid, unsigned int tick, int id, int data){
//Flush stdout
//stdout buffer needs flushed to be seen in GUI
//-----------------------------------------------------
-int flush_timer(int tid, unsigned int tick, int id, int data){
+int flush_timer(int tid, unsigned int tick, int id, int data)
+{
fflush(stdout);
return 0;
}
diff --git a/src/plugins/sig.c b/src/plugins/sig.c
index 6f1f8404c..1872d48ff 100644
--- a/src/plugins/sig.c
+++ b/src/plugins/sig.c
@@ -26,13 +26,15 @@ PLUGIN_EVENTS_TABLE = {
//////////////////////////////////////
#if defined(_WIN32) || defined(MINGW)
- int sig_init() {
+ int sig_init()
+ {
ShowError("sig: This plugin is not supported - Enable 'exchndl' instead!\n");
return 0;
}
int sig_final() { return 0; }
#elif defined (__NETBSD__) || defined (__FREEBSD__)
- int sig_init() {
+ int sig_init()
+ {
ShowError("sig: This plugin is not supported!\n");
return 0;
}
diff --git a/src/tool/adduser.c b/src/tool/adduser.c
index b8f5d4718..592729df6 100644
--- a/src/tool/adduser.c
+++ b/src/tool/adduser.c
@@ -15,7 +15,8 @@ char *account_txt = "../save/account.txt";
//-----------------------------------------------------
// Function to suppress control characters in a string.
//-----------------------------------------------------
-int remove_control_chars(unsigned char *str) {
+int remove_control_chars(unsigned char *str)
+{
int i;
int change = 0;
@@ -29,8 +30,8 @@ int remove_control_chars(unsigned char *str) {
return change;
}
-int main(int argc, char *argv[]) {
-
+int main(int argc, char *argv[])
+{
char username[24];
char password[24];
char sex[2];
diff --git a/src/txt-converter/char-converter.c b/src/txt-converter/char-converter.c
index 3d1f59391..b1aae0ca5 100644
--- a/src/txt-converter/char-converter.c
+++ b/src/txt-converter/char-converter.c
@@ -31,7 +31,8 @@ char t_name[256];
#define SQL_CONF_NAME "conf/inter_athena.conf"
#define INTER_CONF_NAME "conf/inter_athena.conf"
//--------------------------------------------------------
-int convert_init(void){
+int convert_init(void)
+{
char line[65536];
int ret;
int set,tmp_int[2], lineno, count;
@@ -265,8 +266,8 @@ int convert_init(void){
return 0;
}
-int do_init(int argc, char **argv){
-
+int do_init(int argc, char **argv)
+{
char_config_read((argc>1)?argv[1]:CHAR_CONF_NAME);
mapindex_init();
sql_config_read((argc>2)?argv[2]:SQL_CONF_NAME);
@@ -280,4 +281,4 @@ int do_init(int argc, char **argv){
void do_abort(void) {}
-void do_final (void) {}
+void do_final(void) {}
diff --git a/src/txt-converter/login-converter.c b/src/txt-converter/login-converter.c
index e46f9327b..020fd8008 100644
--- a/src/txt-converter/login-converter.c
+++ b/src/txt-converter/login-converter.c
@@ -161,7 +161,8 @@ int mmo_auth_init(void)
return 0;
}
-int login_config_read(const char *cfgName){
+int login_config_read(const char *cfgName)
+{
int i;
char line[1024], w1[1024], w2[1024];
FILE *fp;