From 24678bdccf0c035ada2aec46dc89055beec9674c Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Fri, 25 Jan 2013 18:37:56 -0200 Subject: Fixed bugreport:7218, where unique id was implemented and they forgot that more load was being retrieved after, so card0 wasn't being loaded properly. Signed-off-by: Matheus Macabu --- src/char/int_auction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 34aed5bf7..06e238667 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -224,7 +224,7 @@ void inter_auctions_fromsql(void) for( i = 0; i < MAX_SLOTS; i++ ) { - Sql_GetData(sql_handle, 14 + i, &data, NULL); + Sql_GetData(sql_handle, 15 + i, &data, NULL); item->card[i] = atoi(data); } -- cgit v1.2.3-70-g09d2 From 0f9a3af9e466576cdb64b0e3b4ab1a5dec9549f5 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 26 Jan 2013 17:29:37 -0200 Subject: Changing ASCI Art / Moving stat server to Hercules. Changed the ASCI art (not quite final; just changing it prior to release), moving stat server to hercules end Signed-off-by: shennetsind --- src/char/char.c | 2 +- src/common/core.c | 27 ++++++++++++++------------- src/map/battle.c | 12 ++++++------ 3 files changed, 21 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index f21730d3b..83b58a0a7 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3307,7 +3307,7 @@ int parse_frommap(int fd) int sfd;/* stat server fd */ RFIFOSKIP(fd, 2);/* we skip first 2 bytes which are the 0x3008, so we end up with a buffer equal to the one we send */ - if( (sfd = make_connection(host2ip("stats.rathena.org"),(uint16)25421,true) ) == -1 ) { + if( (sfd = make_connection(host2ip("stats.hercules.ws"),(uint16)25421,true) ) == -1 ) { RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */ break;/* connection not possible, we drop the report */ } diff --git a/src/common/core.c b/src/common/core.c index e1f99885b..1e3dbb3d7 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -265,18 +265,19 @@ static void display_title(void) { //ClearScreen(); // clear screen and go up/left (0, 0 position in text) ShowMessage("\n"); - ShowMessage(""CL_PASS" "CL_BOLD" "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BT_WHITE" rAthena Development Team presents "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" ___ __ __ "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" _____/ | / /_/ /_ ___ ____ ____ _ "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" / ___/ /| |/ __/ __ \\/ _ \\/ __ \\/ __ `/ "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" / / / ___ / /_/ / / / __/ / / / /_/ / "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" /_/ /_/ |_\\__/_/ /_/\\___/_/ /_/\\__,_/ "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_GREEN" http://rathena.org/board/ "CL_PASS""CL_CLL""CL_NORMAL"\n"); - ShowMessage(""CL_PASS" "CL_BOLD" "CL_PASS""CL_CLL""CL_NORMAL"\n"); - - ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision()); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" Hercules Development Team presents "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" _ _ _ "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" | | | | | | "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" | |_| | ___ _ __ ___ _ _| | ___ ___ "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" | _ |/ _ \\ '__/ __| | | | |/ _ \\/ __|"CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" | | | | __/ | | (__| |_| | | __/\\__ \\"CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" \\_| |_/\\___|_| \\___|\\__,_|_|\\___||___/"CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" http://hercules.ws/board/ "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + ShowMessage(""CL_BG_RED" "CL_BT_WHITE" "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); + + //ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision()); } // Warning if executed as superuser (root) @@ -284,7 +285,7 @@ void usercheck(void) { #ifndef _WIN32 if (geteuid() == 0) { - ShowWarning ("You are running rAthena with root privileges, it is not necessary.\n"); + ShowWarning ("You are running Hercules with root privileges, it is not necessary.\n"); } #endif } diff --git a/src/map/battle.c b/src/map/battle.c index 0959ea858..487cf4854 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5878,9 +5878,9 @@ static const struct _battle_data { }; #ifndef STATS_OPT_OUT /** - * rAthena anonymous statistic usage report -- packet is built here, and sent to char server to report. + * Hercules anonymous statistic usage report -- packet is built here, and sent to char server to report. **/ -void rAthena_report(char* date, char *time_c) { +void Hercules_report(char* date, char *time_c) { int i, rev = 0, bd_size = ARRAYLENGTH(battle_data); unsigned int config = 0; const char* rev_str; @@ -6004,9 +6004,9 @@ void rAthena_report(char* date, char *time_c) { #undef BFLAG_LENGTH } -static int rAthena_report_timer(int tid, unsigned int tick, int id, intptr_t data) { +static int Hercules_report_timer(int tid, unsigned int tick, int id, intptr_t data) { if( chrif_isconnected() ) {/* char server relays it, so it must be online. */ - rAthena_report(__DATE__,__TIME__); + Hercules_report(__DATE__,__TIME__); } return 0; } @@ -6136,8 +6136,8 @@ void do_init_battle(void) add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub"); #ifndef STATS_OPT_OUT - add_timer_func_list(rAthena_report_timer, "rAthena_report_timer"); - add_timer_interval(gettick()+30000, rAthena_report_timer, 0, 0, 60000 * 30); + add_timer_func_list(Hercules_report_timer, "Hercules_report_timer"); + add_timer_interval(gettick()+30000, Hercules_report_timer, 0, 0, 60000 * 30); #endif } -- cgit v1.2.3-70-g09d2 From 234bbe24ae5f804c96243a8399048a582e56a864 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 08:58:01 -0200 Subject: Fixed Bug #4339 Normal Boss/mini-boss attacks no longer can hit trick-dead'd players. http://hercules.ws/board/tracker/issue-4339-trick-dead-bug/ Signed-off-by: shennetsind --- src/map/skill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index a465410b2..03f0d50bb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2220,7 +2220,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if(skill_id == WZ_FROSTNOVA && dsrc->x == bl->x && dsrc->y == bl->y) return 0; //Trick Dead protects you from damage, but not from buffs and the like, hence it's placed here. - if (sc && sc->data[SC_TRICKDEAD] && !(sstatus->mode&MD_BOSS)) + if (sc && sc->data[SC_TRICKDEAD]) return 0; dmg = battle_calc_attack(attack_type,src,bl,skill_id,skill_lv,flag&0xFFF); -- cgit v1.2.3-70-g09d2 From cf690d4206ea3c0e99d7f7a31951c5fce623a43f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 09:36:29 -0200 Subject: Fixed Bug #6689 Star Gladiator's map data is now cleared upon job chaging outside star gladiator lineage, that way the database will no longer store these vars when they're not used Signed-off-by: shennetsind --- src/map/pc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index f06d48779..89925f8f2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7229,6 +7229,11 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) } } + if( (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && (b_class&MAPID_UPPERMASK) != MAPID_STAR_GLADIATOR) { + /* going off star glad lineage, reset feel to not store no-longer-used vars in the database */ + pc_resetfeel(sd); + } + sd->status.class_ = job; fame_flag = pc_famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK); sd->class_ = (unsigned short)b_class; -- cgit v1.2.3-70-g09d2 From 7911e5e5cde7ad1ffcd9e367110a656b9432ad50 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 11:33:01 -0200 Subject: Debugging Improvement Making signal.h available throughout the whole source when in DEBUG mode so that developers (and users debugging) can easily raise signals from anywhere. Extremely handy with gdb, for example. Signed-off-by: shennetsind --- src/common/core.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/common/core.h b/src/common/core.h index d48962c94..f619d821f 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -4,6 +4,11 @@ #ifndef _CORE_H_ #define _CORE_H_ +/* so that developers with --enable-debug can raise signals from any section of the code they'd like */ +#ifdef DEBUG + #include +#endif + extern int arg_c; extern char **arg_v; -- cgit v1.2.3-70-g09d2 From 18b2468b7d2680ddb5fcc0a11466b5893a16fdf4 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 11:58:05 -0200 Subject: Fixed Bug #6644 Basilica can only be placed when there are no other units (no mobs/players) within the range of which the basilica will spawn. http://hercules.ws/board/tracker/issue-6644-basilica-bugged/ Signed-off-by: shennetsind --- src/map/skill.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 03f0d50bb..8e0bbabeb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9553,7 +9553,14 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) return 0; } - +/* skill count without self */ +static int skill_count_wos(struct block_list *bl,va_list ap) { + struct block_list* src = va_arg(ap, struct block_list*); + if( src->id != bl->id ) { + return 1; + } + return 0; +} /*========================================== * *------------------------------------------*/ @@ -9771,8 +9778,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case HP_BASILICA: if( sc->data[SC_BASILICA] ) status_change_end(src, SC_BASILICA, INVALID_TIMER); // Cancel Basilica - else - { // Create Basilica. Start SC on caster. Unit timer start SC on others. + else { // Create Basilica. Start SC on caster. Unit timer start SC on others. + if( map_foreachinrange(skill_count_wos, src, 2, BL_MOB|BL_PC, src) ) { + if( sd ) + clif_skill_fail(sd,skill_id,USESKILL_FAIL,0); + return 1; + } + skill_clear_unitgroup(src); if( skill_unitsetting(src,skill_id,skill_lv,x,y,0) ) sc_start4(src,type,100,skill_lv,0,0,src->id,skill_get_time(skill_id,skill_lv)); -- cgit v1.2.3-70-g09d2 From ca1eb76ffd1c8227ea30b0d5cadd67a8b311d932 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 12:06:39 -0200 Subject: Fixed Bug #7035 Char server displaying extra '/' in exp_guild path. http://hercules.ws/board/tracker/issue-7035-typo-in-charserv-sqlbat/ Signed-off-by: shennetsind --- src/char/int_guild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 9090bc007..7090af5ee 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -726,7 +726,7 @@ int inter_guild_sql_init(void) castle_db = idb_alloc(DB_OPT_RELEASE_DATA); //Read exp file - sv_readdb("db/"DBPATH, "exp_guild.txt", ',', 1, 1, 100, exp_guild_parse_row); + sv_readdb("db", DBPATH"exp_guild.txt", ',', 1, 1, 100, exp_guild_parse_row); add_timer_func_list(guild_save_timer, "guild_save_timer"); add_timer(gettick() + 10000, guild_save_timer, 0, 0); -- cgit v1.2.3-70-g09d2 From 0af9e036d582113f861f845995fa971751dc9df1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Jan 2013 15:59:43 -0200 Subject: Support for 2012-04-18a Special Thanks to Judas for providing the new packet info. Signed-off-by: shennetsind --- db/packet_db.txt | 21 ++++++++++++++++++++- src/map/clif.h | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/db/packet_db.txt b/db/packet_db.txt index 36db9a460..f54690bd3 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -1757,5 +1757,24 @@ packet_ver: 30 0x08CF,10 //Amulet spirits 0x0977,14 //Monster HP Bar +//2012-04-18aRagexeRE [Special Thanks to Judas!] +packet_ver:31 +0x023B,26,friendslistadd,2 +0x0361,5,hommenu,2:4 +0x08A8,36,storagepassword,0 +0x0802,26,partyinvite2,2 +0x022D,19,wanttoconnection,2:6:10:14:18 +0x0281,-1,itemlistwindowselected,2:4:8 +0x035F,6,ticksend,2 +0x0202,5,changedir,2:4 +0x07E4,6,takeitem,2 +0x0362,6,dropitem,2:4 +0x07EC,8,movetokafra,2:4 +0x0364,8,movefromkafra,2:4 +0x096A,6,getcharnamerequest,2 +0x0368,6,solvecharname,2 +0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections +0x08d2,10 + //Add new packets here -//packet_ver: 31 +//packet_ver: 32 diff --git a/src/map/clif.h b/src/map/clif.h index cd7fbdb35..45e2fd4f0 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -32,7 +32,7 @@ struct party_booking_ad_info; enum {// packet DB MAX_PACKET_DB = 0xA00, - MAX_PACKET_VER = 30, + MAX_PACKET_VER = 31, MAX_PACKET_POS = 20, }; -- cgit v1.2.3-70-g09d2 From 5bc48c6e9eb26ed30016ec2c4911a84837fd73fc Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 13:21:11 -0200 Subject: Performance Improvement on Battle/Damage Dropping MarkZD's INT64 megalomania, his usage of int64 was completely unnecessary and was only taking additional processing time and spawning twice the amount of bytes it actually needed. Also dropping the poorly designed DAMAGE_ macros. Updating battle.c header to outline Hercules as made by Jman. Signed-off-by: shennetsind --- src/map/battle.c | 197 ++++++++++++++++++++++++++----------------------------- 1 file changed, 93 insertions(+), 104 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 487cf4854..d04eb1aa8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" @@ -40,9 +41,6 @@ int attr_fix_table[4][ELE_MAX][ELE_MAX]; struct Battle_Config battle_config; static struct eri *delay_damage_ers; //For battle delay damage structures. -#define DAMAGE_RATE(a){damage = (int64)damage * (a)/100;} -#define DAMAGE_SUBRATE(a){damage -= (int64)damage * (a)/100;} -#define DAMAGE_ADDRATE(a){damage += (int64)damage * (a)/100;} int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last skill in use by this bl. struct unit_data *ud; @@ -366,7 +364,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag if( tsc->data[SC_THORNSTRAP]) status_change_end(target, SC_THORNSTRAP, INVALID_TIMER); if( tsc->data[SC_FIRE_CLOAK_OPTION]) - DAMAGE_SUBRATE(tsc->data[SC_FIRE_CLOAK_OPTION]->val2) + damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100; if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB) status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER); if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2; @@ -406,9 +404,9 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag ARR_FIND(1, 6, t, tsd->talisman[t] > 0); if( t < 5 && atk_elem == t ) - DAMAGE_SUBRATE(tsd->talisman[t] * 3) // -3% custom value + damage -= damage * ( tsd->talisman[t] * 3 ) / 100;// -3% custom value } - return (int64)damage*ratio/100; + return damage*ratio/100; } /*========================================== @@ -431,7 +429,6 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li tstatus = status_get_status_data(target); s_race2 = status_get_race2(src); -#define bccDAMAGE_RATE(a){ damage = (int64)damage * (a)/1000;} switch(attack_type){ case BF_MAGIC: if ( sd && !(nk&NK_NO_CARDFIX_ATK) ) { @@ -448,7 +445,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li } } if (cardfix != 1000) - bccDAMAGE_RATE(cardfix) + damage = damage * cardfix / 1000; } if( tsd && !(nk&NK_NO_CARDFIX_DEF) ) @@ -492,7 +489,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li cardfix = cardfix * ( 100 - tsd->sc.data[SC_MDEF_RATE]->val1 ) / 100; if (cardfix != 1000) - bccDAMAGE_RATE(cardfix) + damage = damage * cardfix / 1000; } break; case BF_WEAPON: @@ -626,9 +623,9 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li } #endif if( (left&1) && cardfix_ != 1000 ) - bccDAMAGE_RATE(cardfix_) + damage = damage * cardfix / 1000; else if( cardfix != 1000 ) - bccDAMAGE_RATE(cardfix) + damage = damage * cardfix / 1000; }else if( tsd && !(nk&NK_NO_CARDFIX_DEF) ){ if( !(nk&NK_NO_ELEFIX) ) @@ -682,7 +679,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li cardfix = cardfix * ( 100 - tsd->sc.data[SC_DEF_RATE]->val1 ) / 100; if( cardfix != 1000 ) - bccDAMAGE_RATE(cardfix) + damage = damage * cardfix / 1000; } break; case BF_MISC: @@ -716,7 +713,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li cardfix = cardfix * ( 100 - tsd->bonus.long_attack_def_rate ) / 100; if (cardfix != 10000) - bccDAMAGE_RATE(cardfix) + damage = damage * cardfix / 1000; } break; } @@ -747,13 +744,13 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag sd=(struct map_session_data *)bl; //Special no damage states if(flag&BF_WEAPON && sd->special_state.no_weapon_damage) - DAMAGE_SUBRATE(sd->special_state.no_weapon_damage) + damage -= damage * sd->special_state.no_weapon_damage / 100; if(flag&BF_MAGIC && sd->special_state.no_magic_damage) - DAMAGE_SUBRATE(sd->special_state.no_magic_damage) + damage -= damage * sd->special_state.no_magic_damage / 100; if(flag&BF_MISC && sd->special_state.no_misc_damage) - DAMAGE_SUBRATE(sd->special_state.no_misc_damage) + damage -= damage * sd->special_state.no_misc_damage / 100; if(!damage) return 0; } @@ -947,9 +944,8 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag } #ifdef RENEWAL - if( sc->data[SC_RAID] ) - { - DAMAGE_ADDRATE(20) + if( sc->data[SC_RAID] ) { + damage += damage * 20 / 100; if (--sc->data[SC_RAID]->val1 == 0) status_change_end(bl, SC_RAID, INVALID_TIMER); @@ -968,7 +964,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag case W_2HMACE: case W_1HAXE: case W_2HAXE: - DAMAGE_RATE(150) + damage = damage * 150/100; break; case W_MUSICAL: case W_WHIP: @@ -983,7 +979,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag case W_DAGGER: case W_1HSWORD: case W_2HSWORD: - DAMAGE_RATE(50) + damage = damage * 50/100; break; } } @@ -997,7 +993,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag #ifndef RENEWAL if( sc->data[SC_ASSUMPTIO] ) { if( map_flag_vs(bl->m) ) - damage = (int64)damage*2/3; //Receive 66% damage + damage = damage*2/3; //Receive 66% damage else damage >>= 1; //Receive 50% damage } @@ -1005,15 +1001,15 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag if(sc->data[SC_DEFENDER] && (flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON)) - DAMAGE_RATE(100-sc->data[SC_DEFENDER]->val2) + damage = damage * ( 100 - sc->data[SC_DEFENDER]->val2 ) / 100; if(sc->data[SC_ADJUSTMENT] && (flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON)) - DAMAGE_SUBRATE(20) + damage -= damage * 20 / 100; if(sc->data[SC_FOGWALL] && skill_id != RK_DRAGONBREATH) { if(flag&BF_SKILL) //25% reduction - DAMAGE_SUBRATE(25) + damage -= damage * 25 / 100; else if ((flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON)) damage >>= 2; //75% reduction } @@ -1024,20 +1020,20 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag if (sc->data[SC_MANU_DEF]) for (i=0;ARRAYLENGTH(mob_manuk)>i;i++) if (mob_manuk[i]==((TBL_MOB*)src)->class_) { - DAMAGE_SUBRATE(sc->data[SC_MANU_DEF]->val1) + damage -= damage * sc->data[SC_MANU_DEF]->val1 / 100; break; } if (sc->data[SC_SPL_DEF]) for (i=0;ARRAYLENGTH(mob_splendide)>i;i++) if (mob_splendide[i]==((TBL_MOB*)src)->class_) { - DAMAGE_SUBRATE(sc->data[SC_SPL_DEF]->val1) + damage -= damage * sc->data[SC_SPL_DEF]->val1 / 100; break; } } if((sce=sc->data[SC_ARMOR]) && //NPC_DEFENDER sce->val3&flag && sce->val4&flag) - DAMAGE_SUBRATE(sc->data[SC_ARMOR]->val2) + damage -= damage * sc->data[SC_ARMOR]->val2 / 100; #ifdef RENEWAL if(sc->data[SC_ENERGYCOAT] && (flag&BF_WEAPON || flag&BF_MAGIC) && skill_id != WS_CARTTERMINATION) @@ -1052,13 +1048,13 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag if (!status_charge(bl, 0, (10+5*per)*status->max_sp/1000)) status_change_end(bl, SC_ENERGYCOAT, INVALID_TIMER); //Reduction: 6% + 6% every 20% - DAMAGE_SUBRATE(6 * (1+per)) + damage -= damage * (6 * (1+per)) / 100; } if(sc->data[SC_GRANITIC_ARMOR]){ - DAMAGE_SUBRATE(sc->data[SC_GRANITIC_ARMOR]->val2) + damage -= damage * sc->data[SC_GRANITIC_ARMOR]->val2 / 100; } if(sc->data[SC_PAIN_KILLER]){ - DAMAGE_SUBRATE(sc->data[SC_PAIN_KILLER]->val3) + damage -= damage * sc->data[SC_PAIN_KILLER]->val3 / 100; } if((sce=sc->data[SC_MAGMA_FLOW]) && (rnd()%100 <= sce->val2) ){ skill_castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,gettick(),0); @@ -1117,7 +1113,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag //(since battle_drain is strictly for players currently) if ((sce=sc->data[SC_BLOODLUST]) && flag&BF_WEAPON && damage > 0 && rnd()%100 < sce->val3) - status_heal(src, (int64)damage*sce->val4/100, 0, 3); + status_heal(src, damage*sce->val4/100, 0, 3); if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 ) pc_addspiritball(sd,skill_get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3); @@ -1154,13 +1150,11 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag //SC effects from caster side. sc = status_get_sc(src); - if (sc && sc->count) - { + if (sc && sc->count) { if( sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] ) - DAMAGE_ADDRATE(75) + damage += damage * 75 / 100; // [Epoque] - if (bl->type == BL_MOB) - { + if (bl->type == BL_MOB) { int i; if ( ((sce=sc->data[SC_MANU_ATK]) && (flag&BF_WEAPON)) || @@ -1168,7 +1162,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag ) for (i=0;ARRAYLENGTH(mob_manuk)>i;i++) if (((TBL_MOB*)bl)->class_==mob_manuk[i]) { - DAMAGE_ADDRATE(sce->val1) + damage += damage * sce->val1 / 100; break; } if ( ((sce=sc->data[SC_SPL_ATK]) && (flag&BF_WEAPON)) || @@ -1176,7 +1170,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag ) for (i=0;ARRAYLENGTH(mob_splendide)>i;i++) if (((TBL_MOB*)bl)->class_==mob_splendide[i]) { - DAMAGE_ADDRATE(sce->val1) + damage += damage * sce->val1 / 100; break; } } @@ -1194,16 +1188,16 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag { if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex] if (flag&BF_WEAPON) - DAMAGE_RATE(battle_config.pk_weapon_damage_rate) + damage = damage * battle_config.pk_weapon_damage_rate / 100; if (flag&BF_MAGIC) - DAMAGE_RATE(battle_config.pk_magic_damage_rate) + damage = damage * battle_config.pk_magic_damage_rate / 100; if (flag&BF_MISC) - DAMAGE_RATE(battle_config.pk_misc_damage_rate) + damage = damage * battle_config.pk_misc_damage_rate / 100; } else { //Normal attacks get reductions based on range. if (flag & BF_SHORT) - DAMAGE_RATE(battle_config.pk_short_damage_rate) + damage = damage * battle_config.pk_short_damage_rate / 100; if (flag & BF_LONG) - DAMAGE_RATE(battle_config.pk_long_damage_rate) + damage = damage * battle_config.pk_long_damage_rate / 100; } if(!damage) damage = 1; } @@ -1254,39 +1248,36 @@ int battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int dam if( !damage ) return 0; - if( bl->type == BL_MOB ) - { + if( bl->type == BL_MOB ) { struct mob_data* md = BL_CAST(BL_MOB, bl); + if( map[bl->m].flag.battleground && (md->class_ == MOBID_BLUE_CRYST || md->class_ == MOBID_PINK_CRYST) && flag&BF_SKILL ) return 0; // Crystal cannot receive skill damage on battlegrounds } - switch( skill_id ) - { + switch( skill_id ) { case PA_PRESSURE: case HW_GRAVITATION: case NJ_ZENYNAGE: case KO_MUCHANAGE: break; default: - if( flag&BF_SKILL ) - { //Skills get a different reduction than non-skills. [Skotlex] + if( flag&BF_SKILL ) { //Skills get a different reduction than non-skills. [Skotlex] if( flag&BF_WEAPON ) - DAMAGE_RATE(battle_config.bg_weapon_damage_rate) + damage = damage * battle_config.bg_weapon_damage_rate / 100; if( flag&BF_MAGIC ) - DAMAGE_RATE(battle_config.bg_magic_damage_rate) + damage = damage * battle_config.bg_magic_damage_rate / 100; if( flag&BF_MISC ) - DAMAGE_RATE(battle_config.bg_misc_damage_rate) - } - else - { //Normal attacks get reductions based on range. + damage = damage * battle_config.bg_misc_damage_rate / 100; + } else { //Normal attacks get reductions based on range. if( flag&BF_SHORT ) - DAMAGE_RATE(battle_config.bg_short_damage_rate) + damage = damage * battle_config.bg_short_damage_rate / 100; if( flag&BF_LONG ) - DAMAGE_RATE(battle_config.bg_long_damage_rate) + damage = damage * battle_config.bg_long_damage_rate / 100; } - if( !damage ) damage = 1; + if( !damage ) + damage = 1; } return damage; @@ -1342,16 +1333,16 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama */ if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex] if (flag&BF_WEAPON) - DAMAGE_RATE(battle_config.gvg_weapon_damage_rate) + damage = damage * battle_config.gvg_weapon_damage_rate / 100; if (flag&BF_MAGIC) - DAMAGE_RATE(battle_config.gvg_magic_damage_rate) + damage = damage * battle_config.gvg_magic_damage_rate / 100; if (flag&BF_MISC) - DAMAGE_RATE(battle_config.gvg_misc_damage_rate) + damage = damage * battle_config.gvg_misc_damage_rate / 100; } else { //Normal attacks get reductions based on range. if (flag & BF_SHORT) - DAMAGE_RATE(battle_config.gvg_short_damage_rate) + damage = damage * battle_config.gvg_short_damage_rate / 100; if (flag & BF_LONG) - DAMAGE_RATE(battle_config.gvg_long_damage_rate) + damage = damage * battle_config.gvg_long_damage_rate / 100; } if(!damage) damage = 1; } @@ -1366,7 +1357,7 @@ static int battle_calc_drain(int damage, int rate, int per) int diff = 0; if (per && rnd()%1000 < rate) { - diff = ((int64)damage * per) / 100; + diff = (damage * per) / 100; if (diff == 0) { if (per > 0) diff = 1; @@ -1553,9 +1544,7 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk //SizeFix only for players if (!(sd->special_state.no_sizefix || (flag&8))) - DAMAGE_RATE(type==EQI_HAND_L? - sd->left_weapon.atkmods[t_size]: - sd->right_weapon.atkmods[t_size]) + damage = damage * ( type == EQI_HAND_L ? sd->left_weapon.atkmods[t_size] : sd->right_weapon.atkmods[t_size] ) / 100; } //Finally, add baseatk @@ -1571,12 +1560,12 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk if(sd->left_weapon.overrefine) damage += rnd()%sd->left_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype2]) - DAMAGE_ADDRATE(sd->weapon_atk_rate[sd->weapontype2]) + damage += damage * sd->weapon_atk_rate[sd->weapontype2] / 100; } else { //Right hand if(sd->right_weapon.overrefine) damage += rnd()%sd->right_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype1]) - DAMAGE_ADDRATE(sd->weapon_atk_rate[sd->weapontype1]) + damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100; } } return damage; @@ -2064,8 +2053,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo //ATK_RATE scales the damage. 100 = no change. 50 is halved, 200 is doubled, etc #define ATK_RATE( a ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(a)/100; } #define ATK_RATE2( a , b ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(b)/100; } -#define ATK_RATER(a){ wd.damage = (int64)wd.damage*(a)/100;} -#define ATK_RATEL(a){ wd.damage2 = (int64)wd.damage2*(a)/100;} +#define ATK_RATER(a){ wd.damage = wd.damage*(a)/100;} +#define ATK_RATEL(a){ wd.damage2 = wd.damage2*(a)/100;} //Adds dmg%. 100 = +100% (double) damage. 10 = +10% damage #define ATK_ADDRATE( a ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(a)/100; } #define ATK_ADDRATE2( a , b ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(b)/100; } @@ -2076,7 +2065,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo switch (skill_id) { //Calc base damage according to skill case PA_SACRIFICE: - wd.damage = (int64)sstatus->max_hp* 9/100; + wd.damage = sstatus->max_hp* 9/100; wd.damage2 = 0; break; #ifndef RENEWAL @@ -2787,11 +2776,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo break; case SR_TIGERCANNON:// ATK [((Caster consumed HP + SP) / 4) x Caster Base Level / 100] % { - int hp = (int64)sstatus->max_hp * (10 + 2 * skill_lv) / 100, - sp = (int64)sstatus->max_sp * (6 + skill_lv) / 100; - skillratio = ((int64)hp+sp) / 4; + int hp = sstatus->max_hp * (10 + 2 * skill_lv) / 100, + sp = sstatus->max_sp * (6 + skill_lv) / 100; + skillratio = (hp+sp) / 4; if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // ATK [((Caster consumed HP + SP) / 2) x Caster Base Level / 100] % - skillratio = (int64)hp+sp / 2; + skillratio = hp+sp / 2; RE_LVL_DMOD(100); } break; @@ -3008,9 +2997,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo case SR_GATEOFHELL: ATK_ADD (sstatus->max_hp - status_get_hp(src)); if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE){ - ATK_ADD ( ((int64)sstatus->max_sp * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) ); + ATK_ADD ( (sstatus->max_sp * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) ); }else{ - ATK_ADD ( ((int64)sstatus->sp * (1 + skill_lv * 2 / 10)) + 10 * status_get_lv(src) ); + ATK_ADD ( (sstatus->sp * (1 + skill_lv * 2 / 10)) + 10 * status_get_lv(src) ); } break; case SR_TIGERCANNON: // (Tiger Cannon skill level x 240) + (Target Base Level x 40) @@ -3258,8 +3247,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo #else if (def1 > 100) def1 = 100; ATK_RATE2( - flag.idef ?100:(flag.pdef ? (int64)flag.pdef*(def1+vit_def) : (100-def1)), - flag.idef2?100:(flag.pdef2? (int64)flag.pdef2*(def1+vit_def) : (100-def1)) + flag.idef ?100:(flag.pdef ? flag.pdef*(def1+vit_def) : (100-def1)), + flag.idef2?100:(flag.pdef2? flag.pdef2*(def1+vit_def) : (100-def1)) ); ATK_ADD2( flag.idef ||flag.pdef ?0:-vit_def, @@ -3462,7 +3451,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } else if(sd->status.weapon == W_KATAR && !skill_id) { //Katars (offhand damage only applies to normal attacks, tested on Aegis 10.2) skill = pc_checkskill(sd,TF_DOUBLE); - wd.damage2 = (int64)wd.damage * (1 + (skill * 2))/100; + wd.damage2 = wd.damage * (1 + (skill * 2))/100; if(wd.damage && !wd.damage2) wd.damage2 = 1; flag.lh = 1; @@ -3501,7 +3490,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo wd.damage = battle_calc_gvg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag); else if( map[target->m].flag.battleground ) wd.damage = battle_calc_bg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag); - wd.damage2 = (int64)d2*100/d1 * wd.damage/100; + wd.damage2 = d2*100/d1 * wd.damage/100; if(wd.damage > 1 && wd.damage2 < 1) wd.damage2 = 1; wd.damage-=wd.damage2; } @@ -3531,7 +3520,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo int hp= sstatus->max_hp; if (sd && tsd) { hp = 8*hp/100; - if (((int64)sstatus->hp * 100) <= ((int64)sstatus->max_hp * 20)) + if ((sstatus->hp * 100) <= (sstatus->max_hp * 20)) hp = sstatus->hp; } else hp = 2*hp/100; //2% hp loss per hit @@ -4086,7 +4075,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list if(sd) { //Damage bonuses if ((i = pc_skillatk_bonus(sd, skill_id))) - ad.damage += (int64)ad.damage*i/100; + ad.damage += ad.damage*i/100; //Ignore Defense? if (!flag.imdef && ( @@ -4289,7 +4278,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * damage_div_fix(md.damage, skill); //Falcon Assault Modifier - md.damage=(int64)md.damage*(150+70*skill_lv)/100; + md.damage=md.damage*(150+70*skill_lv)/100; } break; case TF_THROWSTONE: @@ -4318,7 +4307,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * break; case CR_ACIDDEMONSTRATION: // updated the formula based on a Japanese formula found to be exact [Reddozen] if(tstatus->vit+sstatus->int_) //crash fix - md.damage = (int)((int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_))); + md.damage = (int)(7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_))); else md.damage = 0; if (tsd) md.damage>>=1; @@ -4341,7 +4330,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage = sd?sd->status.job_level:status_get_lv(src); break; case HVAN_EXPLOSION: //[orn] - md.damage = (int64)sstatus->max_hp * (50 + 50 * skill_lv) / 100; + md.damage = sstatus->max_hp * (50 + 50 * skill_lv) / 100; break ; case ASC_BREAKER: md.damage = 500+rnd()%500 + 5*skill_lv * sstatus->int_; @@ -4357,7 +4346,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * case RK_DRAGONBREATH: md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; RE_LVL_MDMOD(150); - if (sd) md.damage = (int64)md.damage * (100 + 5 * (pc_checkskill(sd,RK_DRAGONTRAINING) - 1)) / 100; + if (sd) md.damage = md.damage * (100 + 5 * (pc_checkskill(sd,RK_DRAGONTRAINING) - 1)) / 100; md.flag |= BF_LONG|BF_WEAPON; break; /** @@ -4372,11 +4361,11 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * { int researchskill_lv = pc_checkskill(sd,RA_RESEARCHTRAP); if(researchskill_lv) - md.damage = (int64)md.damage * 20 * researchskill_lv / (skill_id == RA_CLUSTERBOMB?50:100); + md.damage = md.damage * 20 * researchskill_lv / (skill_id == RA_CLUSTERBOMB?50:100); else md.damage = 0; }else - md.damage = (int64)md.damage * 200 / (skill_id == RA_CLUSTERBOMB?50:100); + md.damage = md.damage * 200 / (skill_id == RA_CLUSTERBOMB?50:100); break; /** @@ -4401,7 +4390,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * { struct Damage wd = battle_calc_weapon_attack(src,target,skill_id,skill_lv,mflag); short totaldef = tstatus->def2 + (short)status_get_def(target); - md.damage = (int64)wd.damage * 60 * (5 + skill_lv) / 100; + md.damage = wd.damage * 60 * (5 + skill_lv) / 100; md.damage -= totaldef; } break; @@ -4466,7 +4455,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage = battle_calc_cardfix(BF_MISC, src, target, nk, s_ele, 0, md.damage, 0, md.flag); if (sd && (i = pc_skillatk_bonus(sd, skill_id))) - md.damage += (int64)md.damage*i/100; + md.damage += md.damage*i/100; if(md.damage < 0) md.damage = 0; @@ -4557,14 +4546,14 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int sc = status_get_sc(bl); if( sc && sc->data[SC_REFLECTDAMAGE] ) { - int max_damage = (int64)status_get_max_hp(bl) * status_get_lv(bl) / 100; - rdamage = (int64)(*dmg) * sc->data[SC_REFLECTDAMAGE]->val2 / 100; + int max_damage = status_get_max_hp(bl) * status_get_lv(bl) / 100; + rdamage = (*dmg) * sc->data[SC_REFLECTDAMAGE]->val2 / 100; if( rdamage > max_damage ) rdamage = max_damage; }else if( sc && sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){ //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}] - int ratio = (int64)(status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(bl) / 125; + int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(bl) / 125; if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK - rdamage = (int64)rdamage * ratio / 100 + (*dmg) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; + rdamage = rdamage * ratio / 100 + (*dmg) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; skill_blown(bl, src, skill_get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit_getdir(src), 0); clif_skill_damage(bl, src, gettick(), status_get_amotion(src), 0, rdamage, 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does @@ -4574,12 +4563,12 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int return 0; // Just put here to minimize redundancy }else if (flag & BF_SHORT) {//Bounces back part of the damage. if ( sd && sd->bonus.short_weapon_damage_return ) { - rdamage += (int64)damage * sd->bonus.short_weapon_damage_return / 100; + rdamage += damage * sd->bonus.short_weapon_damage_return / 100; if(rdamage < 1) rdamage = 1; } if( sc && sc->count ) { if ( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION ) { - rdamage += (int64)damage * sc->data[SC_REFLECTSHIELD]->val2 / 100; + rdamage += damage * sc->data[SC_REFLECTSHIELD]->val2 / 100; if (rdamage < 1) rdamage = 1; } if(sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && !(src->type == BL_MOB && is_boss(src)) ) { @@ -4588,8 +4577,8 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int int rd1 = 0; if( distance_bl(src,bl) <= 0 || !map_check_dir(dir,t_dir) ) { - rd1 = (int64)min(damage,status_get_max_hp(bl)) * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. - *dmg = (int64)rd1 * 30 / 100; // Received damage = 30% of amplifly damage. + rd1 = min(damage,status_get_max_hp(bl)) * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. + *dmg = rd1 * 30 / 100; // Received damage = 30% of amplifly damage. clif_skill_damage(src,bl,gettick(), status_get_amotion(src), 0, -30000, 1, RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1,6); status_change_end(bl,SC_DEATHBOUND,INVALID_TIMER); rdamage += rd1; @@ -4599,7 +4588,7 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int } } else { if (sd && sd->bonus.long_weapon_damage_return) { - rdamage += (int64)damage * sd->bonus.long_weapon_damage_return / 100; + rdamage += damage * sd->bonus.long_weapon_damage_return / 100; if (rdamage < 1) rdamage = 1; } } -- cgit v1.2.3-70-g09d2 From e9d07bde3a8c742793ef466cf98322c58f86cfc5 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 16:53:27 -0200 Subject: Fixed Bug #7018 Fixed bug with garments not displaying properly. http://hercules.ws/board/tracker/issue-7018-visible-robegarment-item-disappears-after-relogging-and-moving/ Signed-off-by: shennetsind --- src/map/clif.c | 11 ++++++----- src/map/status.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 961e3bf0c..2c1f904d0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1043,6 +1043,8 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool } #endif #if PACKETVER >= 20110111 + if( sd ) + ShowDebug("Hi:%d v %d for %s\n",vd->robe,sd->status.robe,sd->status.name); WBUFW(buf,34) = vd->robe; offset+= 2; buf = WBUFP(buffer,offset); @@ -1347,7 +1349,8 @@ int clif_spawn(struct block_list *bl) if (vd->cloth_color) clif_refreshlook(bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,AREA_WOS); - + + switch (bl->type) { case BL_PC: @@ -1374,10 +1377,8 @@ int clif_spawn(struct block_list *bl) if( sd->sc.data[SC_PUSH_CART] ) clif_status_load_notick(&sd->bl, SI_ON_PUSH_CART, 2, sd->sc.data[SC_PUSH_CART]->val1, 0, 0); #endif - #if PACKETVER <= 20120207 if (sd->status.robe) clif_refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA); - #endif } break; case BL_MOB: @@ -4096,7 +4097,6 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) if (vd->cloth_color) clif_refreshlook(&sd->bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,SELF); - switch (bl->type) { case BL_PC: @@ -4111,6 +4111,8 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) clif_sendbgemblem_single(sd->fd,tsd); if( tsd->sc.data[SC_CAMOUFLAGE] ) clif_status_load(bl,SI_CAMOUFLAGE,1); + if ( tsd->status.robe ) + clif_refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF); } break; case BL_MER: // Devotion Effects @@ -9122,7 +9124,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->vd.cloth_color) clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF); - // item clif_inventorylist(sd); // inventory list first, otherwise deleted items in pc_checkitem show up as 'unknown item' pc_checkitem(sd); diff --git a/src/map/status.c b/src/map/status.c index 8a173f611..e615d5595 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6060,6 +6060,7 @@ void status_set_viewdata(struct block_list *bl, int class_) sd->vd.hair_style = cap_value(sd->status.hair,0,battle_config.max_hair_style); sd->vd.hair_color = cap_value(sd->status.hair_color,0,battle_config.max_hair_color); sd->vd.cloth_color = cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color); + sd->vd.robe = sd->status.robe; sd->vd.sex = sd->status.sex; } else if (vd) memcpy(&sd->vd, vd, sizeof(struct view_data)); -- cgit v1.2.3-70-g09d2 From c1e85710adac6f38eacd5b27b2236415abcfc237 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 17:07:19 -0200 Subject: Updating clif.c's Header Disclaimer Also removing something I mistakenly left on my previous commit, I deeply apologise. Signed-off-by: shennetsind --- src/map/clif.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 2c1f904d0..3f4ea8bc2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/socket.h" @@ -1043,8 +1044,6 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool } #endif #if PACKETVER >= 20110111 - if( sd ) - ShowDebug("Hi:%d v %d for %s\n",vd->robe,sd->status.robe,sd->status.name); WBUFW(buf,34) = vd->robe; offset+= 2; buf = WBUFP(buffer,offset); -- cgit v1.2.3-70-g09d2 From 9f75e121fd20aaa20e337c8664ba9a57fe90fe21 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 17:37:22 -0200 Subject: Fixed Bug #4832 Fixed Ankle Snare to behave as in official servers, you only stop walking when you reach your destination and activates all other traps in the path. http://hercules.ws/board/tracker/issue-4832-hunter-ht-anklesnare-serious-bug/ Signed-off-by: shennetsind --- src/map/skill.c | 6 ++++-- src/map/status.c | 2 -- src/map/unit.c | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 8e0bbabeb..5f3036565 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11445,8 +11445,10 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); - unit_movepos(bl, src->bl.x, src->bl.y, 0, 0); - clif_fixpos(bl); + if( sg->unit_id == UNT_MANHOLE ) { + unit_movepos(bl, src->bl.x, src->bl.y, 0, 0); + clif_fixpos(bl); + } sg->val2 = bl->id; } else sec = 3000; //Couldn't trap it? diff --git a/src/map/status.c b/src/map/status.c index e615d5595..8167e9949 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -997,7 +997,6 @@ void initChangeTables(void) { StatusIconChangeTable[SC_HALLUCINATION] = SI_BLANK; /* StatusChangeState (SCS_) NOMOVE */ - StatusChangeStateTable[SC_ANKLE] |= SCS_NOMOVE; StatusChangeStateTable[SC_AUTOCOUNTER] |= SCS_NOMOVE; StatusChangeStateTable[SC_TRICKDEAD] |= SCS_NOMOVE; StatusChangeStateTable[SC_BLADESTOP] |= SCS_NOMOVE; @@ -8632,7 +8631,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_CONFUSION: case SC_CLOSECONFINE: case SC_CLOSECONFINE2: - case SC_ANKLE: case SC_SPIDERWEB: case SC_ELECTRICSHOCKER: case SC_BITE: diff --git a/src/map/unit.c b/src/map/unit.c index 0104e9a42..5d2a6c794 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -890,8 +890,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) -{ +int unit_can_move(struct block_list *bl) { struct map_session_data *sd; struct unit_data *ud; struct status_change *sc; @@ -931,6 +930,9 @@ int unit_can_move(struct block_list *bl) sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1)) ) return 0; + + if( sc->data[SC_ANKLE] && !unit_is_walking(bl) ) // Ankle only stops you after you're done moving + return 0; if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB)) return 0; -- cgit v1.2.3-70-g09d2 From cba3bef47e8758ab1db43bd5ee3b6fcc5f9a498b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 18:42:25 -0200 Subject: New skill config After due consideration we thought it'd be in the best interest of the community to provide a switch to this official feature since it drastically change the way traps can be used Signed-off-by: shennetsind --- conf/battle/skill.conf | 5 +++++ src/map/battle.c | 4 ++++ src/map/battle.h | 1 + src/map/skill.c | 2 +- src/map/status.c | 4 ++++ src/map/unit.c | 6 +++++- 6 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index 9006247a2..03aae2ad1 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -275,3 +275,8 @@ invincible.nodamage: no // On official server, a fix is in place that prevents the switching of weapons to cancel songs. // Default: yes dancing_weaponswitch_fix: yes + +// Skill Trap Type +// 0: (official) traps only makes player unable to move after its walk path is complete, and it activates other traps on the way. +// 1: trap makes player stops moving right when stepping over it. +skill_trap_type: 0 diff --git a/src/map/battle.c b/src/map/battle.c index d04eb1aa8..24aa335af 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5864,6 +5864,10 @@ static const struct _battle_data { { "homunculus_max_level", &battle_config.hom_max_level, 99, 0, MAX_LEVEL, }, { "homunculus_S_max_level", &battle_config.hom_S_max_level, 150, 0, MAX_LEVEL, }, { "mob_size_influence", &battle_config.mob_size_influence, 0, 0, 1, }, + /** + * Hercules + **/ + { "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 1c1b1d38c..0943b1aa3 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -483,6 +483,7 @@ extern struct Battle_Config int atcommand_mobinfo_type; int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] + int skill_trap_type; } battle_config; void do_init_battle(void); diff --git a/src/map/skill.c b/src/map/skill.c index 5f3036565..06982bea7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11445,7 +11445,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); - if( sg->unit_id == UNT_MANHOLE ) { + if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type ) { unit_movepos(bl, src->bl.x, src->bl.y, 0, 0); clif_fixpos(bl); } diff --git a/src/map/status.c b/src/map/status.c index 8167e9949..0379d05d2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8646,6 +8646,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_PARALYSIS: unit_stop_walking(bl,1); break; + case SC_ANKLE: + if( battle_config.skill_trap_type ) + unit_stop_walking(bl,1); + break; case SC_HIDING: case SC_CLOAKING: case SC_CLOAKINGEXCEED: diff --git a/src/map/unit.c b/src/map/unit.c index 5d2a6c794..148a35782 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -350,6 +350,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { + if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + return 0; // When you come to the center of the grid because the change of destination while you're walking right now // Call a function from a timer unit_walktoxy_sub ud->state.change_walk_target = 1; @@ -425,6 +427,8 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { + if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + return 0; ud->state.change_walk_target = 1; set_mobstate(bl, flag&2); return 1; @@ -931,7 +935,7 @@ int unit_can_move(struct block_list *bl) { ) return 0; - if( sc->data[SC_ANKLE] && !unit_is_walking(bl) ) // Ankle only stops you after you're done moving + if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving return 0; if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB)) -- cgit v1.2.3-70-g09d2 From e15fe6131c970f8f7574d38f3a3cc62e1873a072 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 29 Jan 2013 18:19:16 -0200 Subject: Fixed Bug #6305 Brandish spear can now be used by rune knights riding dragons. Made riding state check for both peco and dragon, created a new state for peco-only so that the functionality isn't lost. http://hercules.ws/board/tracker/issue-6305-brandish-spear-bug-for-rune-knight/ Signed-off-by: shennetsind --- db/re/skill_require_db.txt | 7 +-- src/map/skill.c | 116 ++++++++++++++++++++------------------------- src/map/skill.h | 4 +- 3 files changed, 57 insertions(+), 70 deletions(-) (limited to 'src') diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt index 911b0a15d..1d6304406 100644 --- a/db/re/skill_require_db.txt +++ b/db/re/skill_require_db.txt @@ -11,7 +11,7 @@ // recover_weight_rate = Requires to be less than 50% weight // water = Requires to be standing on a water cell // cart = Requires a Pushcart -// riding = Requires to ride a Peco +// riding = Requires to ride either a peco or a dragon // falcon = Requires a Falcon // sight = Requires Sight skill activated // hiding = Requires Hiding skill activated @@ -26,8 +26,9 @@ // poisonweapon = Requires to be under Poisoning Weapon. // rollingcutter = Requires at least one Rotation Counter from Rolling Cutter. // elementalspirit = Requires to have an Elemental Spirit summoned. -// mh_fighting = eleanor fighthing mode -// mh_grappling = eleanor grappling mode +// mh_fighting = Requires Eleanor fighthing mode +// mh_grappling = Requires Eleanor grappling mode +// peco = Requires riding a peco 5,0,0,8:8:8:8:8:15:15:15:15:15,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_BASH#バッシュ# 6,0,0,4:5:6:7:8:9:10:11:12:13,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#プロボック# diff --git a/src/map/skill.c b/src/map/skill.c index 06982bea7..752b1ece0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13058,7 +13058,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id } break; case ST_RIDING: - if(!pc_isriding(sd)) { + if(!pc_isriding(sd) || !pc_isridingdragon(sd)) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -13120,73 +13120,64 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; - /** - * Rune Knight - **/ case ST_RIDINGDRAGON: if( !pc_isridingdragon(sd) ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } break; - /** - * Wug - **/ case ST_WUG: if( !pc_iswug(sd) ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } break; - /** - * Riding Wug - **/ case ST_RIDINGWUG: if( !pc_isridingwug(sd) ){ clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } break; - /** - * Mechanic - **/ case ST_MADO: if( !pc_ismadogear(sd) ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } break; - /** - * Sorcerer - **/ case ST_ELEMENTALSPIRIT: if(!sd->ed) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_EL_SUMMON,0); return 0; } break; - case ST_POISONINGWEAPON: - if (!(sc && sc->data[SC_POISONINGWEAPON])) { - clif_skill_fail(sd, skill_id, USESKILL_FAIL_GC_POISONINGWEAPON, 0); - return 0; - } - break; - case ST_ROLLINGCUTTER: - if (!(sc && sc->data[SC_ROLLINGCUTTER])) { - clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0); - return 0; - } - break; - case ST_MH_FIGHTING: - if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_FIGHTING)){ - clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - return 0; - } - case ST_MH_GRAPPLING: - if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_GRAPPLING)){ - clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - return 0; - } + case ST_POISONINGWEAPON: + if (!(sc && sc->data[SC_POISONINGWEAPON])) { + clif_skill_fail(sd, skill_id, USESKILL_FAIL_GC_POISONINGWEAPON, 0); + return 0; + } + break; + case ST_ROLLINGCUTTER: + if (!(sc && sc->data[SC_ROLLINGCUTTER])) { + clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0); + return 0; + } + break; + case ST_MH_FIGHTING: + if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_FIGHTING)){ + clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + return 0; + } + case ST_MH_GRAPPLING: + if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_GRAPPLING)){ + clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + return 0; + } + case ST_PECO: + if(!pc_isriding(sd)) { + clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + return 0; + } + break; } if(require.mhp > 0 && get_percentage(status->hp, status->max_hp) > require.mhp) { @@ -17605,32 +17596,29 @@ static bool skill_parse_row_requiredb(char* split[], int columns, int current) } skill_split_atoi(split[9],skill_db[idx].ammo_qty); - if( strcmpi(split[10],"hiding")==0 ) skill_db[idx].state = ST_HIDING; - else if( strcmpi(split[10],"cloaking")==0 ) skill_db[idx].state = ST_CLOAKING; - else if( strcmpi(split[10],"hidden")==0 ) skill_db[idx].state = ST_HIDDEN; - else if( strcmpi(split[10],"riding")==0 ) skill_db[idx].state = ST_RIDING; - else if( strcmpi(split[10],"falcon")==0 ) skill_db[idx].state = ST_FALCON; - else if( strcmpi(split[10],"cart")==0 ) skill_db[idx].state = ST_CART; - else if( strcmpi(split[10],"shield")==0 ) skill_db[idx].state = ST_SHIELD; - else if( strcmpi(split[10],"sight")==0 ) skill_db[idx].state = ST_SIGHT; - else if( strcmpi(split[10],"explosionspirits")==0 ) skill_db[idx].state = ST_EXPLOSIONSPIRITS; - else if( strcmpi(split[10],"cartboost")==0 ) skill_db[idx].state = ST_CARTBOOST; - else if( strcmpi(split[10],"recover_weight_rate")==0 ) skill_db[idx].state = ST_RECOV_WEIGHT_RATE; - else if( strcmpi(split[10],"move_enable")==0 ) skill_db[idx].state = ST_MOVE_ENABLE; - else if( strcmpi(split[10],"water")==0 ) skill_db[idx].state = ST_WATER; - /** - * New States - **/ - else if( strcmpi(split[10],"dragon")==0 ) skill_db[idx].state = ST_RIDINGDRAGON; - else if( strcmpi(split[10],"warg")==0 ) skill_db[idx].state = ST_WUG; - else if( strcmpi(split[10],"ridingwarg")==0 ) skill_db[idx].state = ST_RIDINGWUG; - else if( strcmpi(split[10],"mado")==0 ) skill_db[idx].state = ST_MADO; - else if( strcmpi(split[10],"elementalspirit")==0 ) skill_db[idx].state = ST_ELEMENTALSPIRIT; - else if (strcmpi(split[10], "poisonweapon") == 0) skill_db[idx].state = ST_POISONINGWEAPON; - else if (strcmpi(split[10], "rollingcutter") == 0) skill_db[idx].state = ST_ROLLINGCUTTER; - else if (strcmpi(split[10], "mh_fighting") == 0) skill_db[idx].state = ST_MH_FIGHTING; - else if (strcmpi(split[10], "mh_grappling") == 0) skill_db[idx].state = ST_MH_GRAPPLING; - + if( strcmpi(split[10],"hiding") == 0 ) skill_db[idx].state = ST_HIDING; + else if( strcmpi(split[10],"cloaking") == 0 ) skill_db[idx].state = ST_CLOAKING; + else if( strcmpi(split[10],"hidden") == 0 ) skill_db[idx].state = ST_HIDDEN; + else if( strcmpi(split[10],"riding") == 0 ) skill_db[idx].state = ST_RIDING; + else if( strcmpi(split[10],"falcon") == 0 ) skill_db[idx].state = ST_FALCON; + else if( strcmpi(split[10],"cart") == 0 ) skill_db[idx].state = ST_CART; + else if( strcmpi(split[10],"shield") == 0 ) skill_db[idx].state = ST_SHIELD; + else if( strcmpi(split[10],"sight") == 0 ) skill_db[idx].state = ST_SIGHT; + else if( strcmpi(split[10],"explosionspirits") == 0 ) skill_db[idx].state = ST_EXPLOSIONSPIRITS; + else if( strcmpi(split[10],"cartboost") == 0 ) skill_db[idx].state = ST_CARTBOOST; + else if( strcmpi(split[10],"recover_weight_rate") == 0 ) skill_db[idx].state = ST_RECOV_WEIGHT_RATE; + else if( strcmpi(split[10],"move_enable") == 0 ) skill_db[idx].state = ST_MOVE_ENABLE; + else if( strcmpi(split[10],"water") == 0 ) skill_db[idx].state = ST_WATER; + else if( strcmpi(split[10],"dragon") == 0 ) skill_db[idx].state = ST_RIDINGDRAGON; + else if( strcmpi(split[10],"warg") == 0 ) skill_db[idx].state = ST_WUG; + else if( strcmpi(split[10],"ridingwarg") == 0 ) skill_db[idx].state = ST_RIDINGWUG; + else if( strcmpi(split[10],"mado") == 0 ) skill_db[idx].state = ST_MADO; + else if( strcmpi(split[10],"elementalspirit") == 0 ) skill_db[idx].state = ST_ELEMENTALSPIRIT; + else if( strcmpi(split[10],"poisonweapon") == 0 ) skill_db[idx].state = ST_POISONINGWEAPON; + else if( strcmpi(split[10],"rollingcutter") == 0 ) skill_db[idx].state = ST_ROLLINGCUTTER; + else if( strcmpi(split[10],"mh_fighting") == 0 ) skill_db[idx].state = ST_MH_FIGHTING; + else if( strcmpi(split[10],"mh_grappling") == 0 ) skill_db[idx].state = ST_MH_GRAPPLING; + else if( strcmpi(split[10],"peco") == 0 ) skill_db[idx].state = ST_PECO; /** * Unknown or no state **/ diff --git a/src/map/skill.h b/src/map/skill.h index dc7499857..9b6ba1b0c 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -392,9 +392,6 @@ enum { ST_RECOV_WEIGHT_RATE, ST_MOVE_ENABLE, ST_WATER, - /** - * 3rd States - **/ ST_RIDINGDRAGON, ST_WUG, ST_RIDINGWUG, @@ -404,6 +401,7 @@ enum { ST_ROLLINGCUTTER, ST_MH_FIGHTING, ST_MH_GRAPPLING, + ST_PECO, }; enum e_skill { -- cgit v1.2.3-70-g09d2 From 87a965fa2950ccd5b4653311800a13437564ef0e Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 29 Jan 2013 18:20:13 -0200 Subject: Fixed battle_calc_cardfix typo, Thanks to MaminhA's hawk eyes Signed-off-by: shennetsind --- src/map/battle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 24aa335af..2198b25ec 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -623,7 +623,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li } #endif if( (left&1) && cardfix_ != 1000 ) - damage = damage * cardfix / 1000; + damage = damage * cardfix_ / 1000; else if( cardfix != 1000 ) damage = damage * cardfix / 1000; -- cgit v1.2.3-70-g09d2 From 3ed04f57c71a0b3486bb96b8319f852028dc8c7e Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 30 Jan 2013 19:40:17 -0200 Subject: Fixing skill_trap_type bug, special thanks to exneval Signed-off-by: shennetsind --- src/map/unit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/unit.c b/src/map/unit.c index 148a35782..b7da5629f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -350,7 +350,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { - if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path return 0; // When you come to the center of the grid because the change of destination while you're walking right now // Call a function from a timer unit_walktoxy_sub @@ -427,7 +427,7 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { - if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path return 0; ud->state.change_walk_target = 1; set_mobstate(bl, flag&2); -- cgit v1.2.3-70-g09d2 From 13317f0e0db8cce32da951c25707840d6357d079 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 Jan 2013 11:20:35 -0200 Subject: Fixed Bug #7038 Spider web no longer triggers on players on non-pvp maps http://hercules.ws/board/tracker/issue-7038-spider-web/ (also fixed tab align on switch and a logical thing on skill_additional_effect) Signed-off-by: shennetsind --- src/map/skill.c | 326 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 161 insertions(+), 165 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 752b1ece0..ecd1ff8ac 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1560,7 +1560,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint if (skill == AS_SONICBLOW) pc_stop_attack(sd); //Special case, Sonic Blow autospell should stop the player attacking. - if (skill == PF_SPIDERWEB) //Special case, due to its nature of coding. + else if (skill == PF_SPIDERWEB) //Special case, due to its nature of coding. type = CAST_GROUND; sd->state.autocast = 1; @@ -11041,195 +11041,191 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un type = status_skill2sc(sg->skill_id); sce = (sc && type != -1)?sc->data[type]:NULL; skill_id = sg->skill_id; //In case the group is deleted, we need to return the correct skill id, still. - switch (sg->unit_id) - { - case UNT_SPIDERWEB: - if( sc && sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1 > 0 ) - { // If you are fiberlocked and can't move, it will only increase your fireweakness level. [Inkfish] - sc->data[SC_SPIDERWEB]->val2++; - break; - } - else if( sc ) - { - int sec = skill_get_time2(sg->skill_id,sg->skill_lv); - if( status_change_start(bl,type,10000,sg->skill_lv,1,sg->group_id,0,sec,8) ) - { - const struct TimerData* td = sc->data[type]?get_timer(sc->data[type]->timer):NULL; - if( td ) - sec = DIFF_TICK(td->tick, tick); - map_moveblock(bl, src->bl.x, src->bl.y, tick); - clif_fixpos(bl); - sg->val2 = bl->id; + switch (sg->unit_id) { + case UNT_SPIDERWEB: + if( sc && sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1 > 0 ) { + // If you are fiberlocked and can't move, it will only increase your fireweakness level. [Inkfish] + sc->data[SC_SPIDERWEB]->val2++; + break; + } else if( sc && battle_check_target(&sg->unit->bl,bl,sg->target_flag) > 0 ) { + int sec = skill_get_time2(sg->skill_id,sg->skill_lv); + if( status_change_start(bl,type,10000,sg->skill_lv,1,sg->group_id,0,sec,8) ) { + const struct TimerData* td = sc->data[type]?get_timer(sc->data[type]->timer):NULL; + if( td ) + sec = DIFF_TICK(td->tick, tick); + map_moveblock(bl, src->bl.x, src->bl.y, tick); + clif_fixpos(bl); + sg->val2 = bl->id; + } + else + sec = 3000; //Couldn't trap it? + sg->limit = DIFF_TICK(tick,sg->tick)+sec; } - else - sec = 3000; //Couldn't trap it? - sg->limit = DIFF_TICK(tick,sg->tick)+sec; - } - break; - case UNT_SAFETYWALL: - if (!sce) - sc_start4(bl,type,100,sg->skill_lv,sg->skill_id,sg->group_id,0,sg->limit); - break; + break; + case UNT_SAFETYWALL: + if (!sce) + sc_start4(bl,type,100,sg->skill_lv,sg->skill_id,sg->group_id,0,sg->limit); + break; - case UNT_PNEUMA: - case UNT_CHAOSPANIC: - case UNT_MAELSTROM: - if (!sce) - sc_start4(bl,type,100,sg->skill_lv,sg->group_id,0,0,sg->limit); - break; - case UNT_BLOODYLUST: - if (sg->src_id == bl->id) - break; //Does not affect the caster. - if (!sce) { - TBL_PC *sd = BL_CAST(BL_PC, bl); //prevent fullheal exploit - if (sd && sd->bloodylust_tick && DIFF_TICK(gettick(), sd->bloodylust_tick) < skill_get_time2(SC_BLOODYLUST, 1)) - clif_skill_nodamage(&src->bl,bl,sg->skill_id,sg->skill_lv, - sc_start4(bl, type, 100, sg->skill_lv, 1, 0, 0, skill_get_time(LK_BERSERK, sg->skill_lv))); - else { - if (sd) sd->bloodylust_tick = gettick(); + case UNT_PNEUMA: + case UNT_CHAOSPANIC: + case UNT_MAELSTROM: + if (!sce) + sc_start4(bl,type,100,sg->skill_lv,sg->group_id,0,0,sg->limit); + break; + case UNT_BLOODYLUST: + if (sg->src_id == bl->id) + break; //Does not affect the caster. + if (!sce) { + TBL_PC *sd = BL_CAST(BL_PC, bl); //prevent fullheal exploit + if (sd && sd->bloodylust_tick && DIFF_TICK(gettick(), sd->bloodylust_tick) < skill_get_time2(SC_BLOODYLUST, 1)) clif_skill_nodamage(&src->bl,bl,sg->skill_id,sg->skill_lv, - sc_start4(bl, type, 100, sg->skill_lv, 0, 0, 0, skill_get_time(LK_BERSERK, sg->skill_lv))); + sc_start4(bl, type, 100, sg->skill_lv, 1, 0, 0, skill_get_time(LK_BERSERK, sg->skill_lv))); + else { + if (sd) sd->bloodylust_tick = gettick(); + clif_skill_nodamage(&src->bl,bl,sg->skill_id,sg->skill_lv, + sc_start4(bl, type, 100, sg->skill_lv, 0, 0, 0, skill_get_time(LK_BERSERK, sg->skill_lv))); + } } - } - break; + break; - case UNT_WARP_WAITING: { - int working = sg->val1&0xffff; + case UNT_WARP_WAITING: { + int working = sg->val1&0xffff; - if(bl->type==BL_PC && !working){ - struct map_session_data *sd = (struct map_session_data *)bl; - if((!sd->chatID || battle_config.chat_warpportal) - && sd->ud.to_x == src->bl.x && sd->ud.to_y == src->bl.y) - { - int x = sg->val2>>16; - int y = sg->val2&0xffff; - int count = sg->val1>>16; - unsigned short m = sg->val3; + if(bl->type==BL_PC && !working){ + struct map_session_data *sd = (struct map_session_data *)bl; + if((!sd->chatID || battle_config.chat_warpportal) + && sd->ud.to_x == src->bl.x && sd->ud.to_y == src->bl.y) + { + int x = sg->val2>>16; + int y = sg->val2&0xffff; + int count = sg->val1>>16; + unsigned short m = sg->val3; - if( --count <= 0 ) - skill_delunitgroup(sg); + if( --count <= 0 ) + skill_delunitgroup(sg); - if ( map_mapindex2mapid(sg->val3) == sd->bl.m && x == sd->bl.x && y == sd->bl.y ) - working = 1;/* we break it because officials break it, lovely stuff. */ + if ( map_mapindex2mapid(sg->val3) == sd->bl.m && x == sd->bl.x && y == sd->bl.y ) + working = 1;/* we break it because officials break it, lovely stuff. */ - sg->val1 = (count<<16)|working; + sg->val1 = (count<<16)|working; - pc_setpos(sd,m,x,y,CLR_TELEPORT); + pc_setpos(sd,m,x,y,CLR_TELEPORT); + } + } else if(bl->type == BL_MOB && battle_config.mob_warp&2) { + int16 m = map_mapindex2mapid(sg->val3); + if (m < 0) break; //Map not available on this map-server. + unit_warp(bl,m,sg->val2>>16,sg->val2&0xffff,CLR_TELEPORT); } - } else if(bl->type == BL_MOB && battle_config.mob_warp&2) { - int16 m = map_mapindex2mapid(sg->val3); - if (m < 0) break; //Map not available on this map-server. - unit_warp(bl,m,sg->val2>>16,sg->val2&0xffff,CLR_TELEPORT); } - } - break; + break; - case UNT_QUAGMIRE: - if( !sce && battle_check_target(&sg->unit->bl,bl,sg->target_flag) > 0 ) - sc_start4(bl,type,100,sg->skill_lv,sg->group_id,0,0,sg->limit); - break; + case UNT_QUAGMIRE: + if( !sce && battle_check_target(&sg->unit->bl,bl,sg->target_flag) > 0 ) + sc_start4(bl,type,100,sg->skill_lv,sg->group_id,0,0,sg->limit); + break; - case UNT_VOLCANO: - case UNT_DELUGE: - case UNT_VIOLENTGALE: - if(!sce) - sc_start(bl,type,100,sg->skill_lv,sg->limit); - break; + case UNT_VOLCANO: + case UNT_DELUGE: + case UNT_VIOLENTGALE: + if(!sce) + sc_start(bl,type,100,sg->skill_lv,sg->limit); + break; - case UNT_SUITON: - if(!sce) - sc_start4(bl,type,100,sg->skill_lv, - map_flag_vs(bl->m) || battle_check_target(&src->bl,bl,BCT_ENEMY)>0?1:0, //Send val3 =1 to reduce agi. - 0,0,sg->limit); - break; + case UNT_SUITON: + if(!sce) + sc_start4(bl,type,100,sg->skill_lv, + map_flag_vs(bl->m) || battle_check_target(&src->bl,bl,BCT_ENEMY)>0?1:0, //Send val3 =1 to reduce agi. + 0,0,sg->limit); + break; - case UNT_HERMODE: - if (sg->src_id!=bl->id && battle_check_target(&src->bl,bl,BCT_PARTY|BCT_GUILD) > 0) - status_change_clear_buffs(bl,1); //Should dispell only allies. - case UNT_RICHMANKIM: - case UNT_ETERNALCHAOS: - case UNT_DRUMBATTLEFIELD: - case UNT_RINGNIBELUNGEN: - case UNT_ROKISWEIL: - case UNT_INTOABYSS: - case UNT_SIEGFRIED: - //Needed to check when a dancer/bard leaves their ensemble area. - if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) - return skill_id; - if (!sce) - sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit); - break; - case UNT_WHISTLE: - case UNT_ASSASSINCROSS: - case UNT_POEMBRAGI: - case UNT_APPLEIDUN: - case UNT_HUMMING: - case UNT_DONTFORGETME: - case UNT_FORTUNEKISS: - case UNT_SERVICEFORYOU: - if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) - return 0; + case UNT_HERMODE: + if (sg->src_id!=bl->id && battle_check_target(&src->bl,bl,BCT_PARTY|BCT_GUILD) > 0) + status_change_clear_buffs(bl,1); //Should dispell only allies. + case UNT_RICHMANKIM: + case UNT_ETERNALCHAOS: + case UNT_DRUMBATTLEFIELD: + case UNT_RINGNIBELUNGEN: + case UNT_ROKISWEIL: + case UNT_INTOABYSS: + case UNT_SIEGFRIED: + //Needed to check when a dancer/bard leaves their ensemble area. + if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) + return skill_id; + if (!sce) + sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit); + break; + case UNT_WHISTLE: + case UNT_ASSASSINCROSS: + case UNT_POEMBRAGI: + case UNT_APPLEIDUN: + case UNT_HUMMING: + case UNT_DONTFORGETME: + case UNT_FORTUNEKISS: + case UNT_SERVICEFORYOU: + if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) + return 0; - if (!sc) return 0; - if (!sce) - sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit); - else if (sce->val4 == 1) { - //Readjust timers since the effect will not last long. - sce->val4 = 0; - delete_timer(sce->timer, status_change_timer); - sce->timer = add_timer(tick+sg->limit, status_change_timer, bl->id, type); - } - break; + if (!sc) return 0; + if (!sce) + sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit); + else if (sce->val4 == 1) { + //Readjust timers since the effect will not last long. + sce->val4 = 0; + delete_timer(sce->timer, status_change_timer); + sce->timer = add_timer(tick+sg->limit, status_change_timer, bl->id, type); + } + break; - case UNT_FOGWALL: - if (!sce) - { - sc_start4(bl, type, 100, sg->skill_lv, sg->val1, sg->val2, sg->group_id, sg->limit); - if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0) - skill_additional_effect (ss, bl, sg->skill_id, sg->skill_lv, BF_MISC, ATK_DEF, tick); - } - break; + case UNT_FOGWALL: + if (!sce) + { + sc_start4(bl, type, 100, sg->skill_lv, sg->val1, sg->val2, sg->group_id, sg->limit); + if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0) + skill_additional_effect (ss, bl, sg->skill_id, sg->skill_lv, BF_MISC, ATK_DEF, tick); + } + break; - case UNT_GRAVITATION: - if (!sce) - sc_start4(bl,type,100,sg->skill_lv,0,BCT_ENEMY,sg->group_id,sg->limit); - break; + case UNT_GRAVITATION: + if (!sce) + sc_start4(bl,type,100,sg->skill_lv,0,BCT_ENEMY,sg->group_id,sg->limit); + break; -// officially, icewall has no problems existing on occupied cells [ultramage] -// case UNT_ICEWALL: //Destroy the cell. [Skotlex] -// src->val1 = 0; -// if(src->limit + sg->tick > tick + 700) -// src->limit = DIFF_TICK(tick+700,sg->tick); -// break; + // officially, icewall has no problems existing on occupied cells [ultramage] + // case UNT_ICEWALL: //Destroy the cell. [Skotlex] + // src->val1 = 0; + // if(src->limit + sg->tick > tick + 700) + // src->limit = DIFF_TICK(tick+700,sg->tick); + // break; - case UNT_MOONLIT: - //Knockback out of area if affected char isn't in Moonlit effect - if (sc && sc->data[SC_DANCING] && (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT) - break; - if (ss == bl) //Also needed to prevent infinite loop crash. + case UNT_MOONLIT: + //Knockback out of area if affected char isn't in Moonlit effect + if (sc && sc->data[SC_DANCING] && (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT) + break; + if (ss == bl) //Also needed to prevent infinite loop crash. + break; + skill_blown(ss,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv),unit_getdir(bl),0); break; - skill_blown(ss,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv),unit_getdir(bl),0); - break; - case UNT_WALLOFTHORN: - if( status_get_mode(bl)&MD_BOSS ) - break; // iRO Wiki says that this skill don't affect to Boss monsters. - if( map_flag_vs(bl->m) || bl->id == src->bl.id || battle_check_target(&src->bl,bl, BCT_ENEMY) == 1 ) - skill_attack(skill_get_type(sg->skill_id), ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0); - break; + case UNT_WALLOFTHORN: + if( status_get_mode(bl)&MD_BOSS ) + break; // iRO Wiki says that this skill don't affect to Boss monsters. + if( map_flag_vs(bl->m) || bl->id == src->bl.id || battle_check_target(&src->bl,bl, BCT_ENEMY) == 1 ) + skill_attack(skill_get_type(sg->skill_id), ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0); + break; - case UNT_VOLCANIC_ASH: - if (!sce) - sc_start(bl, SC_ASH, 100, sg->skill_lv, skill_get_time(MH_VOLCANIC_ASH, sg->skill_lv)); - break; + case UNT_VOLCANIC_ASH: + if (!sce) + sc_start(bl, SC_ASH, 100, sg->skill_lv, skill_get_time(MH_VOLCANIC_ASH, sg->skill_lv)); + break; - case UNT_GD_LEADERSHIP: - case UNT_GD_GLORYWOUNDS: - case UNT_GD_SOULCOLD: - case UNT_GD_HAWKEYES: - if ( !sce ) - sc_start4(bl,type,100,sg->skill_lv,0,0,0,1000); - break; + case UNT_GD_LEADERSHIP: + case UNT_GD_GLORYWOUNDS: + case UNT_GD_SOULCOLD: + case UNT_GD_HAWKEYES: + if ( !sce ) + sc_start4(bl,type,100,sg->skill_lv,0,0,0,1000); + break; } return skill_id; } -- cgit v1.2.3-70-g09d2 From fc2e159d8c3d45ddeae4ce1dcc84312303442745 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 Jan 2013 15:51:50 -0200 Subject: Fixed Bug #6918 @follow will not stop immeadily when turned off, instead of waiting for the current walk path to be complete. http://hercules.ws/board/tracker/issue-6918-follow-not-releasing-hold/ Signed-off-by: shennetsind --- src/map/pc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index 89925f8f2..abfbbcc12 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5518,6 +5518,8 @@ int pc_stop_following (struct map_session_data *sd) sd->followtarget = -1; sd->ud.target_to = 0; + unit_stop_walking(&sd->bl, 1); + return 0; } -- cgit v1.2.3-70-g09d2 From 638e2b5c985c13a8138d1cb166d5fdb8148b690c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 Jan 2013 16:11:07 -0200 Subject: Fixed Bug #3080 Replaced strncpy with safestrncpy where I found would be beneficial. http://hercules.ws/board/tracker/issue-3080-safestrncpy-instead-of-strncpy-where-applicable/ Also modifying headers accordingly. Signed-off-by: shennetsind --- src/char/int_guild.c | 7 ++++--- src/char/int_pet.c | 7 ++++--- src/common/mapindex.c | 9 +++++---- src/login/login.c | 7 ++++--- src/map/chrif.c | 7 ++++--- src/map/clif.c | 2 +- src/map/elemental.c | 10 ++++++---- src/map/homunculus.c | 11 ++++++----- src/map/map.c | 9 +++++---- src/map/mercenary.c | 9 +++++---- src/map/mob.c | 7 ++++--- src/map/npc.c | 9 +++++---- 12 files changed, 53 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 7090af5ee..9cb17dca8 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/mmo.h" @@ -1815,7 +1816,7 @@ int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int le g->member[0].position = 0; //Position 0: guild Master. g->member[0].modified = GS_MEMBER_MODIFIED; - strncpy(g->master, name, len); + safestrncpy(g->master, name, len); if (len < NAME_LENGTH) g->master[len] = '\0'; diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 114398290..d9b0cf5ef 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/mmo.h" #include "../common/malloc.h" @@ -184,7 +185,7 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name) { memset(pet_pt, 0, sizeof(struct s_pet)); - strncpy(pet_pt->name, pet_name, NAME_LENGTH); + safestrncpy(pet_pt->name, pet_name, NAME_LENGTH); if(incuvate == 1) pet_pt->account_id = pet_pt->char_id = 0; else { diff --git a/src/common/mapindex.c b/src/common/mapindex.c index d46047833..cea945ac0 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/mmo.h" #include "../common/showmsg.h" @@ -37,7 +38,7 @@ const char* mapindex_getmapname(const char* string, char* output) len -= 4; // strip .gat extension len = min(len, MAP_NAME_LENGTH-1); - strncpy(dest, string, len+1); + safestrncpy(dest, string, len+1); memset(&dest[len], '\0', MAP_NAME_LENGTH-len); return dest; @@ -61,7 +62,7 @@ const char* mapindex_getmapname_ext(const char* string, char* output) ShowWarning("(mapindex_normalize_name) Map name '%*s' is too long!\n", 2*MAP_NAME_LENGTH, buf); len--; } - strncpy(dest, buf, len+1); + safestrncpy(dest, buf, len+1); if (len < 4 || stricmp(&dest[len-4], ".gat") != 0) { strcpy(&dest[len], ".gat"); diff --git a/src/login/login.c b/src/login/login.c index e079dbaf2..625e0f5c6 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/core.h" #include "../common/db.h" @@ -1596,7 +1597,7 @@ int login_config_read(const char* cfgName) continue; if(!strcmpi(w1,"timestamp_format")) - strncpy(timestamp_format, w2, 20); + safestrncpy(timestamp_format, w2, 20); else if(!strcmpi(w1,"stdout_with_ansisequence")) stdout_with_ansisequence = config_switch(w2); else if(!strcmpi(w1,"console_silent")) { diff --git a/src/map/chrif.c b/src/map/chrif.c index e109f7095..3ad164b89 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" @@ -246,7 +247,7 @@ int chrif_setip(const char* ip) { return 0; } - strncpy(char_ip_str, ip, sizeof(char_ip_str)); + safestrncpy(char_ip_str, ip, sizeof(char_ip_str)); ShowInfo("Char Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(char_ip, ip_str)); diff --git a/src/map/clif.c b/src/map/clif.c index 3f4ea8bc2..0e555252b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -203,7 +203,7 @@ int clif_setip(const char* ip) return 0; } - strncpy(map_ip_str, ip, sizeof(map_ip_str)); + safestrncpy(map_ip_str, ip, sizeof(map_ip_str)); ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(map_ip, ip_str)); return 1; } diff --git a/src/map/elemental.c b/src/map/elemental.c index 90b90c1e3..f6c9eff84 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" @@ -10,6 +11,7 @@ #include "../common/showmsg.h" #include "../common/utils.h" #include "../common/random.h" +#include "../common/strlib.h" #include "log.h" #include "clif.h" @@ -795,8 +797,8 @@ int read_elementaldb(void) { db = &elemental_db[j]; db->class_ = atoi(str[0]); - strncpy(db->sprite, str[1], NAME_LENGTH); - strncpy(db->name, str[2], NAME_LENGTH); + safestrncpy(db->sprite, str[1], NAME_LENGTH); + safestrncpy(db->name, str[2], NAME_LENGTH); db->lv = atoi(str[3]); status = &db->status; diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 081287d8a..c94a95775 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" @@ -709,7 +710,7 @@ int merc_hom_change_name_ack(struct map_session_data *sd, char* name, int flag) clif_displaymessage(sd->fd, msg_txt(280)); // You cannot use this name return 0; } - strncpy(hd->homunculus.name,name,NAME_LENGTH); + safestrncpy(hd->homunculus.name,name,NAME_LENGTH); clif_charnameack (0,&hd->bl); hd->homunculus.rename_flag = 1; clif_hominfo(sd,hd,0); @@ -887,7 +888,7 @@ int merc_create_homunculus_request(struct map_session_data *sd, int class_) memset(&homun, 0, sizeof(struct s_homunculus)); //Initial data - strncpy(homun.name, homunculus_db[i].name, NAME_LENGTH-1); + safestrncpy(homun.name, homunculus_db[i].name, NAME_LENGTH-1); homun.class_ = class_; homun.level = 1; homun.hunger = 32; //32% @@ -1050,7 +1051,7 @@ static bool read_homunculusdb_sub(char* str[], int columns, int current) } db->evo_class = classid; //Name, Food, Hungry Delay, Base Size, Evo Size, Race, Element, ASPD - strncpy(db->name,str[2],NAME_LENGTH-1); + safestrncpy(db->name,str[2],NAME_LENGTH-1); db->foodID = atoi(str[3]); db->hungryDelay = atoi(str[4]); db->base_size = atoi(str[5]); diff --git a/src/map/map.c b/src/map/map.c index a8521de7d..d2cc9c4a9 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/core.h" @@ -3216,7 +3217,7 @@ int map_config_read(char *cfgName) *ptr = '\0'; if(strcmpi(w1,"timestamp_format")==0) - strncpy(timestamp_format, w2, 20); + safestrncpy(timestamp_format, w2, 20); else if(strcmpi(w1,"stdout_with_ansisequence")==0) stdout_with_ansisequence = config_switch(w2); else if(strcmpi(w1,"console_silent")==0) { @@ -3267,7 +3268,7 @@ int map_config_read(char *cfgName) else if (strcmpi(w1, "charhelp_txt") == 0) strcpy(charhelp_txt, w2); else if(strcmpi(w1,"db_path") == 0) - strncpy(db_path,w2,255); + safestrncpy(db_path,w2,255); else if (strcmpi(w1, "console") == 0) { console = config_switch(w2); if (console) diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 973dac33e..c3fb8e3e2 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" @@ -404,8 +405,8 @@ static bool read_mercenarydb_sub(char* str[], int columns, int current) db = &mercenary_db[current]; db->class_ = atoi(str[0]); - strncpy(db->sprite, str[1], NAME_LENGTH); - strncpy(db->name, str[2], NAME_LENGTH); + safestrncpy(db->sprite, str[1], NAME_LENGTH); + safestrncpy(db->name, str[2], NAME_LENGTH); db->lv = atoi(str[3]); status = &db->status; diff --git a/src/map/mob.c b/src/map/mob.c index ac3c1dfe3..6550d9b0e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" @@ -4120,7 +4121,7 @@ static bool mob_parse_row_chatdb(char** str, const char* source, int line, int* } msg[len] = 0; // strip previously found EOL - strncpy(ms->msg, str[2], CHAT_SIZE_MAX); + safestrncpy(ms->msg, str[2], CHAT_SIZE_MAX); return true; } diff --git a/src/map/npc.c b/src/map/npc.c index 5d8a0274e..8de53a64e 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" @@ -1915,7 +1916,7 @@ void npc_addsrcfile(const char* name) file = (struct npc_src_list*)aMalloc(sizeof(struct npc_src_list) + strlen(name)); file->next = NULL; - strncpy(file->name, name, strlen(name) + 1); + safestrncpy(file->name, name, strlen(name) + 1); if( file_prev == NULL ) npc_src_files = file; else @@ -3606,7 +3607,7 @@ void npc_read_event_script(void) DBData *data; char name[64]="::"; - strncpy(name+2,config[i].event_name,62); + safestrncpy(name+2,config[i].event_name,62); script_event[i].event_count = 0; iter = db_iterator(ev_db); -- cgit v1.2.3-70-g09d2 From 74ed3ed32f33ad4df945718389d7d74ab0a53794 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 Jan 2013 16:28:43 -0200 Subject: Fixed Bug #6097 Players in Chatrooms now: - Can Equip/Unequip gear - Can Talk to NPCS - Cant use consumable Items http://hercules.ws/board/tracker/issue-6097-chatroom/ Signed-off-by: shennetsind --- src/map/clif.c | 10 +++++----- src/map/pc.h | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 0e555252b..fba5ffecc 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10141,7 +10141,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) if (pc_isdead(sd)) break; - if (pc_cant_act(sd)) + if ( pc_cant_act2(sd) ) break; if (sd->sc.count && ( @@ -10180,7 +10180,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) if (sd->npc_id != sd->npc_item_flag) return; } - else if (pc_istrading(sd)) + else if ( pc_istrading(sd) || sd->chatID ) return; //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex] @@ -10213,7 +10213,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd) return; } else if (sd->state.storage_flag || sd->sc.opt1) ; //You can equip/unequip stuff while storage is open/under status changes - else if (pc_cant_act(sd)) + else if ( pc_cant_act2(sd) ) return; if(!sd->status.inventory[index].identify) { @@ -10250,7 +10250,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd) if (sd->state.storage_flag || sd->sc.opt1) ; //You can equip/unequip stuff while storage is open/under status changes - else if (pc_cant_act(sd)) + else if ( pc_cant_act2(sd) ) return; index = RFIFOW(fd,2)-2; @@ -10272,7 +10272,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) return; } - if (pc_cant_act(sd)) + if ( pc_cant_act2(sd) ) return; bl = map_id2bl(RFIFOL(fd,2)); diff --git a/src/map/pc.h b/src/map/pc.h index 3027c5f10..870945d73 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #ifndef _PC_H_ #define _PC_H_ @@ -592,6 +593,10 @@ enum equip_index { #define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share ) #define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading ) #define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag ) + +/* equals pc_cant_act except it doesn't check for chat rooms */ +#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag ) + #define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) ) #define pc_setchatid(sd,n) ( (sd)->chatID = n ) #define pc_ishiding(sd) ( (sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) ) -- cgit v1.2.3-70-g09d2 From 7192b105201499e30a50c061e7ab2005c97d3714 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 1 Feb 2013 12:08:02 -0200 Subject: Fixed Bug #5343 SECURE_NPCTIMEOUT should be fully functional now, fixed remaining known issues. http://hercules.ws/board/tracker/issue-5343-delete-timer-error/ Signed-off-by: shennetsind --- src/map/clif.c | 15 ++++++++++----- src/map/npc.c | 3 +++ src/map/script.c | 34 +++++++++++++++------------------- 3 files changed, 28 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index fba5ffecc..f8b5119eb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11111,11 +11111,16 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) int npc_id = RFIFOL(fd,2); uint8 select = RFIFOB(fd,6); - if( (select > sd->npc_menu && select != 0xff) || select == 0 ) - { - TBL_NPC* nd = map_id2nd(npc_id); - ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name); - clif_GM_kick(NULL,sd); + if( (select > sd->npc_menu && select != 0xff) || select == 0 ) { +#ifdef SECURE_NPCTIMEOUT + if( sd->npc_idle_timer != INVALID_TIMER ) { +#endif + TBL_NPC* nd = map_id2nd(npc_id); + ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name); + clif_GM_kick(NULL,sd); +#ifdef SECURE_NPCTIMEOUT + } +#endif return; } diff --git a/src/map/npc.c b/src/map/npc.c index 8de53a64e..3aabeaf98 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -232,6 +232,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat **/ if( sd->st ) sd->st->state = END; + sd->state.menu_or_input = 0; + sd->npc_menu = 0; + /** * This guy's been idle for longer than allowed, close him. **/ diff --git a/src/map/script.c b/src/map/script.c index 4099820f1..60a61654a 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3590,30 +3590,26 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) { struct map_session_data* sd; - if(st->rid && (sd = map_id2sd(st->rid))!=NULL) - { + if(st->rid && (sd = map_id2sd(st->rid))!=NULL) { sd->st = st->bk_st; sd->npc_id = st->bk_npcid; - /** - * For the Secure NPC Timeout option (check config/Secure.h) [RR] - **/ - #if SECURE_NPCTIMEOUT - /** - * We're done with this NPC session, so we cancel the timer (if existent) and move on - **/ - if( sd->npc_idle_timer != INVALID_TIMER ) { - delete_timer(sd->npc_idle_timer,npc_rr_secure_timeout_timer); - sd->npc_idle_timer = INVALID_TIMER; - } - #endif - if(st->bk_st) - { + if(st->bk_st) { //Remove tag for removal. st->bk_st = NULL; st->bk_npcid = 0; - } - else if(dequeue_event) - { + } else if(dequeue_event) { + /** + * For the Secure NPC Timeout option (check config/Secure.h) [RR] + **/ +#if SECURE_NPCTIMEOUT + /** + * We're done with this NPC session, so we cancel the timer (if existent) and move on + **/ + if( sd->npc_idle_timer != INVALID_TIMER ) { + delete_timer(sd->npc_idle_timer,npc_rr_secure_timeout_timer); + sd->npc_idle_timer = INVALID_TIMER; + } +#endif npc_event_dequeue(sd); } } -- cgit v1.2.3-70-g09d2 From 63145d6d4079b692a3cd36eb340b9a0e71b9fbaa Mon Sep 17 00:00:00 2001 From: malufett Date: Fri, 1 Feb 2013 22:14:25 +0800 Subject: Fixed Bug #7037 Where casting MO_EXTREMITY to untargetable targets causes the caster to move in fixed location/coordinate. http://hercules.ws/board/tracker/issue-7037-asura-strike-position/?gopid=16521#entry16521 --- src/map/skill.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index ecd1ff8ac..448f54406 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1,4 +1,4 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +サソ// Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #include "../common/cbasetypes.h" @@ -9373,7 +9373,15 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) } if (target && target->m == src->m) { //Move character to target anyway. - if (unit_movepos(src, src->x+3, src->y+3, 1, 1)) + int dir, x, y; + dir = map_calc_dir(src,target->x,target->y); + if( dir > 0 && dir < 4) x = -2; + else if( dir > 4 ) x = 2; + else x = 0; + if( dir > 2 && dir < 6 ) y = -2; + else if( dir == 7 || dir < 2 ) y = 2; + else y = 0; + if (unit_movepos(src, src->x+x, src->y+y, 1, 1)) { //Display movement + animation. clif_slide(src,src->x,src->y); clif_skill_damage(src,target,tick,sd->battle_status.amotion,0,0,1,ud->skill_id, ud->skill_lv, 5); -- cgit v1.2.3-70-g09d2 From 17f2e6a581ef9e37f01cfd1b98c335a6d5b5ac75 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 1 Feb 2013 23:06:45 -0200 Subject: Fixed clif.c::clif_parse_NpcSelectMenu SECURE_NPCTIMEOUT is always defined; the check is wrong. Signed-off-by: shennetsind --- src/map/clif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index f8b5119eb..3443c1ae3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11112,13 +11112,13 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) uint8 select = RFIFOB(fd,6); if( (select > sd->npc_menu && select != 0xff) || select == 0 ) { -#ifdef SECURE_NPCTIMEOUT +#if SECURE_NPCTIMEOUT if( sd->npc_idle_timer != INVALID_TIMER ) { #endif TBL_NPC* nd = map_id2nd(npc_id); ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name); clif_GM_kick(NULL,sd); -#ifdef SECURE_NPCTIMEOUT +#if SECURE_NPCTIMEOUT } #endif return; -- cgit v1.2.3-70-g09d2 From 125b75890b29073b0264009e9638e68911a1aa07 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 1 Feb 2013 23:15:49 -0200 Subject: Added New Char-Server Rename Packet Special Thanks to Ancyker http://hercules.ws/board/tracker/issue-7040-missing-char-server-rename-packet/ Signed-off-by: shennetsind --- src/char/char.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index 83b58a0a7..d454e8bd0 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3991,6 +3991,35 @@ int parse_char(int fd) return 0; RFIFOSKIP(fd,6); break; + // char rename request + // R 08fc .l .24B + case 0x8fc: + FIFOSD_CHECK(30); + { + int i, cid =RFIFOL(fd,2); + char name[NAME_LENGTH]; + char esc_name[NAME_LENGTH*2+1]; + safestrncpy(name, (char *)RFIFOP(fd,6), NAME_LENGTH); + RFIFOSKIP(fd,30); + + ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == cid ); + if( i == MAX_CHARS ) + break; + + normalize_name(name,TRIM_CHARS); + Sql_EscapeStringLen(sql_handle, esc_name, name, strnlen(name, NAME_LENGTH)); + if( !check_char_name(name,esc_name) ) { + i = 1; + safestrncpy(sd->new_name, name, NAME_LENGTH); + } else + i = 0; + + WFIFOHEAD(fd, 4); + WFIFOW(fd,0) = 0x28e; + WFIFOW(fd,2) = i; + WFIFOSET(fd,4); + } + break; // char rename request // R 028d .l .l .24B -- cgit v1.2.3-70-g09d2 From a4a549da77879c142ed9fe667ed312dfa6e6b70a Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 12:25:53 -0200 Subject: Introducing MySQL Reconnect * mysql_reconnect_type ** 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and, if unsuccessful, the server is shut down ** 2: when mysql disconnects during runtime it tries to reconnect indefinitely mysql_reconnect_type:2 * mysql_reconnect_count ** number of reconnect attempts the server should do when the database disconnects during runtime ** only used when mysql_reconnect_type is 1 mysql_reconnect_count:1 ~Ind Signed-off-by: shennetsind --- conf/inter-server.conf | 12 ++++++++ src/common/core.c | 2 ++ src/common/sql.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++- src/common/sql.h | 1 + 4 files changed, 88 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/conf/inter-server.conf b/conf/inter-server.conf index 70bf80e5c..523437007 100644 --- a/conf/inter-server.conf +++ b/conf/inter-server.conf @@ -56,6 +56,18 @@ log_db_db: ragnarok log_codepage: log_login_db: loginlog +// == MySQL Reconnect Settings +// =========================== +// - mysql_reconnect_type +// - 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and, +// -- if unsuccessful, the server is shut down +// - 2: when mysql disconnects during runtime it tries to reconnect indefinitely +mysql_reconnect_type:2 +// - mysql_reconnect_count +// - number of reconnect attempts the server should do when the database disconnects during runtime +// - only used when mysql_reconnect_type is 1 +mysql_reconnect_count:1 + // DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL // this is meant for people who KNOW their stuff, and for some reason want to change their // database layout. [CLOWNISIUS] diff --git a/src/common/core.c b/src/common/core.c index 1e3dbb3d7..bb536a255 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -11,6 +11,7 @@ #include "../common/timer.h" #include "../common/thread.h" #include "../common/mempool.h" +#include "../common/sql.h" #endif #include @@ -319,6 +320,7 @@ int main (int argc, char **argv) display_title(); usercheck(); + Sql_Init(); rathread_init(); mempool_init(); db_init(); diff --git a/src/common/sql.c b/src/common/sql.c index 800aa89b0..96346d68c 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -15,7 +15,10 @@ #include // strlen/strnlen/memcpy/memset #include // strtoul +void hercules_mysql_error_handler(unsigned int ecode); +int mysql_reconnect_type; +int mysql_reconnect_count; /// Sql handle struct Sql @@ -74,7 +77,7 @@ Sql* Sql_Malloc(void) self->lengths = NULL; self->result = NULL; self->keepalive = INVALID_TIMER; - + self->handle.reconnect = 1; return self; } @@ -266,12 +269,14 @@ int Sql_QueryV(Sql* self, const char* query, va_list args) if( mysql_real_query(&self->handle, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } self->result = mysql_store_result(&self->handle); if( mysql_errno(&self->handle) != 0 ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } return SQL_SUCCESS; @@ -291,12 +296,14 @@ int Sql_QueryStr(Sql* self, const char* query) if( mysql_real_query(&self->handle, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } self->result = mysql_store_result(&self->handle); if( mysql_errno(&self->handle) != 0 ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } return SQL_SUCCESS; @@ -639,6 +646,7 @@ int SqlStmt_PrepareV(SqlStmt* self, const char* query, va_list args) if( mysql_stmt_prepare(self->stmt, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_params = false; @@ -660,6 +668,7 @@ int SqlStmt_PrepareStr(SqlStmt* self, const char* query) if( mysql_stmt_prepare(self->stmt, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_params = false; @@ -721,12 +730,14 @@ int SqlStmt_Execute(SqlStmt* self) mysql_stmt_execute(self->stmt) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_columns = false; if( mysql_stmt_store_result(self->stmt) )// store all the data { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } @@ -868,6 +879,7 @@ int SqlStmt_NextRow(SqlStmt* self) if( err ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } @@ -946,3 +958,63 @@ void SqlStmt_Free(SqlStmt* self) aFree(self); } } +/* receives mysql error codes during runtime (not on first-time-connects) */ +void hercules_mysql_error_handler(unsigned int ecode) { + static unsigned int retry = 1; + switch( ecode ) { + case 2003:/* Can't connect to MySQL (this error only happens here when failing to reconnect) */ + if( mysql_reconnect_type == 1 ) { + if( ++retry > mysql_reconnect_count ) { + ShowFatalError("MySQL has been unreachable for too long, %d reconnects were attempted. Shutting Down\n", retry); + exit(EXIT_FAILURE); + } + } + break; + } +} +void Sql_inter_server_read(const char* cfgName, bool first) { + int i; + char line[1024], w1[1024], w2[1024]; + FILE* fp; + + fp = fopen(cfgName, "r"); + if(fp == NULL) { + if( first ) { + ShowFatalError("File not found: %s\n", cfgName); + exit(EXIT_FAILURE); + } else + ShowError("File not found: %s\n", cfgName); + return; + } + + while(fgets(line, sizeof(line), fp)) { + i = sscanf(line, "%[^:]: %[^\r\n]", w1, w2); + if(i != 2) + continue; + + if(!strcmpi(w1,"mysql_reconnect_type")) { + mysql_reconnect_type = atoi(w2); + switch( mysql_reconnect_type ) { + case 1: + case 2: + break; + default: + ShowError("%s::mysql_reconnect_type is set to %d which is not valid, defaulting to 1...\n", cfgName, mysql_reconnect_type); + mysql_reconnect_type = 1; + break; + } + } else if(!strcmpi(w1,"mysql_reconnect_count")) { + mysql_reconnect_count = atoi(w2); + if( mysql_reconnect_count < 1 ) + mysql_reconnect_count = 1; + } else if(!strcmpi(w1,"import")) + Sql_inter_server_read(w2,false); + } + fclose(fp); + + return; +} + +void Sql_Init(void) { + Sql_inter_server_read("conf/inter-server.conf",true); +} diff --git a/src/common/sql.h b/src/common/sql.h index 898e2c778..a9d8c6136 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -339,6 +339,7 @@ void SqlStmt_ShowDebug_(SqlStmt* self, const char* debug_file, const unsigned lo /// Frees a SqlStmt returned by SqlStmt_Malloc. void SqlStmt_Free(SqlStmt* self); +void Sql_Init(void); #endif /* _COMMON_SQL_H_ */ -- cgit v1.2.3-70-g09d2 From d6d49c43b4f742c7aaffd0a102e6019c9adb7438 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 12:49:17 -0200 Subject: Fixed Bug #7046 Updated Safety Wall Renewal behavior, when taking damage higher than the health of the safety wall, excess damage will no longer be passed to the player. http://hercules.ws/board/tracker/issue-7046-safetywall-should-always-block-at-least-one-hit/ Signed-off-by: shennetsind --- src/map/battle.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 2198b25ec..4505b6a63 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -808,13 +808,12 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag * in RE, SW possesses a lifetime equal to 3 times the caster's health **/ #ifdef RENEWAL + d->dmg_lv = ATK_BLOCK; if ( ( group->val2 - damage) > 0 ) { group->val2 -= damage; - d->dmg_lv = ATK_BLOCK; - return 0; } else - damage -= group->val2; - skill_delunitgroup(group); + skill_delunitgroup(group); + return 0; #else if (--group->val2<=0) skill_delunitgroup(group); -- cgit v1.2.3-70-g09d2 From 5b378058f51019b4b0a07b89d9bf1c16add01281 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 13:10:26 -0200 Subject: Fixed Bug #7048 Items are no longer unequipped when a card within them is blacklisted (e.g. item_unequip.txt), instead the card's effect is nullified. http://hercules.ws/board/tracker/issue-7048-requestreport-regarding/ Signed-off-by: shennetsind --- src/map/clif.c | 1 + src/map/pc.c | 74 +++++++++++++++++++++++++--------------------------------- 2 files changed, 33 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 3443c1ae3..e04941336 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9358,6 +9358,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) } map_iwall_get(sd); // Updates Walls Info on this Map to Client + status_calc_pc(sd, false);/* some conditions are map-dependent so we must recalculate */ sd->state.changemap = false; } diff --git a/src/map/pc.c b/src/map/pc.c index abfbbcc12..e26191717 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -700,24 +700,24 @@ int pc_setequipindex(struct map_session_data *sd) return 0; } +//static int pc_isAllowedCardOn(struct map_session_data *sd,int s,int eqindex,int flag) +//{ +// int i; +// struct item *item = &sd->status.inventory[eqindex]; +// struct item_data *data; +// +// //Crafted/made/hatched items. +// if (itemdb_isspecial(item->card[0])) +// return 1; +// +// /* scan for enchant armor gems */ +// if( item->card[MAX_SLOTS - 1] && s < MAX_SLOTS - 1 ) +// s = MAX_SLOTS - 1; +// +// ARR_FIND( 0, s, i, item->card[i] && (data = itemdb_exists(item->card[i])) != NULL && data->flag.no_equip&flag ); +// return( i < s ) ? 0 : 1; +//} -static int pc_isAllowedCardOn(struct map_session_data *sd,int s,int eqindex,int flag) -{ - int i; - struct item *item = &sd->status.inventory[eqindex]; - struct item_data *data; - - //Crafted/made/hatched items. - if (itemdb_isspecial(item->card[0])) - return 1; - - /* scan for enchant armor gems */ - if( item->card[MAX_SLOTS - 1] && s < MAX_SLOTS - 1 ) - s = MAX_SLOTS - 1; - - ARR_FIND( 0, s, i, item->card[i] && (data = itemdb_exists(item->card[i])) != NULL && data->flag.no_equip&flag ); - return( i < s ) ? 0 : 1; -} bool pc_isequipped(struct map_session_data *sd, int nameid) { @@ -860,18 +860,18 @@ int pc_isequip(struct map_session_data *sd,int n) #endif if(item->sex != 2 && sd->status.sex != item->sex) return 0; - if(!map_flag_vs(sd->bl.m) && ((item->flag.no_equip&1) || !pc_isAllowedCardOn(sd,item->slot,n,1))) + if(!map_flag_vs(sd->bl.m) && ((item->flag.no_equip&1))) return 0; - if(map[sd->bl.m].flag.pvp && ((item->flag.no_equip&2) || !pc_isAllowedCardOn(sd,item->slot,n,2))) + if(map[sd->bl.m].flag.pvp && ((item->flag.no_equip&2))) return 0; - if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&4) || !pc_isAllowedCardOn(sd,item->slot,n,4))) + if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&4))) return 0; - if(map[sd->bl.m].flag.battleground && ((item->flag.no_equip&8) || !pc_isAllowedCardOn(sd,item->slot,n,8))) + if(map[sd->bl.m].flag.battleground && ((item->flag.no_equip&8))) return 0; if(map[sd->bl.m].flag.restricted) { int flag =8*map[sd->bl.m].zone; - if (item->flag.no_equip&flag || !pc_isAllowedCardOn(sd,item->slot,n,flag)) + if (item->flag.no_equip&flag) return 0; } @@ -8618,33 +8618,27 @@ int pc_checkitem(struct map_session_data *sd) if( sd->state.vending ) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam) return 0; - if( battle_config.item_check ) - {// check for invalid(ated) items - for( i = 0; i < MAX_INVENTORY; i++ ) - { + if( battle_config.item_check ) { // check for invalid(ated) items + for( i = 0; i < MAX_INVENTORY; i++ ) { id = sd->status.inventory[i].nameid; - if( id && !itemdb_available(id) ) - { + if( id && !itemdb_available(id) ) { ShowWarning("Removed invalid/disabled item id %d from inventory (amount=%d, char_id=%d).\n", id, sd->status.inventory[i].amount, sd->status.char_id); pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER); } } - for( i = 0; i < MAX_CART; i++ ) - { + for( i = 0; i < MAX_CART; i++ ) { id = sd->status.cart[i].nameid; - if( id && !itemdb_available(id) ) - { + if( id && !itemdb_available(id) ) { ShowWarning("Removed invalid/disabled item id %d from cart (amount=%d, char_id=%d).\n", id, sd->status.cart[i].amount, sd->status.char_id); pc_cart_delitem(sd, i, sd->status.cart[i].amount, 0, LOG_TYPE_OTHER); } } } - for( i = 0; i < MAX_INVENTORY; i++) - { + for( i = 0; i < MAX_INVENTORY; i++) { it = sd->inventory_data[i]; if( sd->status.inventory[i].nameid == 0 ) @@ -8653,31 +8647,27 @@ int pc_checkitem(struct map_session_data *sd) if( !sd->status.inventory[i].equip ) continue; - if( sd->status.inventory[i].equip&~pc_equippoint(sd,i) ) - { + if( sd->status.inventory[i].equip&~pc_equippoint(sd,i) ) { pc_unequipitem(sd, i, 2); calc_flag = 1; continue; } - if( it ) - { // check for forbiden items. + if( it ) { // check for forbiden items. int flag = (map[sd->bl.m].flag.restricted?(8*map[sd->bl.m].zone):0) | (!map_flag_vs(sd->bl.m)?1:0) | (map[sd->bl.m].flag.pvp?2:0) | (map_flag_gvg(sd->bl.m)?4:0) | (map[sd->bl.m].flag.battleground?8:0); - if( flag && (it->flag.no_equip&flag || !pc_isAllowedCardOn(sd,it->slot,i,flag)) ) - { + if( flag && (it->flag.no_equip&flag) ) { pc_unequipitem(sd, i, 2); calc_flag = 1; } } } - if( calc_flag && sd->state.active ) - { + if( calc_flag && sd->state.active ) { pc_checkallowskill(sd); status_calc_pc(sd,0); } -- cgit v1.2.3-70-g09d2 From 24d6aba263ff25724b8e6c9d6a228bba9fd6e756 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 13:12:57 -0200 Subject: Updating the headers of so-far modified files with outdated headers Signed-off-by: shennetsind --- src/common/core.c | 5 +++-- src/common/sql.c | 5 +++-- src/common/sql.h | 5 +++-- src/map/pc.c | 5 +++-- src/map/skill.c | 5 +++-- src/map/status.c | 5 +++-- 6 files changed, 18 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/common/core.c b/src/common/core.c index bb536a255..b1714b7a5 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/mmo.h" #include "../common/showmsg.h" diff --git a/src/common/sql.c b/src/common/sql.c index 96346d68c..d00b51694 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/common/sql.h b/src/common/sql.h index a9d8c6136..5ac92665e 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ diff --git a/src/map/pc.c b/src/map/pc.c index e26191717..49b905c0d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/core.h" // get_svn_revision() diff --git a/src/map/skill.c b/src/map/skill.c index 448f54406..f806c4ec5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1,5 +1,6 @@ -サソ// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/status.c b/src/map/status.c index 0379d05d2..8171f20ec 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" -- cgit v1.2.3-70-g09d2 From 7626b141f8e56b1739abce76f5a99cbbb2b4b159 Mon Sep 17 00:00:00 2001 From: malufett Date: Sun, 3 Feb 2013 23:21:36 +0800 Subject: Fixed Bug #7042 Fixed wrong 'if' condition in checking CELL_CHKNOPASS for the OFFICIAL_WALKPATH where clear path is considered to be limited to 14 cells it should only be with obstacles. --- src/map/unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/unit.c b/src/map/unit.c index b7da5629f..afb7cf19f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -325,7 +325,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) if( ud == NULL) return 0; #ifdef OFFICIAL_WALKPATH - if( path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS) // Check if there is an obstacle between + path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS); // Count walk path cells + if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) // Check if there is an obstacle between && wpd.path_len > 14 ) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] return 0; #endif -- cgit v1.2.3-70-g09d2 From 0dbbe22a43c72737349b5907088bd5c90d5c3d3a Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 13:36:21 -0200 Subject: Partial Fix to Bug #7039 Fixed magical reflection behavior, user reflecting now visually casts the skill back at the caster, instead of caster casting it on itself. Waiting confirmation on the other part to fix. http://hercules.ws/board/tracker/issue-7039-frost-diver/ Signed-off-by: shennetsind --- src/map/skill.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index f806c4ec5..9c07390f3 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2252,6 +2252,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds rmdamage = 1; bl = src; src = tbl; + dsrc = tbl; sd = BL_CAST(BL_PC, src); tsd = BL_CAST(BL_PC, bl); sc = status_get_sc(bl); -- cgit v1.2.3-70-g09d2 From 4671a3910c923b473d2f4efb50daf0fb343a67a9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 14:58:02 -0200 Subject: Fixed Bug #7044 Monsters in stone curse pre-stone state no longer are able to attack. http://hercules.ws/board/tracker/issue-7044-stone-curse/ Signed-off-by: shennetsind --- src/map/status.c | 34 +++++++++++++++++----------------- src/map/unit.c | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/map/status.c b/src/map/status.c index 8171f20ec..ce792cd75 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1585,7 +1585,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( sc && sc->count ) { - if (skill_id != RK_REFRESH && sc->opt1 >0 && (sc->opt1 != OPT1_CRYSTALIZE && src->type != BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc + if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc if (flag != 1) //Can't cast, casted stuff can't damage. return 0; if (!(skill_get_inf(skill_id)&INF_GROUND_SKILL)) @@ -1678,22 +1678,22 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin } } - if (sc && sc->option) - { - if (sc->option&OPTION_HIDE) - switch (skill_id) { //Usable skills while hiding. - case TF_HIDING: - case AS_GRIMTOOTH: - case RG_BACKSTAP: - case RG_RAID: - case NJ_SHADOWJUMP: - case NJ_KIRIKAGE: - case KO_YAMIKUMO: - break; - default: - //Non players can use all skills while hidden. - if (!skill_id || src->type == BL_PC) - return 0; + if (sc && sc->option) { + if (sc->option&OPTION_HIDE) { + switch (skill_id) { //Usable skills while hiding. + case TF_HIDING: + case AS_GRIMTOOTH: + case RG_BACKSTAP: + case RG_RAID: + case NJ_SHADOWJUMP: + case NJ_KIRIKAGE: + case KO_YAMIKUMO: + break; + default: + //Non players can use all skills while hidden. + if (!skill_id || src->type == BL_PC) + return 0; + } } if (sc->option&OPTION_CHASEWALK && skill_id != ST_CHASEWALK) return 0; diff --git a/src/map/unit.c b/src/map/unit.c index afb7cf19f..e901d3138 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -939,7 +939,7 @@ int unit_can_move(struct block_list *bl) { if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving return 0; - if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB)) + if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && !(sc->opt1 == OPT1_CRYSTALIZE && bl->type == BL_MOB)) return 0; if ((sc->option & OPTION_HIDE) && (!sd || pc_checkskill(sd, RG_TUNNELDRIVE) <= 0)) -- cgit v1.2.3-70-g09d2 From cc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 18:31:21 -0200 Subject: item_noequip overhaul / Fixed Bug #7048 Items are no longer unequipped when disabled by item_noequip.txt, instead their effects are nullified -- however cards in them, unless also disabled, wont have its effect nullified. Consumables will be consumed even while disabled, unless you modify the new config item_restricted_consumption_type http://hercules.ws/board/tracker/issue-7048-requestreport-regarding-to-item-noequiptxt/ Signed-off-by: shennetsind --- conf/battle/items.conf | 5 +++++ src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/pc.c | 55 +++++++++++++++----------------------------------- src/map/status.c | 14 +++++++++++++ 5 files changed, 37 insertions(+), 39 deletions(-) (limited to 'src') diff --git a/conf/battle/items.conf b/conf/battle/items.conf index 9bc2e37cc..343b4212e 100644 --- a/conf/battle/items.conf +++ b/conf/battle/items.conf @@ -75,3 +75,8 @@ gtb_sc_immunity: 50 // NOTE: Different cards that grant the same skill will both // always work independently of each other regardless of setting. autospell_stacking: no + +// Will disabled consumables (disabled by item_noequip.txt) be consumed when trying to use them? +// 1 (official): yes +// 0: no +item_restricted_consumption_type:1 \ No newline at end of file diff --git a/src/map/battle.c b/src/map/battle.c index 4505b6a63..0506f2fe9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5867,6 +5867,7 @@ static const struct _battle_data { * Hercules **/ { "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, }, + { "item_restricted_consumption_type", &battle_config.item_restricted_consumption_type,1, 0, 1, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 0943b1aa3..c5ca19b90 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -484,6 +484,7 @@ extern struct Battle_Config int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] int skill_trap_type; + int item_restricted_consumption_type; } battle_config; void do_init_battle(void); diff --git a/src/map/pc.c b/src/map/pc.c index 49b905c0d..6f608cd49 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -861,20 +861,6 @@ int pc_isequip(struct map_session_data *sd,int n) #endif if(item->sex != 2 && sd->status.sex != item->sex) return 0; - if(!map_flag_vs(sd->bl.m) && ((item->flag.no_equip&1))) - return 0; - if(map[sd->bl.m].flag.pvp && ((item->flag.no_equip&2))) - return 0; - if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&4))) - return 0; - if(map[sd->bl.m].flag.battleground && ((item->flag.no_equip&8))) - return 0; - if(map[sd->bl.m].flag.restricted) - { - int flag =8*map[sd->bl.m].zone; - if (item->flag.no_equip&flag) - return 0; - } if (sd->sc.count) { @@ -4134,16 +4120,6 @@ int pc_isUseitem(struct map_session_data *sd,int n) else if( itemdb_is_poison(nameid) && (sd->class_&MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS ) return 0; - //added item_noequip.txt items check by Maya&[Lupus] - if ( - (!map_flag_vs(sd->bl.m) && item->flag.no_equip&1) || // Normal - (map[sd->bl.m].flag.pvp && item->flag.no_equip&2) || // PVP - (map_flag_gvg(sd->bl.m) && item->flag.no_equip&4) || // GVG - (map[sd->bl.m].flag.battleground && item->flag.no_equip&8) || // Battleground - (map[sd->bl.m].flag.restricted && item->flag.no_equip&(8*map[sd->bl.m].zone)) // Zone restriction - ) - return 0; - //Gender check if(item->sex != 2 && sd->status.sex != item->sex) return 0; @@ -4222,7 +4198,7 @@ int pc_useitem(struct map_session_data *sd,int n) (itemdb_iscashfood(nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0) ) return 0; - + /* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */ if( sd->inventory_data[n]->flag.delay_consume ) { if( nameid != ITEMID_REINS_OF_MOUNT && sd->sc.option&OPTION_MOUNTING ) @@ -4273,6 +4249,21 @@ int pc_useitem(struct map_session_data *sd,int n) } } + /* on restricted maps the item is consumed but the effect is not used */ + if ( + (!map_flag_vs(sd->bl.m) && sd->inventory_data[n]->flag.no_equip&1) || // Normal + (map[sd->bl.m].flag.pvp && sd->inventory_data[n]->flag.no_equip&2) || // PVP + (map_flag_gvg(sd->bl.m) && sd->inventory_data[n]->flag.no_equip&4) || // GVG + (map[sd->bl.m].flag.battleground && sd->inventory_data[n]->flag.no_equip&8) || // Battleground + (map[sd->bl.m].flag.restricted && sd->inventory_data[n]->flag.no_equip&(8*map[sd->bl.m].zone)) // Zone restriction + ) { + if( battle_config.item_restricted_consumption_type ) { + clif_useitemack(sd,n,sd->status.inventory[n].amount-1,true); + pc_delitem(sd,n,1,1,0,LOG_TYPE_CONSUME); + } + return 0;/* regardless, effect is not run */ + } + sd->itemid = sd->status.inventory[n].nameid; sd->itemindex = n; if(sd->catch_target_class != -1) //Abort pet catching. @@ -8612,7 +8603,6 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { int pc_checkitem(struct map_session_data *sd) { int i,id,calc_flag = 0; - struct item_data *it=NULL; nullpo_ret(sd); @@ -8640,7 +8630,6 @@ int pc_checkitem(struct map_session_data *sd) } for( i = 0; i < MAX_INVENTORY; i++) { - it = sd->inventory_data[i]; if( sd->status.inventory[i].nameid == 0 ) continue; @@ -8654,18 +8643,6 @@ int pc_checkitem(struct map_session_data *sd) continue; } - if( it ) { // check for forbiden items. - int flag = - (map[sd->bl.m].flag.restricted?(8*map[sd->bl.m].zone):0) - | (!map_flag_vs(sd->bl.m)?1:0) - | (map[sd->bl.m].flag.pvp?2:0) - | (map_flag_gvg(sd->bl.m)?4:0) - | (map[sd->bl.m].flag.battleground?8:0); - if( flag && (it->flag.no_equip&flag) ) { - pc_unequipitem(sd, i, 2); - calc_flag = 1; - } - } } if( calc_flag && sd->state.active ) { diff --git a/src/map/status.c b/src/map/status.c index ce792cd75..7840a7a7f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2443,6 +2443,20 @@ int status_calc_pc_(struct map_session_data* sd, bool first) if(!sd->inventory_data[index]) continue; + if(sd->inventory_data[index]->flag.no_equip) { // Items may be equipped, their effects however are nullified. + if(map[sd->bl.m].flag.restricted && sd->inventory_data[index]->flag.no_equip&(8*map[sd->bl.m].zone)) + continue; + if(!map_flag_vs(sd->bl.m) && sd->inventory_data[index]->flag.no_equip&1) + continue; + if(map[sd->bl.m].flag.pvp && sd->inventory_data[index]->flag.no_equip&2) + continue; + if(map_flag_gvg(sd->bl.m) && sd->inventory_data[index]->flag.no_equip&4) + continue; + if(map[sd->bl.m].flag.battleground && sd->inventory_data[index]->flag.no_equip&8) + continue; + } + + status->def += sd->inventory_data[index]->def; if(first && sd->inventory_data[index]->equip_script) -- cgit v1.2.3-70-g09d2 From 64d34dc87a5e93d371fc3b1eb5e905e5deb798d7 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 20:03:02 -0200 Subject: Fixed Bug #7051 http://hercules.ws/board/tracker/issue-7051-warning-when-compiling/ Signed-off-by: shennetsind --- src/common/sql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/sql.c b/src/common/sql.c index d00b51694..73c4181d9 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -19,7 +19,7 @@ void hercules_mysql_error_handler(unsigned int ecode); int mysql_reconnect_type; -int mysql_reconnect_count; +unsigned int mysql_reconnect_count; /// Sql handle struct Sql -- cgit v1.2.3-70-g09d2 From f651ffc9f92dbf339e9691c24d66577bf4a43d47 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Mon, 4 Feb 2013 00:13:50 -0200 Subject: Some changes to .gitignore; Merged r15231 and r15232 from eAthena. Signed-off-by: Matheus Macabu --- .gitignore | 49 +++++++------------------------------------------ db/packet_db.txt | 23 ++++++++++++++++++++--- src/map/clif.c | 4 +++- src/map/clif.h | 4 ++-- src/map/mob.c | 2 +- 5 files changed, 33 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/.gitignore b/.gitignore index 5eb3969ca..447365f22 100644 --- a/.gitignore +++ b/.gitignore @@ -23,9 +23,6 @@ /Makefile.cache /map-server_sql /mapcache -/rAthena - -# /3rdparty/cmake/ # /3rdparty/libconfig/ /3rdparty/libconfig/Makefile @@ -42,35 +39,6 @@ /log/*.log /log/map-server_sql.leaks -# /npc/airports/ - -# /npc/cities/ - -# /npc/jobs/ - -# /npc/kafras/ - -# /npc/merchants/ - -# /npc/mobs/ - -# /npc/other/ - -# /npc/quests/ - -# /npc/re/quests/eden/ -/npc/re/quests/eden/55-70.txt - -# /npc/warps/ - -# /npc/warps/cities/ - -# /npc/warps/dungeons/ - -# /npc/warps/fields/ - -# /npc/warps/other/ - # /src/char/ /src/char/Makefile /src/char/obj_sql @@ -86,16 +54,12 @@ /src/login/obj_txt /src/login/obj_sql -# /src/login/sql/ - # /src/map/ /src/map/Makefile /src/map/obj_sql /src/map/obj_txt /src/map/pcre.h -# /src/map/sql/ - # /src/test/ /src/test/Makefile /src/test/obj @@ -111,13 +75,18 @@ /tools/*.ilk /tools/*.pdb +# /vcproj-12/ +/vcproj-12/char-server_sql +/vcproj-12/login-server_sql +/vcproj-12/mapcache +/vcproj-12/map-server_sql +/vcproj-12/*.user + # /vcproj-10/ /vcproj-10/char-server_sql /vcproj-10/login-server_sql /vcproj-10/mapcache /vcproj-10/map-server_sql -/vcproj-10/txt-converter-char -/vcproj-10/txt-converter-login /vcproj-10/*.user # /vcproj-9/ @@ -126,7 +95,3 @@ /vcproj-9/login-server_sql /vcproj-9/map-server_sql /vcproj-9/mapcache -/vcproj-9/plugin-console -/vcproj-9/plugin-pid -/vcproj-9/txt-converter-char -/vcproj-9/txt-converter-login diff --git a/db/packet_db.txt b/db/packet_db.txt index f54690bd3..50fae98bc 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -34,7 +34,7 @@ // Client detection is faster when all clients use this version. // Version 23 is the latest Sakexe (above versions are for Renewal clients) //packet_db_ver: 25 -packet_db_ver: default +packet_db_ver: 30 packet_ver: 5 0x0064,55 @@ -1758,7 +1758,7 @@ packet_ver: 30 0x0977,14 //Monster HP Bar //2012-04-18aRagexeRE [Special Thanks to Judas!] -packet_ver:31 +packet_ver: 31 0x023B,26,friendslistadd,2 0x0361,5,hommenu,2:4 0x08A8,36,storagepassword,0 @@ -1776,5 +1776,22 @@ packet_ver:31 0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections 0x08d2,10 +//2012-07-02aRagexeRE +packet_ver: 32 +0x0363,19,wanttoconnection,2:6:10:14:18 +0x0364,6,ticksend,2 +0x085a,7,actionrequest,2:6 +0x0861,8,movefromkafra,2:4 +0x0862,10,useskilltoid,2:4:6 +0x0863,10,useskilltopos,2:4:6:8 +0x0886,6,solvecharname,2 +0x0889,90,useskilltoposinfo,2:4:6:8:10 +0x089e,6,dropitem,2:4 +0x089f,6,takeitem,2 +0x08a0,8,movetokafra,2:4 +0x094a,6,getcharnamerequest,2 +0x0953,5,walktoxy,2 +0x0960,5,changedir,2:4 + //Add new packets here -//packet_ver: 32 +//packet_ver: 33 diff --git a/src/map/clif.c b/src/map/clif.c index e04941336..8d5090c2c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5344,6 +5344,9 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id /// Notifies clients of a status change. /// 0196 .W .L .B (ZC_MSG_STATE_CHANGE) [used for ending status changes and starting them on non-pc units (when needed)] /// 043f .W .L .B .L { .L }*3 (ZC_MSG_STATE_CHANGE2) [used exclusively for starting statuses on pcs] +/// 08ff .L .W .L { .L }*3 (PACKETVER >= 20111108) +/// 0983 .W .L .B .L .L { .L }*3 (PACKETVER >= 20120618) +/// 0984 .L .W .L .L { .L }*3 (PACKETVER >= 20120618) void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3) { unsigned char buf[32]; @@ -17111,7 +17114,6 @@ int do_init_clif(void) { clif_config.packet_db_ver = -1; // the main packet version of the DB memset(clif_config.connect_cmd, 0, sizeof(clif_config.connect_cmd)); //The default connect command will be determined after reading the packet_db [Skotlex] - memset(packet_db,0,sizeof(packet_db)); //Using the packet_db file is the only way to set up packets now [Skotlex] packetdb_readdb(); diff --git a/src/map/clif.h b/src/map/clif.h index 45e2fd4f0..8e0fc6629 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -31,8 +31,8 @@ struct party_booking_ad_info; enum {// packet DB - MAX_PACKET_DB = 0xA00, - MAX_PACKET_VER = 31, + MAX_PACKET_DB = 0xF00, + MAX_PACKET_VER = 32, MAX_PACKET_POS = 20, }; diff --git a/src/map/mob.c b/src/map/mob.c index 6550d9b0e..aceebc506 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1537,7 +1537,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) // Scan area for targets if (!tbl && mode&MD_LOOTER && md->lootitem && DIFF_TICK(tick, md->ud.canact_tick) > 0 && (md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1)) - { // Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items. + { // Scan area for items to loot, avoid trying to loot if the mob is full and can't consume the items. map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl, view_range, BL_ITEM, md, &tbl); } -- cgit v1.2.3-70-g09d2 From 524291493e64196d8ce02f4b637ea0ee1a176d0a Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Mon, 4 Feb 2013 00:32:19 -0200 Subject: Merged some commits from rAthena. --- conf/char-server.conf | 5 +++-- db/castle_db.txt | 20 ++++++++++---------- db/pre-re/item_combo_db.txt | 4 ++-- db/pre-re/item_db.txt | 2 +- db/re/item_combo_db.txt | 8 ++++---- db/re/item_trade.txt | 28 ++++++++++++++++++++++++++++ npc/guild/agit_main.txt | 5 +++-- npc/guild2/agit_main_se.txt | 19 +++++++++++++++++-- npc/jobs/2-1/hunter.txt | 1 + sql-files/item_db.sql | 2 +- sql-files/item_db_re.sql | 2 +- src/char/char.c | 9 +++++---- src/map/npc.c | 27 +++++++++++++-------------- src/map/pc.c | 4 ++++ 14 files changed, 93 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/conf/char-server.conf b/conf/char-server.conf index 929bad5d0..4ed7c1a26 100644 --- a/conf/char-server.conf +++ b/conf/char-server.conf @@ -79,8 +79,9 @@ char_new: 1 // Display (New) in the server list. char_new_display: 0 -// Maximum users able to connect to the server. Set to 0 for unlimited. -max_connect_user: 0 +// Maximum users able to connect to the server. +// Set to 0 to disable users to log-in. (-1 means unlimited) +max_connect_user: -1 // Group ID that is allowed to bypass the server limit of users. // Default: -1 = nobody (there are no groups with ID < 0) diff --git a/db/castle_db.txt b/db/castle_db.txt index a77b5de7b..4e0f2e880 100644 --- a/db/castle_db.txt +++ b/db/castle_db.txt @@ -34,13 +34,13 @@ 21,nguild_gef,Air,Agit_N02,2 22,nguild_pay,Water,Agit_N03,2 23,nguild_prt,Fire,Agit_N04,2 -24,schg_cas01,Himinn,Agit_Sc01,1 // kRO : Himinn -25,schg_cas02,Andlangr,Agit_Sc02,1 // kRO : Andlangr -26,schg_cas03,Viblainn,Agit_Sc03,1 // kRO : Viblainn -27,schg_cas04,Hljod,Agit_Sc04,1 // kRO : Hljod -28,schg_cas05,Skidbladnir,Agit_Sc05,1 // kRO : Skidbladnir -29,arug_cas01,Mardol,Agit_Ar01,1 // kRO : Mardol -30,arug_cas02,Cyr,Agit_Ar02,1 // kRO : Cyr -31,arug_cas03,Horn,Agit_Ar03,1 // kRO : Horn -32,arug_cas04,Gefn,Agit_Ar04,1 // kRO : Gefn -33,arug_cas05,Bandis,Agit_Ar05,1 // kRO : Bandis +24,schg_cas01,Himinn,Manager#schg_cas01,1 // kRO : Himinn +25,schg_cas02,Andlangr,Manager#schg_cas02,1 // kRO : Andlangr +26,schg_cas03,Viblainn,Manager#schg_cas03,1 // kRO : Viblainn +27,schg_cas04,Hljod,Manager#schg_cas04,1 // kRO : Hljod +28,schg_cas05,Skidbladnir,Manager#schg_cas05,1 // kRO : Skidbladnir +29,arug_cas01,Mardol,Manager#arug_cas01,1 // kRO : Mardol +30,arug_cas02,Cyr,Manager#arug_cas02,1 // kRO : Cyr +31,arug_cas03,Horn,Manager#arug_cas03,1 // kRO : Horn +32,arug_cas04,Gefn,Manager#arug_cas04,1 // kRO : Gefn +33,arug_cas05,Bandis,Manager#arug_cas05,1 // kRO : Bandis diff --git a/db/pre-re/item_combo_db.txt b/db/pre-re/item_combo_db.txt index 3b8985fb0..c1eb3c039 100644 --- a/db/pre-re/item_combo_db.txt +++ b/db/pre-re/item_combo_db.txt @@ -21,7 +21,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -29,7 +29,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1723:2718,{ bonus bDex,1; bonus bMaxSP,50; bonus bSPrecovRate,10; } 1730:1752,{ bonus bLongAtkRate,25; } 1731:1754,{ bonus bLongAtkRate,25; } diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index 391954fab..35763c257 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -1777,7 +1777,7 @@ 4149,Gargoyle_Card,Gargoyle Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12028,RC_Insect,100; },{},{} 4150,Goat_Card,Goat Card,6,20,,10,,,,,,,,16,,,,,{ if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; } },{},{} 4151,Gajomart_Card,Gajomart Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10; },{},{} -4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300; },{},{} +4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300; },{},{} 4153,Crab_Card,Crab Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; },{},{} 4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100; },{},{} 4155,Goblin_Leader_Card,Goblin Leader Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,1,30; },{},{} diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 81acb7f0d..f6bd7dc01 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -24,7 +24,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -32,7 +32,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1657:2471:2569:15029,{ bonus bHealPower,25; } 1660:2471:2569:15029,{ bonus bHealPower,45; bonus3 bAutoSpellWhenHit,"AB_SILENTIUM",1,10; } 1718:1774,{ bonus bLongAtkRate,50; } @@ -117,7 +117,7 @@ 2475:2574:2883:15036,{ bonus bMaxHPRate,14; bonus2 bSkillAtk,"RK_HUNDREDSPEAR",50; skill "CR_AUTOGUARD",1; } 2476:2575:2884:15037,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bSkillAtk,"RK_SONICWAVE",100; bonus2 bSkillAtk,"RK_WINDCUTTER",100; autobonus "{ sc_start SC_CONCENTRATION,10000,getskilllv(\"LK_CONCENTRATION\")?getskilllv(\"LK_CONCENTRATION\"):1; bonus bAspd,2; }",1,10000,BF_WEAPON,"{}"; } 2477:2577:2886:15038,{ bonus bCritical,15; bonus bFlee,10; bonus bCritAtkRate,40; bonus2 bSkillAtk,"GC_CROSSIMPACT",20; } -2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; /* bonus bEquipmentMatk,10; */ if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } +2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatk,10; if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } 2479:2580:2890:15042,{ bonus bAspd,2; bonus bLongAtkRate,30; bonus3 bAutoSpell,"AC_DOUBLE",3,10; bonus2 bSkillAtk,"RA_ARROWSTORM",50; } 2480:2581:2891:15043,{ bonus bMaxHPRate,15; bonus2 bSkillAtk,"RA_CLUSTERBOMB",20; bonus bFlee2,20; bonus bLongAtkRate,-30; bonus bAspd,-7; } 2483:2586:15046,{ bonus2 bSubRace,RC_DemiHuman,15; } @@ -147,7 +147,7 @@ 2725:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } 2726:2727,{ bonus bUseSPrate,-25; } 2733:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } -2747:13061,{ bonus bHit,5; /* bonus bEquipmentMatk,5; */ } +2747:13061,{ bonus bHit,5; bonus bMatk,5; } 2777:2778:5479,{ bonus bMaxHP,300; bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,5; } 2779:2780:5482,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } 2779:2780:5577,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index c8f518c12..abc6909c2 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -1870,3 +1870,31 @@ 13425,499,100 // Tourist Sword 15007,467,100 // Time Keeper Robe 16006,499,100 // Tourist Mace + +// Sealed Cards +4489,457,100 // Sealed Pharaoh Card +4490,457,100 // Sealed Moonlight Flower Card +4491,457,100 // Sealed Sniper Card +4492,457,100 // Sealed Orc Hero Card +4493,457,100 // Sealed Tao Gunka Card +4494,457,100 // Sealed Turtle General Card +4495,457,100 // Sealed Amon Ra Card +4496,457,100 // Sealed Drake Card +4497,457,100 // Sealed Stormy Knight Card +4498,457,100 // Sealed Lady Tanee Card +4499,457,100 // Sealed Samurai Spector Card +4500,457,100 // Sealed Orc Lord Card +4501,457,100 // Sealed High Priest Card +4502,457,100 // Sealed MasterSmith Card +4503,457,100 // Sealed Vesper Card +4504,457,100 // Sealed Eddga Card +4535,457,100 // Sealed Randgris Card +4536,457,100 // Sealed Atroce Card +4537,457,100 // Sealed Phreeoni Card +4538,457,100 // Sealed White Lady Card +4539,457,100 // Sealed Fallen Bishop Hibram Card +4540,457,100 // Sealed Lord of The Dead Card +4541,457,100 // Sealed High Wizard Card +4542,457,100 // Sealed Detale Card +4543,457,100 // Sealed Hatii Card +4544,457,100 // Sealed Evil Snake Lord Card diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index 115238bfb..5253fbe16 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.9 +//= 1.9a //===== Description: ========================================= //= [ Aegis Conversion] //= ---------------------------------------------------------- @@ -49,6 +49,7 @@ //= and added extended anouncement format for mapannounce. //= 1.8 Fixed a possible exploit in guild castle investment. [Brian] //= 1.9 Partially rewrote Script. [Masao] +//= 1.9a Fixed incorrect setcastledata parameter. [Euphy] //============================================================ // WoE : Main Functions @@ -156,7 +157,7 @@ OnGuildBreak: // Kill guardians, disable the Kafra, and set owner to 0. killmonster strnpcinfo(2),"Guardian#"+strnpcinfo(2)+"::OnGuardianDied"; disablenpc "Kafra Staff#"+strnpcinfo(2); - SetCastleData strnpcinfo(2),0,0; + SetCastleData strnpcinfo(2),1,0; // Wait before refreshing guild information. sleep 7000; Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0; diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt index 0c15e3a70..45c847d5d 100644 --- a/npc/guild2/agit_main_se.txt +++ b/npc/guild2/agit_main_se.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Description: ========================================= //= Like agit_main, this file is required //= for SE castles to function. @@ -13,6 +13,7 @@ //= 1.1 Fixed an incorrect label execution. [Euphy] //= 1.2 Hopefully fixed a processing error. [Euphy] //= 1.3 Fixed barricade issue in schg_cas02. [Cookie] +//= 1.4 Added OnGuildBreak event and a spawn check. [Euphy] //============================================================ // Core, triggers all other events @@ -64,6 +65,17 @@ OnAgitEnd2: } end; +OnGuildBreak: + if (strnpcinfo(2) == "template") end; + killmonster strnpcinfo(2),"gard1#"+strnpcinfo(2)+"::OnGuardianDied"; + killmonster strnpcinfo(2),"gard2#"+strnpcinfo(2)+"::OnGuardianDied"; + disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + setcastledata strnpcinfo(2),1,0; + sleep 7000; + announce "Guild Base ["+getcastlename(strnpcinfo(2))+"] has been abandoned.",0; + donpcevent strnpcinfo(0)+"::OnRecvCastle2"; + end; + OnStart: // $agit_ar0x[] - $agit_sc0x[] // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians @@ -76,7 +88,10 @@ OnStart: for(set .@i,0; .@i<4; set .@i,.@i+1) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; } + OnEmpSpawn: + set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + if (mobcount(strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena")) end; if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219; else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],89,256; @@ -87,7 +102,7 @@ OnEmpSpawn: else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202; else setarray .@i[0],120,272; // Castles 1,4,5 are identical. } - monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"::OnStartArena"; + monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena"; end; OnReset: diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt index 96874f73e..2777e0a43 100644 --- a/npc/jobs/2-1/hunter.txt +++ b/npc/jobs/2-1/hunter.txt @@ -534,6 +534,7 @@ hu_in01,382,382,4 script Guild Receptionist#hnt 732,{ close; } else if (HNTR_Q >= 3 && HNTR_Q <= 9) { + if(checkre(0)) set .@i,1; switch(HNTR_Q) { //Insect_Feeler/Claw_Of_Desert_Wolf, Wooden_Block, White_Herb case 3: setarray .@items[0], (.@i?928:7030),5, 1019,5, 509,3, 10; break; diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index bdef46fa7..9b0c8fff4 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -1808,7 +1808,7 @@ REPLACE INTO `item_db` VALUES (4148,'Pharaoh_Card','Pharaoh Card',6,20,NULL,10,N REPLACE INTO `item_db` VALUES (4149,'Gargoyle_Card','Gargoyle Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12028,RC_Insect,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4150,'Goat_Card','Goat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; }',NULL,NULL); REPLACE INTO `item_db` VALUES (4151,'Gajomart_Card','Gajomart Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;',NULL,NULL); -REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300;',NULL,NULL); +REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300;',NULL,NULL); REPLACE INTO `item_db` VALUES (4153,'Crab_Card','Crab Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30;',NULL,NULL); REPLACE INTO `item_db` VALUES (4154,'Rice_Cake_Boy_Card','Dumpling Child Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4155,'Goblin_Leader_Card','Goblin Leader Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,1,30;',NULL,NULL); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index e9ddd31ca..a3fd574f7 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -7363,4 +7363,4 @@ REPLACE INTO `item_db_re` VALUES (19529,'Costume_Angel_Wing','Costume Angel Wing REPLACE INTO `item_db_re` VALUES (19530,'Costume_Wild_Rose','Costume Wild Rose',5,20,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,1024,NULL,'1',NULL,541,NULL,NULL,NULL); # More 2-Handed Swords REPLACE INTO `item_db_re` VALUES (21001,'Bellum_Claymore','Bellum Claymore',4,20,NULL,3500,'260',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bAddRace,RC_DemiHuman,80; bonus2 bIgnoreDefRate,RC_DemiHuman,30; if(getrefine()>=6) { bonus2 bAddRace,RC_DemiHuman,40; } if(getrefine()>=9) { autobonus2 "{bonus bShortWeaponDamageReturn,20; bonus bMagicDamageReturn,20;}",200,1000,BF_WEAPON,"{specialeffect2 EF_REFLECTSHIELD;}"; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL); \ No newline at end of file +REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL); diff --git a/src/char/char.c b/src/char/char.c index d454e8bd0..1b5c7898d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -133,7 +133,7 @@ struct char_session_data { char birthdate[10+1]; // YYYY-MM-DD }; -int max_connect_user = 0; +int max_connect_user = -1; int gm_allow_group = -1; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int start_zeny = 0; @@ -2154,7 +2154,8 @@ int parse_fromlogin(int fd) { ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map[0] ); // continued from char_auth_ok... if( server_id == ARRAYLENGTH(server) || //server not online, bugreport:2359 - ( max_connect_user && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { + (max_connect_user == 0 && sd->group_id != gm_allow_group) || + ( max_connect_user > 0 && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { // refuse connection (over populated) WFIFOHEAD(i,3); WFIFOW(i,0) = 0x6c; @@ -4588,8 +4589,8 @@ int char_config_read(const char* cfgName) char_new_display = atoi(w2); } else if (strcmpi(w1, "max_connect_user") == 0) { max_connect_user = atoi(w2); - if (max_connect_user < 0) - max_connect_user = 0; // unlimited online players + if (max_connect_user < -1) + max_connect_user = -1; // unlimited online players } else if(strcmpi(w1, "gm_allow_group") == 0) { gm_allow_group = atoi(w2); } else if (strcmpi(w1, "autosave_time") == 0) { diff --git a/src/map/npc.c b/src/map/npc.c index 3aabeaf98..383cd031a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2884,24 +2884,23 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL); // split atcmd parameters based on spaces - i = 0; - j = 0; - temp = (char*)aMalloc(strlen(message) + 1); - while( message[i] != '\0' ) { - if( message[i] == ' ' && k < 127 ) { - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - j = 0; - ++i; - } else - temp[j++] = message[i++]; + for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) { + if( message[i] == ' ' || message[i] == '\0' ) { + if( message[ ( i - 1 ) ] == ' ' ) { + continue; // To prevent "@atcmd [space][space][space]..." + } + temp[k] = '\0'; + k = 0; + setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL ); + } else { + temp[k] = message[i]; + k++; + } } - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)&k, NULL); + setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPRTSIZE(j), NULL); aFree(temp); run_script_main(st); diff --git a/src/map/pc.c b/src/map/pc.c index 6f608cd49..4fb555d0f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8194,6 +8194,10 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) { cursor++; } + + /* check if combo requirements still fit */ + if( pc_checkcombo( sd, data ) ) + continue; /* it's empty, we can clear all the memory */ if( (sd->combos.count = cursor) == 0 ) { -- cgit v1.2.3-70-g09d2 From 7e4c57861434f07dcba240db541e1f90cfebe694 Mon Sep 17 00:00:00 2001 From: akrus Date: Mon, 4 Feb 2013 14:15:27 +0400 Subject: Allow unsigned int values for guild exp (as it was before the change). --- src/char/int_guild.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 9cb17dca8..b3a907b1a 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -602,9 +602,9 @@ static struct guild_castle* inter_guildcastle_fromsql(int castle_id) // Read exp_guild.txt static bool exp_guild_parse_row(char* split[], int column, int current) { - int exp = atoi(split[0]); + unsigned int exp = atoll(split[0]); - if (exp < 0 || exp >= INT_MAX) { + if (exp < 0 || exp >= UINT_MAX) { ShowError("exp_guild: Invalid exp %d at line %d\n", exp, current); return false; } -- cgit v1.2.3-70-g09d2 From c69e4b6cf853d31f18ef9c2f04d2bc965f4ad158 Mon Sep 17 00:00:00 2001 From: malufett Date: Tue, 5 Feb 2013 19:12:39 +0800 Subject: Fix Bug # 7049 Added new item bonuses bFixedCast, bVariableCast & bFixedCastrate. (see 'doc/item_bonus.txt' for info) Added new conf for max walk path.(Bug Report # 7042) http://hercules.ws/board/tracker/issue-7049-do-we-need-new-bonus/?gopid=16578#entry16578 --- conf/battle/client.conf | 4 ++++ db/const.txt | 3 +++ doc/item_bonus.txt | 7 +++++-- src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/map.h | 2 +- src/map/pc.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- src/map/pc.h | 3 ++- src/map/script.c | 1 + src/map/skill.c | 10 ++++++++++ src/map/status.c | 3 ++- src/map/unit.c | 7 ++++--- 12 files changed, 78 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/conf/battle/client.conf b/conf/battle/client.conf index eaf233a5d..17a10dde5 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -61,6 +61,10 @@ pet_hair_style: 100 // Visible area size (how many squares away from a player can they see) area_size: 14 +// Maximum walk path (how many cells a player can walk going to cursor) +// default: 17(official) +max_walk_path: 17 + // Maximum allowed 'level' value that can be sent in unit packets. // Use together with the aura_lv setting to tell when exactly to show the aura. // NOTE: You also need to adjust the client if you want this to work. diff --git a/db/const.txt b/db/const.txt index 09b1c64c7..b4fa39366 100644 --- a/db/const.txt +++ b/db/const.txt @@ -588,6 +588,9 @@ bFixedCastrate 2053 bVariableCastrate 2054 bSkillUseSP 2055 bMagicAtkEle 2056 +bFixedCast 2057 + +bVariableCast 2058 EQI_HEAD_TOP 1 EQI_ARMOR 2 diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index e331dbf7b..559e49414 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -409,8 +409,11 @@ bonus2 bSkillUseSPrate,s,x; Reduces SP consumption of skill s by x%. (supports bonus2 bSkillUseSP,s,x; Reduces SP consumption of skill s by x. (supports skill names.) bonus2 bSkillCooldown,s,x; Increases cooldown of skill s by x milliseconds. (supports skill names.) -bonus bFixedCastrate,x; Increases fixed cast time of skills by x%. -bonus bVariableCastrate,x; Increases variable cast time of skills by x%. +bonus bFixedCastrate,x; Increases fixed cast time of all skills by x%. +bonus bVariableCastrate,x; Increases variable cast time of all skills by x%. +bonus bFixedCast,x; Increases fixed cast time of all skills by x milliseconds; +bonus bVariableCast,x; Increases variable cast time of all skills by x milliseconds; bonus2 bSkillFixedCast,s,x; Increases fixed cast time of skill s by x milliseconds. (supports skill names.) bonus2 bSkillVariableCast,s,x; Increases variable cast time of skill s by x milliseconds. (supports skill names.) bonus2 bVariableCastrate,s,x; Increases variable cast time of skill s by x%. (supports skill names.) +bonus2 bFixedCastrate,s,x; Increases fixed cast time of skill s by x%. (supports skill names.) \ No newline at end of file diff --git a/src/map/battle.c b/src/map/battle.c index 0506f2fe9..f9748833f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5868,6 +5868,7 @@ static const struct _battle_data { **/ { "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, }, { "item_restricted_consumption_type", &battle_config.item_restricted_consumption_type,1, 0, 1, }, + { "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index c5ca19b90..6586f4561 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -485,6 +485,7 @@ extern struct Battle_Config int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] int skill_trap_type; int item_restricted_consumption_type; + int max_walk_path; } battle_config; void do_init_battle(void); diff --git a/src/map/map.h b/src/map/map.h index 86d936972..bb0bccf2c 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -406,7 +406,7 @@ enum _sp { SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045 SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049 SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054 - SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE //2055-2056 + SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST //2055-2058 }; enum _look { diff --git a/src/map/pc.c b/src/map/pc.c index 4fb555d0f..6e24d7d49 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2591,11 +2591,22 @@ int pc_bonus(struct map_session_data *sd,int type,int val) if(sd->state.lr_flag != 2) sd->bonus.fixcastrate -= val; break; + case SP_ADD_FIXEDCAST: + if(sd->state.lr_flag != 2) + sd->bonus.add_fixcast += val; + + break; #ifdef RENEWAL_CAST case SP_VARCASTRATE: if(sd->state.lr_flag != 2) sd->bonus.varcastrate -= val; break; + case SP_ADD_VARIABLECAST: + if(sd->state.lr_flag != 2) + + sd->bonus.add_varcast += val; + + break; #endif default: ShowWarning("pc_bonus: unknown type %d %d !\n",type,val); @@ -2953,7 +2964,15 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2); if (i == ARRAYLENGTH(sd->skillcast)) { //Better mention this so the array length can be updated. [Skotlex] - ShowDebug("run_script: bonus2 bCastRate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillcast), type2, val); + ShowDebug("run_script: bonus2 %s reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", + +#ifndef RENEWAL_CAST + "bCastRate", +#else + "bVariableCastrate", +#endif + + ARRAYLENGTH(sd->skillcast), type2, val); break; } if(sd->skillcast[i].id == type2) @@ -2964,6 +2983,30 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) } break; + case SP_FIXCASTRATE: + if(sd->state.lr_flag == 2) + break; + + ARR_FIND(0, ARRAYLENGTH(sd->skillfixcastrate), i, sd->skillfixcastrate[i].id == 0 || sd->skillfixcastrate[i].id == type2); + + if (i == ARRAYLENGTH(sd->skillfixcastrate)) + + { + + ShowDebug("run_script: bonus2 bFixedCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillfixcastrate), type2, val); + break; + } + + if(sd->skillfixcastrate[i].id == type2) + sd->skillfixcastrate[i].val += val; + + else { + sd->skillfixcastrate[i].id = type2; + sd->skillfixcastrate[i].val = val; + } + + break; + case SP_HP_LOSS_RATE: if(sd->state.lr_flag != 2) { sd->hp_loss.value = type2; diff --git a/src/map/pc.h b/src/map/pc.h index 870945d73..ac1950a69 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -263,7 +263,7 @@ struct map_session_data { struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills. unsigned short id; short val; - } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS]; + } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS]; struct { short value; int rate; @@ -320,6 +320,7 @@ struct map_session_data { unsigned short unbreakable_equip; //100% break resistance on certain equipment unsigned short unstripable_equip; int fixcastrate,varcastrate; + int add_fixcast,add_varcast; int ematk; // matk bonus from equipment // int eatk; // atk bonus from equipment } bonus; diff --git a/src/map/script.c b/src/map/script.c index 60a61654a..0b649f990 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7860,6 +7860,7 @@ BUILDIN_FUNC(bonus) case SP_SKILL_FIXEDCAST: case SP_SKILL_VARIABLECAST: case SP_VARCASTRATE: + case SP_FIXCASTRATE: case SP_SKILL_USE_SP: // these bonuses support skill names val1 = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); diff --git a/src/map/skill.c b/src/map/skill.c index 9c07390f3..2cc3ed1ab 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13819,6 +13819,10 @@ int skill_vfcastfix (struct block_list *bl, double time, uint16 skill_id, uint16 if(sd && !(skill_get_castnodex(skill_id, skill_lv)&4) ){ // Increases/Decreases fixed/variable cast time of a skill by item/card bonuses. if( sd->bonus.varcastrate < 0 ) VARCAST_REDUCTION(sd->bonus.varcastrate); + if( sd->bonus.add_varcast != 0 ) // bonus bVariableCast + time += sd->bonus.add_varcast; + if( sd->bonus.add_fixcast != 0 ) // bonus bFixedCast + fixed += sd->bonus.add_fixcast; for (i = 0; i < ARRAYLENGTH(sd->skillfixcast) && sd->skillfixcast[i].id; i++) if (sd->skillfixcast[i].id == skill_id){ // bonus2 bSkillFixedCast fixed += sd->skillfixcast[i].val; @@ -13835,6 +13839,12 @@ int skill_vfcastfix (struct block_list *bl, double time, uint16 skill_id, uint16 VARCAST_REDUCTION(i); break; } + for( i = 0; i < ARRAYLENGTH(sd->skillfixcastrate) && sd->skillfixcastrate[i].id; i++ ) + + if( sd->skillfixcastrate[i].id == skill_id ){ // bonus2 bFixedCastrate + fixcast_r = sd->skillfixcastrate[i].val; // just speculation + break; + } } if (sc && sc->count && !(skill_get_castnodex(skill_id, skill_lv)&2) ) { diff --git a/src/map/status.c b/src/map/status.c index 7840a7a7f..8fd48aefc 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena dev team @@ -2416,6 +2416,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) + sizeof(sd->skillcooldown) + sizeof(sd->skillfixcast) + sizeof(sd->skillvarcast) + + sizeof(sd->skillfixcastrate) ); memset (&sd->bonus, 0,sizeof(sd->bonus)); diff --git a/src/map/unit.c b/src/map/unit.c index e901d3138..fca406e5f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -315,21 +315,22 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) { struct unit_data* ud = NULL; struct status_change* sc = NULL; -#ifdef OFFICIAL_WALKPATH struct walkpath_data wpd; -#endif + nullpo_ret(bl); ud = unit_bl2ud(bl); if( ud == NULL) return 0; -#ifdef OFFICIAL_WALKPATH path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS); // Count walk path cells +#ifdef OFFICIAL_WALKPATH if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) // Check if there is an obstacle between && wpd.path_len > 14 ) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] return 0; #endif + if( battle_config.max_walk_path < wpd.path_len ) + return 0; if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 && DIFF_TICK(ud->canmove_tick, gettick()) < 2000) -- cgit v1.2.3-70-g09d2 From 2eb3e450d53a450d2493fae0ede3632802de6dd6 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 5 Feb 2013 18:58:39 -0200 Subject: Updating Headers of modified files Signed-off-by: shennetsind --- src/map/battle.h | 8 ++++++-- src/map/map.h | 5 +++-- src/map/script.c | 5 +++-- src/map/unit.c | 5 +++-- 4 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/map/battle.h b/src/map/battle.h index 6586f4561..1354da78a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #ifndef _BATTLE_H_ #define _BATTLE_H_ @@ -483,9 +484,12 @@ extern struct Battle_Config int atcommand_mobinfo_type; int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] + + /** Hercules **/ int skill_trap_type; int item_restricted_consumption_type; int max_walk_path; + } battle_config; void do_init_battle(void); diff --git a/src/map/map.h b/src/map/map.h index bb0bccf2c..06995024f 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #ifndef _MAP_H_ #define _MAP_H_ diff --git a/src/map/script.c b/src/map/script.c index 0b649f990..b4f0a5d9b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team //#define DEBUG_DISP //#define DEBUG_DISASM diff --git a/src/map/unit.c b/src/map/unit.c index fca406e5f..45aca7d41 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/showmsg.h" #include "../common/timer.h" -- cgit v1.2.3-70-g09d2 From 90eefa03faff925a3d91e6041c63965a6b39c1b3 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 6 Feb 2013 00:08:48 -0200 Subject: Fixed Bug #7056 atoll was introduced in a 2011 lib and vc9 and 10 dont have that, dropping to atol since we dont need the int64 and using a tricky conversion to get it to unsigned http://hercules.ws/board/tracker/issue-7056-compiling-error/ Signed-off-by: shennetsind --- src/char/int_guild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/char/int_guild.c b/src/char/int_guild.c index b3a907b1a..c18bf7d3c 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -602,7 +602,7 @@ static struct guild_castle* inter_guildcastle_fromsql(int castle_id) // Read exp_guild.txt static bool exp_guild_parse_row(char* split[], int column, int current) { - unsigned int exp = atoll(split[0]); + unsigned int exp = (unsigned int)atol(split[0]); if (exp < 0 || exp >= UINT_MAX) { ShowError("exp_guild: Invalid exp %d at line %d\n", exp, current); -- cgit v1.2.3-70-g09d2 From 2ae187d00651c406a7a1c0c1cbc1495566d1607b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 7 Feb 2013 00:23:37 -0200 Subject: Fixing mistake in modified source code headers Signed-off-by: shennetsind --- src/char/int_guild.c | 2 +- src/char/int_pet.c | 2 +- src/common/core.c | 2 +- src/common/mapindex.c | 2 +- src/common/sql.c | 2 +- src/common/sql.h | 2 +- src/login/login.c | 2 +- src/map/battle.c | 2 +- src/map/battle.h | 2 +- src/map/chrif.c | 2 +- src/map/clif.c | 2 +- src/map/elemental.c | 2 +- src/map/homunculus.c | 2 +- src/map/map.c | 2 +- src/map/map.h | 2 +- src/map/mercenary.c | 2 +- src/map/mob.c | 2 +- src/map/npc.c | 2 +- src/map/pc.c | 2 +- src/map/pc.h | 2 +- src/map/script.c | 2 +- src/map/skill.c | 2 +- src/map/status.c | 2 +- src/map/unit.c | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/char/int_guild.c b/src/char/int_guild.c index c18bf7d3c..e25ebd902 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/mmo.h" diff --git a/src/char/int_pet.c b/src/char/int_pet.c index d9b0cf5ef..7a6c217f9 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/mmo.h" #include "../common/malloc.h" diff --git a/src/common/core.c b/src/common/core.c index b1714b7a5..42cdfa7cd 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/mmo.h" #include "../common/showmsg.h" diff --git a/src/common/mapindex.c b/src/common/mapindex.c index cea945ac0..685af641c 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/mmo.h" #include "../common/showmsg.h" diff --git a/src/common/sql.c b/src/common/sql.c index 73c4181d9..b842db46d 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/common/sql.h b/src/common/sql.h index 5ac92665e..b7159ec90 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ diff --git a/src/login/login.c b/src/login/login.c index 625e0f5c6..7f272e2a4 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/core.h" #include "../common/db.h" diff --git a/src/map/battle.c b/src/map/battle.c index f9748833f..2ad066d33 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/battle.h b/src/map/battle.h index 1354da78a..cd626cd6b 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #ifndef _BATTLE_H_ #define _BATTLE_H_ diff --git a/src/map/chrif.c b/src/map/chrif.c index 3ad164b89..06eef0564 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/map/clif.c b/src/map/clif.c index 8d5090c2c..6d9e57bd2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/socket.h" diff --git a/src/map/elemental.c b/src/map/elemental.c index f6c9eff84..33ef4d1b9 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/map/homunculus.c b/src/map/homunculus.c index c94a95775..92868c7c7 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/map/map.c b/src/map/map.c index d2cc9c4a9..6f9401dad 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/core.h" diff --git a/src/map/map.h b/src/map/map.h index 06995024f..73f8e694b 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #ifndef _MAP_H_ #define _MAP_H_ diff --git a/src/map/mercenary.c b/src/map/mercenary.c index c3fb8e3e2..a97651b87 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/malloc.h" diff --git a/src/map/mob.c b/src/map/mob.c index aceebc506..4f28923e9 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/npc.c b/src/map/npc.c index 383cd031a..ba476e810 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/pc.c b/src/map/pc.c index 6e24d7d49..0dd210394 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/core.h" // get_svn_revision() diff --git a/src/map/pc.h b/src/map/pc.h index ac1950a69..6e56a612e 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #ifndef _PC_H_ #define _PC_H_ diff --git a/src/map/script.c b/src/map/script.c index b4f0a5d9b..a6d588113 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams //#define DEBUG_DISP //#define DEBUG_DISASM diff --git a/src/map/skill.c b/src/map/skill.c index 2cc3ed1ab..972aa8129 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1,6 +1,6 @@ サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/status.c b/src/map/status.c index 8fd48aefc..0ee993de4 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1,6 +1,6 @@ サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/timer.h" diff --git a/src/map/unit.c b/src/map/unit.c index 45aca7d41..1d37704e0 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1,6 +1,6 @@ // Copyright (c) Hercules dev team, licensed under GNU GPL. // See the LICENSE file -// Portions Copyright (c) Athena dev team +// Portions Copyright (c) Athena Dev Teams #include "../common/showmsg.h" #include "../common/timer.h" -- cgit v1.2.3-70-g09d2 From 6fb716102722944463d9cec9be8f46760fde9616 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 7 Feb 2013 16:36:39 -0200 Subject: Fixed Bug #7045 Fire Pillar is now removed by land protector, and no longer can be cast over land protector. http://hercules.ws/board/tracker/issue-7045-fire-pillar-and-land-protector/ Signed-off-by: shennetsind --- src/map/skill.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 972aa8129..ad52a5c1f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10612,6 +10612,8 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill break; case WZ_FIREPILLAR: + if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + return NULL; if((flag&1)!=0) limit=1000; val1=skill_lv+2; @@ -14712,7 +14714,7 @@ static int skill_cell_overlap(struct block_list *bl, va_list ap) skill_delunit(unit); return 1; } - if( !(skill_get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) ) { //It deletes everything except songs/dances and traps + if( !(skill_get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) || unit->group->skill_id == WZ_FIREPILLAR ) { //It deletes everything except songs/dances and traps skill_delunit(unit); return 1; } -- cgit v1.2.3-70-g09d2 From a4802eaef9d71283070f1f31c859da871a7c8d32 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 7 Feb 2013 16:39:58 -0200 Subject: Fixed Bug #6803 You no longer can dispell guild mates in non-pkable areas http://hercules.ws/board/tracker/issue-6803-dispell-bug/ Signed-off-by: shennetsind --- src/map/skill.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index ad52a5c1f..4b9484609 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6360,6 +6360,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } if(status_isimmune(bl) || !tsc || !tsc->count) break; + + if( sd && dstsd && !map_flag_vs(sd->bl.m) && sd->status.guild_id == dstsd->status.guild_id ) { + clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + break; + } + for(i=0;idata[i]) -- cgit v1.2.3-70-g09d2 From 4c9bfed8c21cb80a806fffc32c7ac629bdf73438 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 7 Feb 2013 22:15:52 -0200 Subject: Adjustment to skill_trap_type battle/skill config The effect of the config is now restricted to GvG. http://hercules.ws/board/tracker/issue-4832-hunter-ht-anklesnare-serious-bug/ Signed-off-by: shennetsind --- conf/battle/skill.conf | 6 +++--- src/map/skill.c | 2 +- src/map/status.c | 2 +- src/map/unit.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index 0dd97610e..ecb2dd00a 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -276,7 +276,7 @@ invincible.nodamage: no // Default: yes dancing_weaponswitch_fix: yes -// Skill Trap Type -// 0: (official) traps only makes player unable to move after its walk path is complete, and it activates other traps on the way. -// 1: trap makes player stop moving right when stepping over it. +// Skill Trap Type (GvG) +// 0: (official) traps in GvG only makes player unable to move after its walk path is complete, and it activates other traps on the way. +// 1: trap in GvG makes player stop moving right when stepping over it. skill_trap_type: 0 diff --git a/src/map/skill.c b/src/map/skill.c index 4b9484609..cb15f0083 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11459,7 +11459,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); - if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type ) { + if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg(src->bl.m) ) { unit_movepos(bl, src->bl.x, src->bl.y, 0, 0); clif_fixpos(bl); } diff --git a/src/map/status.c b/src/map/status.c index 0ee993de4..97b7c61a1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8663,7 +8663,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val unit_stop_walking(bl,1); break; case SC_ANKLE: - if( battle_config.skill_trap_type ) + if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) ) unit_stop_walking(bl,1); break; case SC_HIDING: diff --git a/src/map/unit.c b/src/map/unit.c index 1d37704e0..60de14093 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -353,7 +353,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { - if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path return 0; // When you come to the center of the grid because the change of destination while you're walking right now // Call a function from a timer unit_walktoxy_sub @@ -430,7 +430,7 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { - if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path return 0; ud->state.change_walk_target = 1; set_mobstate(bl, flag&2); @@ -938,7 +938,7 @@ int unit_can_move(struct block_list *bl) { ) return 0; - if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving + if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || ( !map_flag_gvg(bl->m) && !unit_is_walking(bl) ) ) ) // Ankle only stops you after you're done moving return 0; if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && !(sc->opt1 == OPT1_CRYSTALIZE && bl->type == BL_MOB)) -- cgit v1.2.3-70-g09d2 From 4b41901d3ecb01930a57e9b1d230e729d5feba38 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 8 Feb 2013 21:41:04 -0200 Subject: Fixing a logical issue in ST_RIDING --- db/packet_db.txt | 2 +- rAthena/char-server_sql/char_server_sql.1 | 79 ++ rAthena/rAthena.xcodeproj/project.pbxproj | 971 +++++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 113853 bytes .../WorkspaceSettings.xcsettings | 10 + .../xcdebugger/Breakpoints.xcbkptlist | 5 + .../xcschemes/char-server_sql.xcscheme | 85 ++ .../xcschemes/login-server_sql.xcscheme | 85 ++ .../xcschemes/map-server_sql.xcscheme | 85 ++ .../xcschemes/xcschememanagement.plist | 42 + sql-files/upgrades/upgrade_2013.02.06_21.38.sql | 1 + src/map/skill.c | 2 +- 13 files changed, 1372 insertions(+), 2 deletions(-) create mode 100644 rAthena/char-server_sql/char_server_sql.1 create mode 100644 rAthena/rAthena.xcodeproj/project.pbxproj create mode 100644 rAthena/rAthena.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/WorkspaceSettings.xcsettings create mode 100644 rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist create mode 100644 rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/char-server_sql.xcscheme create mode 100644 rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/login-server_sql.xcscheme create mode 100644 rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/map-server_sql.xcscheme create mode 100644 rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 sql-files/upgrades/upgrade_2013.02.06_21.38.sql (limited to 'src') diff --git a/db/packet_db.txt b/db/packet_db.txt index 776fd3279..2692697af 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -34,7 +34,7 @@ // Client detection is faster when all clients use this version. // Version 23 is the latest Sakexe (above versions are for Renewal clients) //packet_db_ver: 25 -packet_db_ver: 30 +packet_db_ver: 31 packet_ver: 5 0x0064,55 diff --git a/rAthena/char-server_sql/char_server_sql.1 b/rAthena/char-server_sql/char_server_sql.1 new file mode 100644 index 000000000..4e61fbe92 --- /dev/null +++ b/rAthena/char-server_sql/char_server_sql.1 @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 6/3/12 \" DATE +.Dt char-server_sql 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm char-server_sql, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/rAthena/rAthena.xcodeproj/project.pbxproj b/rAthena/rAthena.xcodeproj/project.pbxproj new file mode 100644 index 000000000..84f6f6ee6 --- /dev/null +++ b/rAthena/rAthena.xcodeproj/project.pbxproj @@ -0,0 +1,971 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 538CB46A15AD9B1700DF3F0D /* evdp_epoll.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB45E15AD9B1700DF3F0D /* evdp_epoll.c */; }; + 538CB46B15AD9B1700DF3F0D /* evdp_epoll.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB45E15AD9B1700DF3F0D /* evdp_epoll.c */; }; + 538CB46C15AD9B1700DF3F0D /* evdp_epoll.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB45E15AD9B1700DF3F0D /* evdp_epoll.c */; }; + 538CB46D15AD9B1700DF3F0D /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46015AD9B1700DF3F0D /* mempool.c */; }; + 538CB46E15AD9B1700DF3F0D /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46015AD9B1700DF3F0D /* mempool.c */; }; + 538CB46F15AD9B1700DF3F0D /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46015AD9B1700DF3F0D /* mempool.c */; }; + 538CB47015AD9B1700DF3F0D /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46215AD9B1700DF3F0D /* mutex.c */; }; + 538CB47115AD9B1700DF3F0D /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46215AD9B1700DF3F0D /* mutex.c */; }; + 538CB47215AD9B1700DF3F0D /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46215AD9B1700DF3F0D /* mutex.c */; }; + 538CB47315AD9B1700DF3F0D /* netbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46415AD9B1700DF3F0D /* netbuffer.c */; }; + 538CB47415AD9B1700DF3F0D /* netbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46415AD9B1700DF3F0D /* netbuffer.c */; }; + 538CB47515AD9B1700DF3F0D /* netbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46415AD9B1700DF3F0D /* netbuffer.c */; }; + 538CB47615AD9B1700DF3F0D /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46615AD9B1700DF3F0D /* network.c */; }; + 538CB47715AD9B1700DF3F0D /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46615AD9B1700DF3F0D /* network.c */; }; + 538CB47815AD9B1700DF3F0D /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46615AD9B1700DF3F0D /* network.c */; }; + 538CB47915AD9B1700DF3F0D /* raconf.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46815AD9B1700DF3F0D /* raconf.c */; }; + 538CB47A15AD9B1700DF3F0D /* raconf.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46815AD9B1700DF3F0D /* raconf.c */; }; + 538CB47B15AD9B1700DF3F0D /* raconf.c in Sources */ = {isa = PBXBuildFile; fileRef = 538CB46815AD9B1700DF3F0D /* raconf.c */; }; + 53C193E1157BFAF00012D90B /* account_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193D9157BFAF00012D90B /* account_sql.c */; }; + 53C193E2157BFAF00012D90B /* ipban_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193DB157BFAF00012D90B /* ipban_sql.c */; }; + 53C193E3157BFAF00012D90B /* login.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193DD157BFAF00012D90B /* login.c */; }; + 53C193E4157BFAF00012D90B /* loginlog_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193DF157BFAF00012D90B /* loginlog_sql.c */; }; + 53C1942E157BFE790012D90B /* conf.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193E9157BFE790012D90B /* conf.c */; }; + 53C1942F157BFE790012D90B /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193EB157BFE790012D90B /* core.c */; }; + 53C19430157BFE790012D90B /* db.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193ED157BFE790012D90B /* db.c */; }; + 53C19431157BFE790012D90B /* des.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193EF157BFE790012D90B /* des.c */; }; + 53C19432157BFE790012D90B /* ers.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193F1157BFE790012D90B /* ers.c */; }; + 53C19433157BFE790012D90B /* grfio.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193F3157BFE790012D90B /* grfio.c */; }; + 53C19436157BFE790012D90B /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193F9157BFE790012D90B /* malloc.c */; }; + 53C19437157BFE790012D90B /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193FB157BFE790012D90B /* mapindex.c */; }; + 53C19438157BFE790012D90B /* md5calc.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C193FD157BFE790012D90B /* md5calc.c */; }; + 53C19439157BFE790012D90B /* nullpo.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19400157BFE790012D90B /* nullpo.c */; }; + 53C19452157BFE790012D90B /* random.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1941C157BFE790012D90B /* random.c */; }; + 53C19453157BFE790012D90B /* showmsg.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1941E157BFE790012D90B /* showmsg.c */; }; + 53C19454157BFE790012D90B /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19420157BFE790012D90B /* socket.c */; }; + 53C19455157BFE790012D90B /* sql.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19423157BFE790012D90B /* sql.c */; }; + 53C19456157BFE790012D90B /* strlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19425157BFE790012D90B /* strlib.c */; }; + 53C19457157BFE790012D90B /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19427157BFE790012D90B /* thread.c */; }; + 53C19458157BFE790012D90B /* timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19429157BFE790012D90B /* timer.c */; }; + 53C19459157BFE790012D90B /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1942B157BFE790012D90B /* utils.c */; }; + 53C19501157C039A0012D90B /* atcommand.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194AE157C039A0012D90B /* atcommand.c */; }; + 53C19502157C039A0012D90B /* battle.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194B0157C039A0012D90B /* battle.c */; }; + 53C19503157C039A0012D90B /* battleground.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194B2157C039A0012D90B /* battleground.c */; }; + 53C19504157C039A0012D90B /* buyingstore.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194B4157C039A0012D90B /* buyingstore.c */; }; + 53C19505157C039A0012D90B /* chat.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194B6157C039A0012D90B /* chat.c */; }; + 53C19506157C039A0012D90B /* chrif.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194B8157C039A0012D90B /* chrif.c */; }; + 53C19507157C039A0012D90B /* clif.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194BA157C039A0012D90B /* clif.c */; }; + 53C19508157C039A0012D90B /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194C5157C039A0012D90B /* date.c */; }; + 53C19509157C039A0012D90B /* duel.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194C7157C039A0012D90B /* duel.c */; }; + 53C1950A157C039A0012D90B /* elemental.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194C9157C039A0012D90B /* elemental.c */; }; + 53C1950B157C039A0012D90B /* guild.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194CB157C039A0012D90B /* guild.c */; }; + 53C1950C157C039A0012D90B /* homunculus.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194CD157C039A0012D90B /* homunculus.c */; }; + 53C1950D157C039A0012D90B /* instance.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194CF157C039A0012D90B /* instance.c */; }; + 53C1950E157C039A0012D90B /* intif.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194D1157C039A0012D90B /* intif.c */; }; + 53C1950F157C039A0012D90B /* itemdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194D3157C039A0012D90B /* itemdb.c */; }; + 53C19510157C039A0012D90B /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194D5157C039A0012D90B /* log.c */; }; + 53C19511157C039A0012D90B /* mail.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194D7157C039A0012D90B /* mail.c */; }; + 53C19512157C039A0012D90B /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194D9157C039A0012D90B /* map.c */; }; + 53C19513157C039A0012D90B /* mapreg_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194DB157C039A0012D90B /* mapreg_sql.c */; }; + 53C19514157C039A0012D90B /* mercenary.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194DD157C039A0012D90B /* mercenary.c */; }; + 53C19515157C039A0012D90B /* mob.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194DF157C039A0012D90B /* mob.c */; }; + 53C19516157C039A0012D90B /* npc_chat.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194E1157C039A0012D90B /* npc_chat.c */; }; + 53C19517157C039A0012D90B /* npc.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194E2157C039A0012D90B /* npc.c */; }; + 53C19518157C039A0012D90B /* party.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194E4157C039A0012D90B /* party.c */; }; + 53C19519157C039A0012D90B /* path.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194E6157C039A0012D90B /* path.c */; }; + 53C1951A157C039A0012D90B /* pc_groups.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194E8157C039A0012D90B /* pc_groups.c */; }; + 53C1951B157C039A0012D90B /* pc.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194EA157C039A0012D90B /* pc.c */; }; + 53C1951C157C039A0012D90B /* pet.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194ED157C039A0012D90B /* pet.c */; }; + 53C1951D157C039A0012D90B /* quest.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194EF157C039A0012D90B /* quest.c */; }; + 53C1951E157C039A0012D90B /* script.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194F1157C039A0012D90B /* script.c */; }; + 53C1951F157C039A0012D90B /* searchstore.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194F3157C039A0012D90B /* searchstore.c */; }; + 53C19520157C039A0012D90B /* skill.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194F5157C039A0012D90B /* skill.c */; }; + 53C19521157C039A0012D90B /* status.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194F7157C039A0012D90B /* status.c */; }; + 53C19522157C039A0012D90B /* storage.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194F9157C039A0012D90B /* storage.c */; }; + 53C19523157C039A0012D90B /* trade.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194FB157C039A0012D90B /* trade.c */; }; + 53C19524157C039A0012D90B /* unit.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194FD157C039A0012D90B /* unit.c */; }; + 53C19525157C039A0012D90B /* vending.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C194FF157C039A0012D90B /* vending.c */; }; + 53C1954C157C045D0012D90B /* char.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19534157C045D0012D90B /* char.c */; }; + 53C1954D157C045D0012D90B /* int_auction.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19536157C045D0012D90B /* int_auction.c */; }; + 53C1954E157C045D0012D90B /* int_elemental.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19538157C045D0012D90B /* int_elemental.c */; }; + 53C1954F157C045D0012D90B /* int_guild.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1953A157C045D0012D90B /* int_guild.c */; }; + 53C19550157C045D0012D90B /* int_homun.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1953C157C045D0012D90B /* int_homun.c */; }; + 53C19551157C045D0012D90B /* int_mail.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1953E157C045D0012D90B /* int_mail.c */; }; + 53C19552157C045D0012D90B /* int_mercenary.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19540157C045D0012D90B /* int_mercenary.c */; }; + 53C19553157C045D0012D90B /* int_party.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19542157C045D0012D90B /* int_party.c */; }; + 53C19554157C045D0012D90B /* int_pet.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19544157C045D0012D90B /* int_pet.c */; }; + 53C19555157C045D0012D90B /* int_quest.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19546157C045D0012D90B /* int_quest.c */; }; + 53C19556157C045D0012D90B /* int_storage.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C19548157C045D0012D90B /* int_storage.c */; }; + 53C19557157C045D0012D90B /* inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 53C1954A157C045D0012D90B /* inter.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 53C193CC157BFA830012D90B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 53C194A2157C03260012D90B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 53C19528157C044D0012D90B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 53006E8715AA145F00EA0266 /* general.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = general.h; sourceTree = ""; }; + 53006E8815AA145F00EA0266 /* swordsman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = swordsman.h; sourceTree = ""; }; + 53006E8915AA145F00EA0266 /* const.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = const.h; sourceTree = ""; }; + 53006E8A15AA145F00EA0266 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = ""; }; + 53006E8B15AA145F00EA0266 /* renewal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = renewal.h; sourceTree = ""; }; + 53006E8C15AA145F00EA0266 /* secure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = secure.h; sourceTree = ""; }; + 538CB45E15AD9B1700DF3F0D /* evdp_epoll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = evdp_epoll.c; sourceTree = ""; }; + 538CB45F15AD9B1700DF3F0D /* evdp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = evdp.h; sourceTree = ""; }; + 538CB46015AD9B1700DF3F0D /* mempool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mempool.c; sourceTree = ""; }; + 538CB46115AD9B1700DF3F0D /* mempool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mempool.h; sourceTree = ""; }; + 538CB46215AD9B1700DF3F0D /* mutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mutex.c; sourceTree = ""; }; + 538CB46315AD9B1700DF3F0D /* mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mutex.h; sourceTree = ""; }; + 538CB46415AD9B1700DF3F0D /* netbuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = netbuffer.c; sourceTree = ""; }; + 538CB46515AD9B1700DF3F0D /* netbuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = netbuffer.h; sourceTree = ""; }; + 538CB46615AD9B1700DF3F0D /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = network.c; sourceTree = ""; }; + 538CB46715AD9B1700DF3F0D /* network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = network.h; sourceTree = ""; }; + 538CB46815AD9B1700DF3F0D /* raconf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = raconf.c; sourceTree = ""; }; + 538CB46915AD9B1700DF3F0D /* raconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = raconf.h; sourceTree = ""; }; + 53C193CE157BFA830012D90B /* login-server_sql */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "login-server_sql"; sourceTree = BUILT_PRODUCTS_DIR; }; + 53C193D9157BFAF00012D90B /* account_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = account_sql.c; path = ../../src/login/account_sql.c; sourceTree = ""; }; + 53C193DA157BFAF00012D90B /* account.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = account.h; path = ../../src/login/account.h; sourceTree = ""; }; + 53C193DB157BFAF00012D90B /* ipban_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipban_sql.c; path = ../../src/login/ipban_sql.c; sourceTree = ""; }; + 53C193DC157BFAF00012D90B /* ipban.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ipban.h; path = ../../src/login/ipban.h; sourceTree = ""; }; + 53C193DD157BFAF00012D90B /* login.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = login.c; path = ../../src/login/login.c; sourceTree = ""; }; + 53C193DE157BFAF00012D90B /* login.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = login.h; path = ../../src/login/login.h; sourceTree = ""; }; + 53C193DF157BFAF00012D90B /* loginlog_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loginlog_sql.c; path = ../../src/login/loginlog_sql.c; sourceTree = ""; }; + 53C193E0157BFAF00012D90B /* loginlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loginlog.h; path = ../../src/login/loginlog.h; sourceTree = ""; }; + 53C193E6157BFE790012D90B /* atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atomic.h; sourceTree = ""; }; + 53C193E7157BFE790012D90B /* cbasetypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cbasetypes.h; sourceTree = ""; }; + 53C193E9157BFE790012D90B /* conf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = conf.c; sourceTree = ""; }; + 53C193EA157BFE790012D90B /* conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = conf.h; sourceTree = ""; }; + 53C193EB157BFE790012D90B /* core.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = core.c; sourceTree = ""; }; + 53C193EC157BFE790012D90B /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = ""; }; + 53C193ED157BFE790012D90B /* db.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = db.c; sourceTree = ""; }; + 53C193EE157BFE790012D90B /* db.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = db.h; sourceTree = ""; }; + 53C193EF157BFE790012D90B /* des.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = des.c; sourceTree = ""; }; + 53C193F0157BFE790012D90B /* des.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = des.h; sourceTree = ""; }; + 53C193F1157BFE790012D90B /* ers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ers.c; sourceTree = ""; }; + 53C193F2157BFE790012D90B /* ers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ers.h; sourceTree = ""; }; + 53C193F3157BFE790012D90B /* grfio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = grfio.c; sourceTree = ""; }; + 53C193F4157BFE790012D90B /* grfio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = grfio.h; sourceTree = ""; }; + 53C193F9157BFE790012D90B /* malloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = malloc.c; sourceTree = ""; }; + 53C193FA157BFE790012D90B /* malloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = malloc.h; sourceTree = ""; }; + 53C193FB157BFE790012D90B /* mapindex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mapindex.c; sourceTree = ""; }; + 53C193FC157BFE790012D90B /* mapindex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mapindex.h; sourceTree = ""; }; + 53C193FD157BFE790012D90B /* md5calc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = md5calc.c; sourceTree = ""; }; + 53C193FE157BFE790012D90B /* md5calc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5calc.h; sourceTree = ""; }; + 53C193FF157BFE790012D90B /* mmo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mmo.h; sourceTree = ""; }; + 53C19400157BFE790012D90B /* nullpo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nullpo.c; sourceTree = ""; }; + 53C19401157BFE790012D90B /* nullpo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nullpo.h; sourceTree = ""; }; + 53C1941C157BFE790012D90B /* random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = random.c; sourceTree = ""; }; + 53C1941D157BFE790012D90B /* random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = random.h; sourceTree = ""; }; + 53C1941E157BFE790012D90B /* showmsg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = showmsg.c; sourceTree = ""; }; + 53C1941F157BFE790012D90B /* showmsg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = showmsg.h; sourceTree = ""; }; + 53C19420157BFE790012D90B /* socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = socket.c; sourceTree = ""; }; + 53C19421157BFE790012D90B /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = ""; }; + 53C19422157BFE790012D90B /* spinlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spinlock.h; sourceTree = ""; }; + 53C19423157BFE790012D90B /* sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sql.c; sourceTree = ""; }; + 53C19424157BFE790012D90B /* sql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sql.h; sourceTree = ""; }; + 53C19425157BFE790012D90B /* strlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strlib.c; sourceTree = ""; }; + 53C19426157BFE790012D90B /* strlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strlib.h; sourceTree = ""; }; + 53C19427157BFE790012D90B /* thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = thread.c; sourceTree = ""; }; + 53C19428157BFE790012D90B /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = ""; }; + 53C19429157BFE790012D90B /* timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timer.c; sourceTree = ""; }; + 53C1942A157BFE790012D90B /* timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timer.h; sourceTree = ""; }; + 53C1942B157BFE790012D90B /* utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utils.c; sourceTree = ""; }; + 53C1942C157BFE790012D90B /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = ""; }; + 53C1942D157BFE790012D90B /* winapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winapi.h; sourceTree = ""; }; + 53C194A4157C03260012D90B /* map-server_sql */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "map-server_sql"; sourceTree = BUILT_PRODUCTS_DIR; }; + 53C194AE157C039A0012D90B /* atcommand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = atcommand.c; path = ../../src/map/atcommand.c; sourceTree = ""; }; + 53C194AF157C039A0012D90B /* atcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atcommand.h; path = ../../src/map/atcommand.h; sourceTree = ""; }; + 53C194B0157C039A0012D90B /* battle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = battle.c; path = ../../src/map/battle.c; sourceTree = ""; usesTabs = 1; }; + 53C194B1157C039A0012D90B /* battle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = battle.h; path = ../../src/map/battle.h; sourceTree = ""; }; + 53C194B2157C039A0012D90B /* battleground.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = battleground.c; path = ../../src/map/battleground.c; sourceTree = ""; }; + 53C194B3157C039A0012D90B /* battleground.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = battleground.h; path = ../../src/map/battleground.h; sourceTree = ""; }; + 53C194B4157C039A0012D90B /* buyingstore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buyingstore.c; path = ../../src/map/buyingstore.c; sourceTree = ""; }; + 53C194B5157C039A0012D90B /* buyingstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = buyingstore.h; path = ../../src/map/buyingstore.h; sourceTree = ""; }; + 53C194B6157C039A0012D90B /* chat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chat.c; path = ../../src/map/chat.c; sourceTree = ""; }; + 53C194B7157C039A0012D90B /* chat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chat.h; path = ../../src/map/chat.h; sourceTree = ""; }; + 53C194B8157C039A0012D90B /* chrif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chrif.c; path = ../../src/map/chrif.c; sourceTree = ""; }; + 53C194B9157C039A0012D90B /* chrif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chrif.h; path = ../../src/map/chrif.h; sourceTree = ""; }; + 53C194BA157C039A0012D90B /* clif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = clif.c; path = ../../src/map/clif.c; sourceTree = ""; usesTabs = 1; }; + 53C194BB157C039A0012D90B /* clif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = clif.h; path = ../../src/map/clif.h; sourceTree = ""; }; + 53C194C5157C039A0012D90B /* date.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = date.c; path = ../../src/map/date.c; sourceTree = ""; }; + 53C194C6157C039A0012D90B /* date.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = date.h; path = ../../src/map/date.h; sourceTree = ""; }; + 53C194C7157C039A0012D90B /* duel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = duel.c; path = ../../src/map/duel.c; sourceTree = ""; }; + 53C194C8157C039A0012D90B /* duel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = duel.h; path = ../../src/map/duel.h; sourceTree = ""; }; + 53C194C9157C039A0012D90B /* elemental.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = elemental.c; path = ../../src/map/elemental.c; sourceTree = ""; }; + 53C194CA157C039A0012D90B /* elemental.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = elemental.h; path = ../../src/map/elemental.h; sourceTree = ""; }; + 53C194CB157C039A0012D90B /* guild.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = guild.c; path = ../../src/map/guild.c; sourceTree = ""; }; + 53C194CC157C039A0012D90B /* guild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = guild.h; path = ../../src/map/guild.h; sourceTree = ""; }; + 53C194CD157C039A0012D90B /* homunculus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = homunculus.c; path = ../../src/map/homunculus.c; sourceTree = ""; }; + 53C194CE157C039A0012D90B /* homunculus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = homunculus.h; path = ../../src/map/homunculus.h; sourceTree = ""; }; + 53C194CF157C039A0012D90B /* instance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = instance.c; path = ../../src/map/instance.c; sourceTree = ""; }; + 53C194D0157C039A0012D90B /* instance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = instance.h; path = ../../src/map/instance.h; sourceTree = ""; }; + 53C194D1157C039A0012D90B /* intif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = intif.c; path = ../../src/map/intif.c; sourceTree = ""; }; + 53C194D2157C039A0012D90B /* intif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = intif.h; path = ../../src/map/intif.h; sourceTree = ""; }; + 53C194D3157C039A0012D90B /* itemdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = itemdb.c; path = ../../src/map/itemdb.c; sourceTree = ""; }; + 53C194D4157C039A0012D90B /* itemdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = itemdb.h; path = ../../src/map/itemdb.h; sourceTree = ""; }; + 53C194D5157C039A0012D90B /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = ../../src/map/log.c; sourceTree = ""; }; + 53C194D6157C039A0012D90B /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = log.h; path = ../../src/map/log.h; sourceTree = ""; }; + 53C194D7157C039A0012D90B /* mail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mail.c; path = ../../src/map/mail.c; sourceTree = ""; }; + 53C194D8157C039A0012D90B /* mail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mail.h; path = ../../src/map/mail.h; sourceTree = ""; }; + 53C194D9157C039A0012D90B /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = map.c; path = ../../src/map/map.c; sourceTree = ""; }; + 53C194DA157C039A0012D90B /* map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = map.h; path = ../../src/map/map.h; sourceTree = ""; }; + 53C194DB157C039A0012D90B /* mapreg_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapreg_sql.c; path = ../../src/map/mapreg_sql.c; sourceTree = ""; }; + 53C194DC157C039A0012D90B /* mapreg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapreg.h; path = ../../src/map/mapreg.h; sourceTree = ""; }; + 53C194DD157C039A0012D90B /* mercenary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mercenary.c; path = ../../src/map/mercenary.c; sourceTree = ""; }; + 53C194DE157C039A0012D90B /* mercenary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mercenary.h; path = ../../src/map/mercenary.h; sourceTree = ""; }; + 53C194DF157C039A0012D90B /* mob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mob.c; path = ../../src/map/mob.c; sourceTree = ""; }; + 53C194E0157C039A0012D90B /* mob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mob.h; path = ../../src/map/mob.h; sourceTree = ""; }; + 53C194E1157C039A0012D90B /* npc_chat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = npc_chat.c; path = ../../src/map/npc_chat.c; sourceTree = ""; }; + 53C194E2157C039A0012D90B /* npc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = npc.c; path = ../../src/map/npc.c; sourceTree = ""; }; + 53C194E3157C039A0012D90B /* npc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = npc.h; path = ../../src/map/npc.h; sourceTree = ""; }; + 53C194E4157C039A0012D90B /* party.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = party.c; path = ../../src/map/party.c; sourceTree = ""; }; + 53C194E5157C039A0012D90B /* party.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = party.h; path = ../../src/map/party.h; sourceTree = ""; }; + 53C194E6157C039A0012D90B /* path.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = path.c; path = ../../src/map/path.c; sourceTree = ""; }; + 53C194E7157C039A0012D90B /* path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = path.h; path = ../../src/map/path.h; sourceTree = ""; }; + 53C194E8157C039A0012D90B /* pc_groups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pc_groups.c; path = ../../src/map/pc_groups.c; sourceTree = ""; }; + 53C194E9157C039A0012D90B /* pc_groups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pc_groups.h; path = ../../src/map/pc_groups.h; sourceTree = ""; }; + 53C194EA157C039A0012D90B /* pc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pc.c; path = ../../src/map/pc.c; sourceTree = ""; }; + 53C194EB157C039A0012D90B /* pc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pc.h; path = ../../src/map/pc.h; sourceTree = ""; }; + 53C194ED157C039A0012D90B /* pet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pet.c; path = ../../src/map/pet.c; sourceTree = ""; }; + 53C194EE157C039A0012D90B /* pet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pet.h; path = ../../src/map/pet.h; sourceTree = ""; }; + 53C194EF157C039A0012D90B /* quest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quest.c; path = ../../src/map/quest.c; sourceTree = ""; }; + 53C194F0157C039A0012D90B /* quest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quest.h; path = ../../src/map/quest.h; sourceTree = ""; }; + 53C194F1157C039A0012D90B /* script.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = script.c; path = ../../src/map/script.c; sourceTree = ""; }; + 53C194F2157C039A0012D90B /* script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = script.h; path = ../../src/map/script.h; sourceTree = ""; }; + 53C194F3157C039A0012D90B /* searchstore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = searchstore.c; path = ../../src/map/searchstore.c; sourceTree = ""; }; + 53C194F4157C039A0012D90B /* searchstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = searchstore.h; path = ../../src/map/searchstore.h; sourceTree = ""; }; + 53C194F5157C039A0012D90B /* skill.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = skill.c; path = ../../src/map/skill.c; sourceTree = ""; }; + 53C194F6157C039A0012D90B /* skill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = skill.h; path = ../../src/map/skill.h; sourceTree = ""; }; + 53C194F7157C039A0012D90B /* status.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = status.c; path = ../../src/map/status.c; sourceTree = ""; }; + 53C194F8157C039A0012D90B /* status.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = status.h; path = ../../src/map/status.h; sourceTree = ""; }; + 53C194F9157C039A0012D90B /* storage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = storage.c; path = ../../src/map/storage.c; sourceTree = ""; }; + 53C194FA157C039A0012D90B /* storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = storage.h; path = ../../src/map/storage.h; sourceTree = ""; }; + 53C194FB157C039A0012D90B /* trade.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trade.c; path = ../../src/map/trade.c; sourceTree = ""; }; + 53C194FC157C039A0012D90B /* trade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = trade.h; path = ../../src/map/trade.h; sourceTree = ""; }; + 53C194FD157C039A0012D90B /* unit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unit.c; path = ../../src/map/unit.c; sourceTree = ""; }; + 53C194FE157C039A0012D90B /* unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unit.h; path = ../../src/map/unit.h; sourceTree = ""; }; + 53C194FF157C039A0012D90B /* vending.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vending.c; path = ../../src/map/vending.c; sourceTree = ""; }; + 53C19500157C039A0012D90B /* vending.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vending.h; path = ../../src/map/vending.h; sourceTree = ""; }; + 53C1952A157C044D0012D90B /* char-server_sql */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "char-server_sql"; sourceTree = BUILT_PRODUCTS_DIR; }; + 53C19534157C045D0012D90B /* char.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = char.c; path = ../../src/char/char.c; sourceTree = ""; }; + 53C19535157C045D0012D90B /* char.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = char.h; path = ../../src/char/char.h; sourceTree = ""; }; + 53C19536157C045D0012D90B /* int_auction.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_auction.c; path = ../../src/char/int_auction.c; sourceTree = ""; }; + 53C19537157C045D0012D90B /* int_auction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_auction.h; path = ../../src/char/int_auction.h; sourceTree = ""; }; + 53C19538157C045D0012D90B /* int_elemental.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_elemental.c; path = ../../src/char/int_elemental.c; sourceTree = ""; }; + 53C19539157C045D0012D90B /* int_elemental.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_elemental.h; path = ../../src/char/int_elemental.h; sourceTree = ""; }; + 53C1953A157C045D0012D90B /* int_guild.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_guild.c; path = ../../src/char/int_guild.c; sourceTree = ""; }; + 53C1953B157C045D0012D90B /* int_guild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_guild.h; path = ../../src/char/int_guild.h; sourceTree = ""; }; + 53C1953C157C045D0012D90B /* int_homun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_homun.c; path = ../../src/char/int_homun.c; sourceTree = ""; }; + 53C1953D157C045D0012D90B /* int_homun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_homun.h; path = ../../src/char/int_homun.h; sourceTree = ""; }; + 53C1953E157C045D0012D90B /* int_mail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_mail.c; path = ../../src/char/int_mail.c; sourceTree = ""; }; + 53C1953F157C045D0012D90B /* int_mail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_mail.h; path = ../../src/char/int_mail.h; sourceTree = ""; }; + 53C19540157C045D0012D90B /* int_mercenary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_mercenary.c; path = ../../src/char/int_mercenary.c; sourceTree = ""; }; + 53C19541157C045D0012D90B /* int_mercenary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_mercenary.h; path = ../../src/char/int_mercenary.h; sourceTree = ""; }; + 53C19542157C045D0012D90B /* int_party.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_party.c; path = ../../src/char/int_party.c; sourceTree = ""; }; + 53C19543157C045D0012D90B /* int_party.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_party.h; path = ../../src/char/int_party.h; sourceTree = ""; }; + 53C19544157C045D0012D90B /* int_pet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_pet.c; path = ../../src/char/int_pet.c; sourceTree = ""; }; + 53C19545157C045D0012D90B /* int_pet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_pet.h; path = ../../src/char/int_pet.h; sourceTree = ""; }; + 53C19546157C045D0012D90B /* int_quest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_quest.c; path = ../../src/char/int_quest.c; sourceTree = ""; }; + 53C19547157C045D0012D90B /* int_quest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_quest.h; path = ../../src/char/int_quest.h; sourceTree = ""; }; + 53C19548157C045D0012D90B /* int_storage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_storage.c; path = ../../src/char/int_storage.c; sourceTree = ""; }; + 53C19549157C045D0012D90B /* int_storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_storage.h; path = ../../src/char/int_storage.h; sourceTree = ""; }; + 53C1954A157C045D0012D90B /* inter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = inter.c; path = ../../src/char/inter.c; sourceTree = ""; }; + 53C1954B157C045D0012D90B /* inter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = inter.h; path = ../../src/char/inter.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 53C193CB157BFA830012D90B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53C194A1157C03260012D90B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53C19527157C044D0012D90B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 53006E8515AA145F00EA0266 /* config */ = { + isa = PBXGroup; + children = ( + 53006E8615AA145F00EA0266 /* classes */, + 53006E8915AA145F00EA0266 /* const.h */, + 53006E8A15AA145F00EA0266 /* core.h */, + 53006E8B15AA145F00EA0266 /* renewal.h */, + 53006E8C15AA145F00EA0266 /* secure.h */, + ); + name = config; + path = ../src/config; + sourceTree = ""; + }; + 53006E8615AA145F00EA0266 /* classes */ = { + isa = PBXGroup; + children = ( + 53006E8715AA145F00EA0266 /* general.h */, + 53006E8815AA145F00EA0266 /* swordsman.h */, + ); + path = classes; + sourceTree = ""; + }; + 53C193C1157BF8E40012D90B = { + isa = PBXGroup; + children = ( + 53006E8515AA145F00EA0266 /* config */, + 53C193E5157BFE790012D90B /* common */, + 53C193D1157BFA830012D90B /* login-server_sql */, + 53C194A6157C03260012D90B /* map-server_sql */, + 53C1952C157C044D0012D90B /* char-server_sql */, + 53C193CF157BFA830012D90B /* Products */, + ); + sourceTree = ""; + }; + 53C193CF157BFA830012D90B /* Products */ = { + isa = PBXGroup; + children = ( + 53C193CE157BFA830012D90B /* login-server_sql */, + 53C194A4157C03260012D90B /* map-server_sql */, + 53C1952A157C044D0012D90B /* char-server_sql */, + ); + name = Products; + sourceTree = ""; + }; + 53C193D1157BFA830012D90B /* login-server_sql */ = { + isa = PBXGroup; + children = ( + 53C193D9157BFAF00012D90B /* account_sql.c */, + 53C193DA157BFAF00012D90B /* account.h */, + 53C193DB157BFAF00012D90B /* ipban_sql.c */, + 53C193DC157BFAF00012D90B /* ipban.h */, + 53C193DD157BFAF00012D90B /* login.c */, + 53C193DE157BFAF00012D90B /* login.h */, + 53C193DF157BFAF00012D90B /* loginlog_sql.c */, + 53C193E0157BFAF00012D90B /* loginlog.h */, + ); + path = "login-server_sql"; + sourceTree = ""; + }; + 53C193E5157BFE790012D90B /* common */ = { + isa = PBXGroup; + children = ( + 53C193E6157BFE790012D90B /* atomic.h */, + 53C193E7157BFE790012D90B /* cbasetypes.h */, + 53C193E9157BFE790012D90B /* conf.c */, + 53C193EA157BFE790012D90B /* conf.h */, + 53C193EB157BFE790012D90B /* core.c */, + 53C193EC157BFE790012D90B /* core.h */, + 53C193ED157BFE790012D90B /* db.c */, + 53C193EE157BFE790012D90B /* db.h */, + 53C193EF157BFE790012D90B /* des.c */, + 53C193F0157BFE790012D90B /* des.h */, + 53C193F1157BFE790012D90B /* ers.c */, + 53C193F2157BFE790012D90B /* ers.h */, + 538CB45F15AD9B1700DF3F0D /* evdp.h */, + 538CB45E15AD9B1700DF3F0D /* evdp_epoll.c */, + 53C193F3157BFE790012D90B /* grfio.c */, + 53C193F4157BFE790012D90B /* grfio.h */, + 53C193F9157BFE790012D90B /* malloc.c */, + 53C193FA157BFE790012D90B /* malloc.h */, + 53C193FB157BFE790012D90B /* mapindex.c */, + 53C193FC157BFE790012D90B /* mapindex.h */, + 53C193FD157BFE790012D90B /* md5calc.c */, + 53C193FE157BFE790012D90B /* md5calc.h */, + 538CB46015AD9B1700DF3F0D /* mempool.c */, + 538CB46115AD9B1700DF3F0D /* mempool.h */, + 53C193FF157BFE790012D90B /* mmo.h */, + 538CB46215AD9B1700DF3F0D /* mutex.c */, + 538CB46315AD9B1700DF3F0D /* mutex.h */, + 538CB46415AD9B1700DF3F0D /* netbuffer.c */, + 538CB46515AD9B1700DF3F0D /* netbuffer.h */, + 538CB46615AD9B1700DF3F0D /* network.c */, + 538CB46715AD9B1700DF3F0D /* network.h */, + 53C19400157BFE790012D90B /* nullpo.c */, + 53C19401157BFE790012D90B /* nullpo.h */, + 538CB46815AD9B1700DF3F0D /* raconf.c */, + 538CB46915AD9B1700DF3F0D /* raconf.h */, + 53C1941C157BFE790012D90B /* random.c */, + 53C1941D157BFE790012D90B /* random.h */, + 53C1941E157BFE790012D90B /* showmsg.c */, + 53C1941F157BFE790012D90B /* showmsg.h */, + 53C19420157BFE790012D90B /* socket.c */, + 53C19421157BFE790012D90B /* socket.h */, + 53C19422157BFE790012D90B /* spinlock.h */, + 53C19423157BFE790012D90B /* sql.c */, + 53C19424157BFE790012D90B /* sql.h */, + 53C19425157BFE790012D90B /* strlib.c */, + 53C19426157BFE790012D90B /* strlib.h */, + 53C19427157BFE790012D90B /* thread.c */, + 53C19428157BFE790012D90B /* thread.h */, + 53C19429157BFE790012D90B /* timer.c */, + 53C1942A157BFE790012D90B /* timer.h */, + 53C1942B157BFE790012D90B /* utils.c */, + 53C1942C157BFE790012D90B /* utils.h */, + 53C1942D157BFE790012D90B /* winapi.h */, + ); + name = common; + path = ../src/common; + sourceTree = ""; + }; + 53C194A6157C03260012D90B /* map-server_sql */ = { + isa = PBXGroup; + children = ( + 53C194AE157C039A0012D90B /* atcommand.c */, + 53C194AF157C039A0012D90B /* atcommand.h */, + 53C194B0157C039A0012D90B /* battle.c */, + 53C194B1157C039A0012D90B /* battle.h */, + 53C194B2157C039A0012D90B /* battleground.c */, + 53C194B3157C039A0012D90B /* battleground.h */, + 53C194B4157C039A0012D90B /* buyingstore.c */, + 53C194B5157C039A0012D90B /* buyingstore.h */, + 53C194B6157C039A0012D90B /* chat.c */, + 53C194B7157C039A0012D90B /* chat.h */, + 53C194B8157C039A0012D90B /* chrif.c */, + 53C194B9157C039A0012D90B /* chrif.h */, + 53C194BA157C039A0012D90B /* clif.c */, + 53C194BB157C039A0012D90B /* clif.h */, + 53C194C5157C039A0012D90B /* date.c */, + 53C194C6157C039A0012D90B /* date.h */, + 53C194C7157C039A0012D90B /* duel.c */, + 53C194C8157C039A0012D90B /* duel.h */, + 53C194C9157C039A0012D90B /* elemental.c */, + 53C194CA157C039A0012D90B /* elemental.h */, + 53C194CB157C039A0012D90B /* guild.c */, + 53C194CC157C039A0012D90B /* guild.h */, + 53C194CD157C039A0012D90B /* homunculus.c */, + 53C194CE157C039A0012D90B /* homunculus.h */, + 53C194CF157C039A0012D90B /* instance.c */, + 53C194D0157C039A0012D90B /* instance.h */, + 53C194D1157C039A0012D90B /* intif.c */, + 53C194D2157C039A0012D90B /* intif.h */, + 53C194D3157C039A0012D90B /* itemdb.c */, + 53C194D4157C039A0012D90B /* itemdb.h */, + 53C194D5157C039A0012D90B /* log.c */, + 53C194D6157C039A0012D90B /* log.h */, + 53C194D7157C039A0012D90B /* mail.c */, + 53C194D8157C039A0012D90B /* mail.h */, + 53C194D9157C039A0012D90B /* map.c */, + 53C194DA157C039A0012D90B /* map.h */, + 53C194DB157C039A0012D90B /* mapreg_sql.c */, + 53C194DC157C039A0012D90B /* mapreg.h */, + 53C194DD157C039A0012D90B /* mercenary.c */, + 53C194DE157C039A0012D90B /* mercenary.h */, + 53C194DF157C039A0012D90B /* mob.c */, + 53C194E0157C039A0012D90B /* mob.h */, + 53C194E1157C039A0012D90B /* npc_chat.c */, + 53C194E2157C039A0012D90B /* npc.c */, + 53C194E3157C039A0012D90B /* npc.h */, + 53C194E4157C039A0012D90B /* party.c */, + 53C194E5157C039A0012D90B /* party.h */, + 53C194E6157C039A0012D90B /* path.c */, + 53C194E7157C039A0012D90B /* path.h */, + 53C194E8157C039A0012D90B /* pc_groups.c */, + 53C194E9157C039A0012D90B /* pc_groups.h */, + 53C194EA157C039A0012D90B /* pc.c */, + 53C194EB157C039A0012D90B /* pc.h */, + 53C194ED157C039A0012D90B /* pet.c */, + 53C194EE157C039A0012D90B /* pet.h */, + 53C194EF157C039A0012D90B /* quest.c */, + 53C194F0157C039A0012D90B /* quest.h */, + 53C194F1157C039A0012D90B /* script.c */, + 53C194F2157C039A0012D90B /* script.h */, + 53C194F3157C039A0012D90B /* searchstore.c */, + 53C194F4157C039A0012D90B /* searchstore.h */, + 53C194F5157C039A0012D90B /* skill.c */, + 53C194F6157C039A0012D90B /* skill.h */, + 53C194F7157C039A0012D90B /* status.c */, + 53C194F8157C039A0012D90B /* status.h */, + 53C194F9157C039A0012D90B /* storage.c */, + 53C194FA157C039A0012D90B /* storage.h */, + 53C194FB157C039A0012D90B /* trade.c */, + 53C194FC157C039A0012D90B /* trade.h */, + 53C194FD157C039A0012D90B /* unit.c */, + 53C194FE157C039A0012D90B /* unit.h */, + 53C194FF157C039A0012D90B /* vending.c */, + 53C19500157C039A0012D90B /* vending.h */, + ); + path = "map-server_sql"; + sourceTree = ""; + }; + 53C1952C157C044D0012D90B /* char-server_sql */ = { + isa = PBXGroup; + children = ( + 53C19534157C045D0012D90B /* char.c */, + 53C19535157C045D0012D90B /* char.h */, + 53C19536157C045D0012D90B /* int_auction.c */, + 53C19537157C045D0012D90B /* int_auction.h */, + 53C19538157C045D0012D90B /* int_elemental.c */, + 53C19539157C045D0012D90B /* int_elemental.h */, + 53C1953A157C045D0012D90B /* int_guild.c */, + 53C1953B157C045D0012D90B /* int_guild.h */, + 53C1953C157C045D0012D90B /* int_homun.c */, + 53C1953D157C045D0012D90B /* int_homun.h */, + 53C1953E157C045D0012D90B /* int_mail.c */, + 53C1953F157C045D0012D90B /* int_mail.h */, + 53C19540157C045D0012D90B /* int_mercenary.c */, + 53C19541157C045D0012D90B /* int_mercenary.h */, + 53C19542157C045D0012D90B /* int_party.c */, + 53C19543157C045D0012D90B /* int_party.h */, + 53C19544157C045D0012D90B /* int_pet.c */, + 53C19545157C045D0012D90B /* int_pet.h */, + 53C19546157C045D0012D90B /* int_quest.c */, + 53C19547157C045D0012D90B /* int_quest.h */, + 53C19548157C045D0012D90B /* int_storage.c */, + 53C19549157C045D0012D90B /* int_storage.h */, + 53C1954A157C045D0012D90B /* inter.c */, + 53C1954B157C045D0012D90B /* inter.h */, + ); + path = "char-server_sql"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 53C193CD157BFA830012D90B /* login-server_sql */ = { + isa = PBXNativeTarget; + buildConfigurationList = 53C193D6157BFA830012D90B /* Build configuration list for PBXNativeTarget "login-server_sql" */; + buildPhases = ( + 53C193CA157BFA830012D90B /* Sources */, + 53C193CB157BFA830012D90B /* Frameworks */, + 53C193CC157BFA830012D90B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "login-server_sql"; + productName = "login-server_sql"; + productReference = 53C193CE157BFA830012D90B /* login-server_sql */; + productType = "com.apple.product-type.tool"; + }; + 53C194A3157C03260012D90B /* map-server_sql */ = { + isa = PBXNativeTarget; + buildConfigurationList = 53C194AB157C03260012D90B /* Build configuration list for PBXNativeTarget "map-server_sql" */; + buildPhases = ( + 53C194A0157C03260012D90B /* Sources */, + 53C194A1157C03260012D90B /* Frameworks */, + 53C194A2157C03260012D90B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "map-server_sql"; + productName = "map-server_sql"; + productReference = 53C194A4157C03260012D90B /* map-server_sql */; + productType = "com.apple.product-type.tool"; + }; + 53C19529157C044D0012D90B /* char-server_sql */ = { + isa = PBXNativeTarget; + buildConfigurationList = 53C19531157C044D0012D90B /* Build configuration list for PBXNativeTarget "char-server_sql" */; + buildPhases = ( + 53C19526157C044D0012D90B /* Sources */, + 53C19527157C044D0012D90B /* Frameworks */, + 53C19528157C044D0012D90B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "char-server_sql"; + productName = "char-server_sql"; + productReference = 53C1952A157C044D0012D90B /* char-server_sql */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 53C193C3157BF8E40012D90B /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0430; + }; + buildConfigurationList = 53C193C6157BF8E40012D90B /* Build configuration list for PBXProject "rAthena" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 53C193C1157BF8E40012D90B; + productRefGroup = 53C193CF157BFA830012D90B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 53C193CD157BFA830012D90B /* login-server_sql */, + 53C194A3157C03260012D90B /* map-server_sql */, + 53C19529157C044D0012D90B /* char-server_sql */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 53C193CA157BFA830012D90B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53C193E1157BFAF00012D90B /* account_sql.c in Sources */, + 53C193E2157BFAF00012D90B /* ipban_sql.c in Sources */, + 53C193E3157BFAF00012D90B /* login.c in Sources */, + 53C193E4157BFAF00012D90B /* loginlog_sql.c in Sources */, + 53C1942E157BFE790012D90B /* conf.c in Sources */, + 53C1942F157BFE790012D90B /* core.c in Sources */, + 53C19430157BFE790012D90B /* db.c in Sources */, + 53C19431157BFE790012D90B /* des.c in Sources */, + 53C19432157BFE790012D90B /* ers.c in Sources */, + 53C19433157BFE790012D90B /* grfio.c in Sources */, + 53C19436157BFE790012D90B /* malloc.c in Sources */, + 53C19437157BFE790012D90B /* mapindex.c in Sources */, + 53C19438157BFE790012D90B /* md5calc.c in Sources */, + 53C19439157BFE790012D90B /* nullpo.c in Sources */, + 53C19452157BFE790012D90B /* random.c in Sources */, + 53C19453157BFE790012D90B /* showmsg.c in Sources */, + 53C19454157BFE790012D90B /* socket.c in Sources */, + 53C19455157BFE790012D90B /* sql.c in Sources */, + 53C19456157BFE790012D90B /* strlib.c in Sources */, + 53C19457157BFE790012D90B /* thread.c in Sources */, + 53C19458157BFE790012D90B /* timer.c in Sources */, + 53C19459157BFE790012D90B /* utils.c in Sources */, + 538CB46A15AD9B1700DF3F0D /* evdp_epoll.c in Sources */, + 538CB46D15AD9B1700DF3F0D /* mempool.c in Sources */, + 538CB47015AD9B1700DF3F0D /* mutex.c in Sources */, + 538CB47315AD9B1700DF3F0D /* netbuffer.c in Sources */, + 538CB47615AD9B1700DF3F0D /* network.c in Sources */, + 538CB47915AD9B1700DF3F0D /* raconf.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53C194A0157C03260012D90B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53C19501157C039A0012D90B /* atcommand.c in Sources */, + 53C19502157C039A0012D90B /* battle.c in Sources */, + 53C19503157C039A0012D90B /* battleground.c in Sources */, + 53C19504157C039A0012D90B /* buyingstore.c in Sources */, + 53C19505157C039A0012D90B /* chat.c in Sources */, + 53C19506157C039A0012D90B /* chrif.c in Sources */, + 53C19507157C039A0012D90B /* clif.c in Sources */, + 53C19508157C039A0012D90B /* date.c in Sources */, + 53C19509157C039A0012D90B /* duel.c in Sources */, + 53C1950A157C039A0012D90B /* elemental.c in Sources */, + 53C1950B157C039A0012D90B /* guild.c in Sources */, + 53C1950C157C039A0012D90B /* homunculus.c in Sources */, + 53C1950D157C039A0012D90B /* instance.c in Sources */, + 53C1950E157C039A0012D90B /* intif.c in Sources */, + 53C1950F157C039A0012D90B /* itemdb.c in Sources */, + 53C19510157C039A0012D90B /* log.c in Sources */, + 53C19511157C039A0012D90B /* mail.c in Sources */, + 53C19512157C039A0012D90B /* map.c in Sources */, + 53C19513157C039A0012D90B /* mapreg_sql.c in Sources */, + 53C19514157C039A0012D90B /* mercenary.c in Sources */, + 53C19515157C039A0012D90B /* mob.c in Sources */, + 53C19516157C039A0012D90B /* npc_chat.c in Sources */, + 53C19517157C039A0012D90B /* npc.c in Sources */, + 53C19518157C039A0012D90B /* party.c in Sources */, + 53C19519157C039A0012D90B /* path.c in Sources */, + 53C1951A157C039A0012D90B /* pc_groups.c in Sources */, + 53C1951B157C039A0012D90B /* pc.c in Sources */, + 53C1951C157C039A0012D90B /* pet.c in Sources */, + 53C1951D157C039A0012D90B /* quest.c in Sources */, + 53C1951E157C039A0012D90B /* script.c in Sources */, + 53C1951F157C039A0012D90B /* searchstore.c in Sources */, + 53C19520157C039A0012D90B /* skill.c in Sources */, + 53C19521157C039A0012D90B /* status.c in Sources */, + 53C19522157C039A0012D90B /* storage.c in Sources */, + 53C19523157C039A0012D90B /* trade.c in Sources */, + 53C19524157C039A0012D90B /* unit.c in Sources */, + 53C19525157C039A0012D90B /* vending.c in Sources */, + 538CB46B15AD9B1700DF3F0D /* evdp_epoll.c in Sources */, + 538CB46E15AD9B1700DF3F0D /* mempool.c in Sources */, + 538CB47115AD9B1700DF3F0D /* mutex.c in Sources */, + 538CB47415AD9B1700DF3F0D /* netbuffer.c in Sources */, + 538CB47715AD9B1700DF3F0D /* network.c in Sources */, + 538CB47A15AD9B1700DF3F0D /* raconf.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53C19526157C044D0012D90B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53C1954C157C045D0012D90B /* char.c in Sources */, + 53C1954D157C045D0012D90B /* int_auction.c in Sources */, + 53C1954E157C045D0012D90B /* int_elemental.c in Sources */, + 53C1954F157C045D0012D90B /* int_guild.c in Sources */, + 53C19550157C045D0012D90B /* int_homun.c in Sources */, + 53C19551157C045D0012D90B /* int_mail.c in Sources */, + 53C19552157C045D0012D90B /* int_mercenary.c in Sources */, + 53C19553157C045D0012D90B /* int_party.c in Sources */, + 53C19554157C045D0012D90B /* int_pet.c in Sources */, + 53C19555157C045D0012D90B /* int_quest.c in Sources */, + 53C19556157C045D0012D90B /* int_storage.c in Sources */, + 53C19557157C045D0012D90B /* inter.c in Sources */, + 538CB46C15AD9B1700DF3F0D /* evdp_epoll.c in Sources */, + 538CB46F15AD9B1700DF3F0D /* mempool.c in Sources */, + 538CB47215AD9B1700DF3F0D /* mutex.c in Sources */, + 538CB47515AD9B1700DF3F0D /* netbuffer.c in Sources */, + 538CB47815AD9B1700DF3F0D /* network.c in Sources */, + 538CB47B15AD9B1700DF3F0D /* raconf.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 53C193C8157BF8E40012D90B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 53C193C9157BF8E40012D90B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + 53C193D7157BFA830012D90B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../src/common/obj_all\"", + "\"$(SRCROOT)/../src/common/obj_sql\"", + "\"$(SRCROOT)/../3rdparty/\"", + "\"$(SRCROOT)/../3rdparty/mysql/lib\"", + "\"$(SRCROOT)/../3rdparty/pcre/lib\"", + "\"$(SRCROOT)/../3rdparty/zlib/lib\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 53C193D8157BFA830012D90B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../src/common/obj_all\"", + "\"$(SRCROOT)/../src/common/obj_sql\"", + "\"$(SRCROOT)/../3rdparty/\"", + "\"$(SRCROOT)/../3rdparty/mysql/lib\"", + "\"$(SRCROOT)/../3rdparty/pcre/lib\"", + "\"$(SRCROOT)/../3rdparty/zlib/lib\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 53C194AC157C03260012D90B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 53C194AD157C03260012D90B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 53C19532157C044D0012D90B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 53C19533157C044D0012D90B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 53C193C6157BF8E40012D90B /* Build configuration list for PBXProject "rAthena" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53C193C8157BF8E40012D90B /* Debug */, + 53C193C9157BF8E40012D90B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 53C193D6157BFA830012D90B /* Build configuration list for PBXNativeTarget "login-server_sql" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53C193D7157BFA830012D90B /* Debug */, + 53C193D8157BFA830012D90B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 53C194AB157C03260012D90B /* Build configuration list for PBXNativeTarget "map-server_sql" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53C194AC157C03260012D90B /* Debug */, + 53C194AD157C03260012D90B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 53C19531157C044D0012D90B /* Build configuration list for PBXNativeTarget "char-server_sql" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53C19532157C044D0012D90B /* Debug */, + 53C19533157C044D0012D90B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 53C193C3157BF8E40012D90B /* Project object */; +} diff --git a/rAthena/rAthena.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/rAthena/rAthena.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..8a9819b7e --- /dev/null +++ b/rAthena/rAthena.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/UserInterfaceState.xcuserstate b/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 000000000..754f3a6af Binary files /dev/null and b/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/WorkspaceSettings.xcsettings b/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..659c8766e --- /dev/null +++ b/rAthena/rAthena.xcodeproj/project.xcworkspace/xcuserdata/hennet.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,10 @@ + + + + + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + SnapshotAutomaticallyBeforeSignificantChanges + + + diff --git a/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 000000000..05301bc25 --- /dev/null +++ b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/char-server_sql.xcscheme b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/char-server_sql.xcscheme new file mode 100644 index 000000000..6f134ccfb --- /dev/null +++ b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/char-server_sql.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/login-server_sql.xcscheme b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/login-server_sql.xcscheme new file mode 100644 index 000000000..01b1cc6be --- /dev/null +++ b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/login-server_sql.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/map-server_sql.xcscheme b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/map-server_sql.xcscheme new file mode 100644 index 000000000..416cfce2b --- /dev/null +++ b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/map-server_sql.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/xcschememanagement.plist b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..6bd664644 --- /dev/null +++ b/rAthena/rAthena.xcodeproj/xcuserdata/hennet.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,42 @@ + + + + + SchemeUserState + + char-server_sql.xcscheme + + orderHint + 2 + + login-server_sql.xcscheme + + orderHint + 0 + + map-server_sql.xcscheme + + orderHint + 1 + + + SuppressBuildableAutocreation + + 53C193CD157BFA830012D90B + + primary + + + 53C194A3157C03260012D90B + + primary + + + 53C19529157C044D0012D90B + + primary + + + + + diff --git a/sql-files/upgrades/upgrade_2013.02.06_21.38.sql b/sql-files/upgrades/upgrade_2013.02.06_21.38.sql new file mode 100644 index 000000000..d5c467097 --- /dev/null +++ b/sql-files/upgrades/upgrade_2013.02.06_21.38.sql @@ -0,0 +1 @@ +ALTER TABLE `char` ADD COLUMN `slotchange` SMALLINT(3) unsigned NOT NULL default '0'; \ No newline at end of file diff --git a/src/map/skill.c b/src/map/skill.c index cb15f0083..ba720da42 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13072,7 +13072,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id } break; case ST_RIDING: - if(!pc_isriding(sd) || !pc_isridingdragon(sd)) { + if(!pc_isriding(sd) && !pc_isridingdragon(sd)) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } -- cgit v1.2.3-70-g09d2 From 56a20bb18d6fde61bb82cf160a131eb54d464148 Mon Sep 17 00:00:00 2001 From: Mysteries Date: Sun, 10 Feb 2013 22:22:23 -0500 Subject: Merged rAthena Changes - Added checkidle() command that was present in rAthena since r17126 - Documented checkidle() function - More clearly defined variables in eA Job System documentation - Added missing 'stopnpctimer' in custom Cluckers script --- conf/battle/skill.conf | 6 +++--- doc/ea_job_system.txt | 30 +++++++++++++++++------------- doc/script_commands.txt | 9 ++++++++- npc/custom/events/cluckers.txt | 7 +++---- src/map/script.c | 18 ++++++++++++++++++ 5 files changed, 49 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index ecb2dd00a..622ce7877 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -277,6 +277,6 @@ invincible.nodamage: no dancing_weaponswitch_fix: yes // Skill Trap Type (GvG) -// 0: (official) traps in GvG only makes player unable to move after its walk path is complete, and it activates other traps on the way. -// 1: trap in GvG makes player stop moving right when stepping over it. -skill_trap_type: 0 +// 0: (official) Traps in GvG only make player stop moving after its walk path is complete, and it activates other traps on the way. +// 1: Traps in GvG make player stop moving right when stepping over it. +skill_trap_type: 0 \ No newline at end of file diff --git a/doc/ea_job_system.txt b/doc/ea_job_system.txt index e25f10689..034b4a617 100644 --- a/doc/ea_job_system.txt +++ b/doc/ea_job_system.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Skotlex //===== Current Version: ===================================== -//= 20120610 +//= 2013-02-10 //===== Description: ========================================= //= A reference description of eA's inner job system (for use //= in scripts through the eaclass and roclass script commands). @@ -19,7 +19,7 @@ Preface: The eA Job System: ------------------------------------------------------------------------------- - Since the code also required to do this kind of checks for various skills (The Soul Linker Spirit buffs specially come to mind), an alternate job ID system was developed, which attempts to make more sense and make it easier to check where a particular job stands in relation to the rest. + Since the code also required to do this kind of checks for various skills (the Soul Linker Spirit buffs specifically come to mind), an alternate job ID system was developed, which attempts to make more sense and make it easier to check where a particular job stands in relation to the rest. The scheme consists in that every job can be broken down by 3 criteria: @@ -84,53 +84,57 @@ If we had used addition, we would have gotten a completely different result. The EAJL (eA Job Level) constants ------------------------------------------------------------------------------- - There are a few constants which can be used to filter out and make job comparisons easier. + There are a few constants which can be used to filter out and make job comparisons easier. The comparisons involve eA job IDs, not classic job IDs, using the eaclass() command explained in the next section. + + set @eac, eaclass(); EAJL_2_1: Checks if the class is a 2-1 class: - if (@job&EAJL_2_1) + if (@eac&EAJL_2_1) mes "Using the classic 2-1 job, huh?"; EAJL_2_2: - Checks if the class is 2-2. + Checks if the class is a 2-2 class: + if (@eac&EAJL_2_2) + mes "Oh, a 2-2 job!"; EAJL_2: Checks if the class is a 2nd Class. If the check fails, you can be sure the character is a first class. - if (!(@job&EAJL_2)) + if (!(@eac&EAJL_2)) mes "Will you wait until Job 50 to change?"; EAJL_UPPER: Check if a class is Rebirth/Advanced: - if(@job&EAJL_UPPER) + if(@eac&EAJL_UPPER) mes "It must have taken you a LONG time..."; EAJL_BABY: Check if a class is an adopted class. - if (@job&EAJL_BABY) + if (@eac&EAJL_BABY) mes "Don't you hate being weak?"; EAJL_THIRD: Checks if a class is a third job. - if(@job&EAJL_THIRD) + if(@eac&EAJL_THIRD) mes "Wow, you've really grown!"; EAJ_UPPERMASK: The upper mask can be used to "strip" the upper/baby characteristics of a class, used when you want to know if someone is a certain class regardless of rebirth/adopted status. For example, the following code would go through for Monks, Champions and Baby Monks: - if ((@job&EAJ_UPPERMASK) == EAJ_MONK) + if ((@eac&EAJ_UPPERMASK) == EAJ_MONK) mes "Aren't knuckles such a cool weapon?"; Note that if instead of EAJ_MONK you used EAJ_CHAMPION or EAJ_BABY_MONK, the check would had never passed, since the upper/baby state has been removed from the original job when checking. EAJ_BASEMASK: This mask strips also the 2nd class attributes. It can be used to check against the basic job of a character. For example, the following code would go through for Merchants (+Baby Merchant and High Merchant), Blacksmiths (+Baby blacksmiths and Whitesmith) and Alchemist (+Baby Alchemist and +Creator): - if ((@job&EAJ_BASEMASK) == EAJ_MERCHANT) + if ((@eac&EAJ_BASEMASK) == EAJ_MERCHANT) mes "Why I can't have discount like you guys do?"; Note that, like before, if you try to check versus any of the other classes (High merchant, blacksmith, etc) instead of basic merchant, the check will always fail for the same reasons previously explained. EAJ_THIRDMASK: This mask strips 3rd class attributes. It will give the "normal" class of a third job, regardless of rebirth/adopted status. When used on non-third class characters, it will return the second job, or, if that also doesn't exist, the first. - if ((@job&EAJ_THIRDMASK) == EAJ_WARLOCK_T) + if ((@eac&EAJ_THIRDMASK) == EAJ_WARLOCK_T) mes "You've gone through rebirth, I see."; The script commands eaclass, roclass: @@ -189,5 +193,5 @@ About Novices and Super Novices: So as you can see, on this job system, the Super Novice is treated as the 2-1 job of a Novice, and the Novice job it's at the same level of the other 1st jobs. Even though that may seem like a hindrance, it makes it very easy to add a check to discard Novice types from a quest: - if ((@job&EAJ_BASEMASK) == EAJ_NOVICE) + if ((eaclass()&EAJ_BASEMASK) == EAJ_NOVICE) //Novice class detected. diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 3c93490bb..cd08e618c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3545,7 +3545,7 @@ warg and 0 if they don't. --------------------------------------- -*checkvending({""}) +*checkvending({""}) *checkchatting({""}) Checks if the player is vending or in a chatroom. @@ -3570,6 +3570,13 @@ Examples: --------------------------------------- +*checkidle({""}) + + Returns the time, in seconds, that the specified player has been idle. + Name is optional, and defaults to the attached player if omitted. + +--------------------------------------- + *agitcheck() *agitcheck2() diff --git a/npc/custom/events/cluckers.txt b/npc/custom/events/cluckers.txt index bc9899488..cf296cb18 100644 --- a/npc/custom/events/cluckers.txt +++ b/npc/custom/events/cluckers.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Cluck! Cluck! Boom! //===== By: ================================================== //= Keale //===== Current Version: ===================================== //= 1.2a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Click the chicken and try retrieve the item at a low //= chance. If you fail he will nuke, freeze, stone, @@ -108,8 +106,9 @@ OnTimer30000: end; OnTimer40000: announce "GO! Click the chicken to get the prize!",bc_blue; + stopnpctimer; if (!$cluck_item_id) set $cluck_item_id,512; if (!$cluck_item_amount) set $cluck_item_amount,1; set .startcluck,1; end; -} +} \ No newline at end of file diff --git a/src/map/script.c b/src/map/script.c index a6d588113..b89121ee4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -14968,6 +14968,23 @@ BUILDIN_FUNC(checkchatting) // check chatting [Marka] return 0; } +BUILDIN_FUNC(checkidle) +{ + TBL_PC *sd = NULL; + + if (script_hasdata(st, 2)) + sd = map_nick2sd(script_getstr(st, 2)); + else + sd = script_rid2sd(st); + + if (sd) + script_pushint(st, DIFF_TICK(last_tick, sd->idletime)); + else + script_pushint(st, 0); + + return 0; +} + BUILDIN_FUNC(searchitem) { struct script_data* data = script_getdata(st, 2); @@ -17689,6 +17706,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(roclass,"i?"), //[Skotlex] BUILDIN_DEF(checkvending,"?"), BUILDIN_DEF(checkchatting,"?"), + BUILDIN_DEF(checkidle,"?"), BUILDIN_DEF(openmail,""), BUILDIN_DEF(openauction,""), BUILDIN_DEF(checkcell,"siii"), -- cgit v1.2.3-70-g09d2 From 16859820551f61bf26a99139fd6e4fd9425f1154 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 12 Feb 2013 02:18:17 -0200 Subject: Updating Packetver to April 18th not that it actually changes something yet, but Jman needs a new commit to test Hercules IRC Bot. Signed-off-by: shennetsind --- src/common/mmo.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/mmo.h b/src/common/mmo.h index 493f87691..2ef9789f2 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -46,8 +46,7 @@ // 20120307 - 2012-03-07aRagexeRE+ - 0x970 #ifndef PACKETVER - #define PACKETVER 20120410 - //#define PACKETVER 20111116 + #define PACKETVER 20120418 #endif //Remove/Comment this line to disable sc_data saving. [Skotlex] -- cgit v1.2.3-70-g09d2 From 810ba40b78087cc6aa7eb9ad3a3e46534393b9e8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 17:04:42 -0200 Subject: Introducing MySQL DB Update Checker First version. Signed-off-by: shennetsind --- sql-files/main.sql | 10 ++++++ sql-files/upgrades/index.txt | 0 sql-files/upgrades/upgrade_svn15003.sql | 1 - sql-files/upgrades/upgrade_svn15420_log.sql | 3 -- sql-files/upgrades/upgrade_svn15519_log.sql | 3 -- sql-files/upgrades/upgrade_svn15531_db.sql | 4 --- sql-files/upgrades/upgrade_svn15572.sql | 3 -- sql-files/upgrades/upgrade_svn15818_log.sql | 3 -- sql-files/upgrades/upgrade_svn15885.sql | 24 --------------- sql-files/upgrades/upgrade_svn15926_log.sql | 3 -- sql-files/upgrades/upgrade_svn16490.sql | 1 - sql-files/upgrades/upgrade_svn16518.sql | 1 - sql-files/upgrades/upgrade_svn16639.sql | 1 - sql-files/upgrades/upgrade_svn16645.sql | 2 -- sql-files/upgrades/upgrade_svn16663.sql | 1 - sql-files/upgrades/upgrade_svn16823.sql | 2 -- sql-files/upgrades/upgrade_svn16914.sql | 1 - sql-files/upgrades/upgrade_svn17014.sql | 9 ------ sql-files/upgrades/upgrade_svn17080.sql | 16 ---------- sql-files/upgrades/upgrade_svn17086.sql | 11 ------- src/char/char.c | 1 + src/common/sql.c | 47 +++++++++++++++++++++++++++++ src/common/sql.h | 2 +- src/login/account.h | 1 + src/login/account_sql.c | 4 +++ src/login/login.c | 4 ++- src/map/map.c | 2 ++ 27 files changed, 69 insertions(+), 91 deletions(-) create mode 100644 sql-files/upgrades/index.txt delete mode 100644 sql-files/upgrades/upgrade_svn15003.sql delete mode 100644 sql-files/upgrades/upgrade_svn15420_log.sql delete mode 100644 sql-files/upgrades/upgrade_svn15519_log.sql delete mode 100644 sql-files/upgrades/upgrade_svn15531_db.sql delete mode 100644 sql-files/upgrades/upgrade_svn15572.sql delete mode 100644 sql-files/upgrades/upgrade_svn15818_log.sql delete mode 100644 sql-files/upgrades/upgrade_svn15885.sql delete mode 100644 sql-files/upgrades/upgrade_svn15926_log.sql delete mode 100644 sql-files/upgrades/upgrade_svn16490.sql delete mode 100644 sql-files/upgrades/upgrade_svn16518.sql delete mode 100644 sql-files/upgrades/upgrade_svn16639.sql delete mode 100644 sql-files/upgrades/upgrade_svn16645.sql delete mode 100644 sql-files/upgrades/upgrade_svn16663.sql delete mode 100644 sql-files/upgrades/upgrade_svn16823.sql delete mode 100644 sql-files/upgrades/upgrade_svn16914.sql delete mode 100644 sql-files/upgrades/upgrade_svn17014.sql delete mode 100644 sql-files/upgrades/upgrade_svn17080.sql delete mode 100644 sql-files/upgrades/upgrade_svn17086.sql (limited to 'src') diff --git a/sql-files/main.sql b/sql-files/main.sql index e69279710..d772cec98 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -632,6 +632,16 @@ CREATE TABLE IF NOT EXISTS `skill_homunculus` ( PRIMARY KEY (`homun_id`,`id`) ) ENGINE=MyISAM; +-- +-- Table structure for table `sql_updates` +-- + +CREATE TABLE IF NOT EXISTS `sql_updates` ( + `timestamp` int(11) unsigned NOT NULL, + `ignored` enum('Yes','No') NOT NULL DEFAULT 'No' +) ENGINE=MyISAM; + + -- -- Table structure for table `sstatus` -- diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt new file mode 100644 index 000000000..e69de29bb diff --git a/sql-files/upgrades/upgrade_svn15003.sql b/sql-files/upgrades/upgrade_svn15003.sql deleted file mode 100644 index e30a3b0fd..000000000 --- a/sql-files/upgrades/upgrade_svn15003.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `global_reg_value` MODIFY `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '3'; diff --git a/sql-files/upgrades/upgrade_svn15420_log.sql b/sql-files/upgrades/upgrade_svn15420_log.sql deleted file mode 100644 index 580dce9a2..000000000 --- a/sql-files/upgrades/upgrade_svn15420_log.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Adds 'I' and 'X' to `type` in `picklog` table - -ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X') NOT NULL DEFAULT 'P'; diff --git a/sql-files/upgrades/upgrade_svn15519_log.sql b/sql-files/upgrades/upgrade_svn15519_log.sql deleted file mode 100644 index 623b022b8..000000000 --- a/sql-files/upgrades/upgrade_svn15519_log.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Adds 'D' and 'U' to `type` in `picklog` table - -ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL DEFAULT 'P'; diff --git a/sql-files/upgrades/upgrade_svn15531_db.sql b/sql-files/upgrades/upgrade_svn15531_db.sql deleted file mode 100644 index ce0e56302..000000000 --- a/sql-files/upgrades/upgrade_svn15531_db.sql +++ /dev/null @@ -1,4 +0,0 @@ --- `ExpPer` column removed from `mob_db` and `mob_db2` tables - -ALTER TABLE `mob_db` DROP COLUMN `ExpPer`; -ALTER TABLE `mob_db2` DROP COLUMN `ExpPer`; diff --git a/sql-files/upgrades/upgrade_svn15572.sql b/sql-files/upgrades/upgrade_svn15572.sql deleted file mode 100644 index 821bb79d6..000000000 --- a/sql-files/upgrades/upgrade_svn15572.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Rename `level` column to `group_id` in `login` table - -ALTER TABLE `login` CHANGE COLUMN `level` `group_id` TINYINT(3) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/sql-files/upgrades/upgrade_svn15818_log.sql b/sql-files/upgrades/upgrade_svn15818_log.sql deleted file mode 100644 index b61f71f53..000000000 --- a/sql-files/upgrades/upgrade_svn15818_log.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Adds 'I' to `type` in `zenylog` - -ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I') NOT NULL DEFAULT 'S'; diff --git a/sql-files/upgrades/upgrade_svn15885.sql b/sql-files/upgrades/upgrade_svn15885.sql deleted file mode 100644 index 48b25b5a7..000000000 --- a/sql-files/upgrades/upgrade_svn15885.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE `char` ADD COLUMN `elemental_id` int(11) unsigned NOT NULL default '0'; - --- --- Table structure for table `elemental` --- - -CREATE TABLE IF NOT EXISTS `elemental` ( - `ele_id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) NOT NULL, - `class` mediumint(9) unsigned NOT NULL default '0', - `mode` int(11) unsigned NOT NULL default '1', - `hp` int(12) NOT NULL default '1', - `sp` int(12) NOT NULL default '1', - `max_hp` mediumint(8) unsigned NOT NULL default '0', - `max_sp` mediumint(6) unsigned NOT NULL default '0', - `str` smallint(4) unsigned NOT NULL default '0', - `agi` smallint(4) unsigned NOT NULL default '0', - `vit` smallint(4) unsigned NOT NULL default '0', - `int` smallint(4) unsigned NOT NULL default '0', - `dex` smallint(4) unsigned NOT NULL default '0', - `luk` smallint(4) unsigned NOT NULL default '0', - `life_time` int(11) NOT NULL default '0', - PRIMARY KEY (`ele_id`) -) ENGINE=MyISAM; diff --git a/sql-files/upgrades/upgrade_svn15926_log.sql b/sql-files/upgrades/upgrade_svn15926_log.sql deleted file mode 100644 index 099ee6faa..000000000 --- a/sql-files/upgrades/upgrade_svn15926_log.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Adds 'D' to `type` in `zenylog` - -ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I','D') NOT NULL DEFAULT 'S'; diff --git a/sql-files/upgrades/upgrade_svn16490.sql b/sql-files/upgrades/upgrade_svn16490.sql deleted file mode 100644 index b38445c46..000000000 --- a/sql-files/upgrades/upgrade_svn16490.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `char` ADD CONSTRAINT `name_key` UNIQUE (`name`); diff --git a/sql-files/upgrades/upgrade_svn16518.sql b/sql-files/upgrades/upgrade_svn16518.sql deleted file mode 100644 index 1c142c65f..000000000 --- a/sql-files/upgrades/upgrade_svn16518.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `inventory` ADD COLUMN `favorite` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time`; diff --git a/sql-files/upgrades/upgrade_svn16639.sql b/sql-files/upgrades/upgrade_svn16639.sql deleted file mode 100644 index 0da4b91d1..000000000 --- a/sql-files/upgrades/upgrade_svn16639.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `item_db_re` CHANGE `equip_level` `equip_level` VARCHAR(10) DEFAULT ''; diff --git a/sql-files/upgrades/upgrade_svn16645.sql b/sql-files/upgrades/upgrade_svn16645.sql deleted file mode 100644 index 9a3237ad8..000000000 --- a/sql-files/upgrades/upgrade_svn16645.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `item_db_re` MODIFY COLUMN `atk:matk` VARCHAR(11) DEFAULT ''; -ALTER TABLE `item_db_re` MODIFY COLUMN `defence` SMALLINT(5) UNSIGNED DEFAULT NULL; \ No newline at end of file diff --git a/sql-files/upgrades/upgrade_svn16663.sql b/sql-files/upgrades/upgrade_svn16663.sql deleted file mode 100644 index 8883a108b..000000000 --- a/sql-files/upgrades/upgrade_svn16663.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `homunculus` ADD `prev_class` MEDIUMINT( 9 ) NOT NULL AFTER `class` diff --git a/sql-files/upgrades/upgrade_svn16823.sql b/sql-files/upgrades/upgrade_svn16823.sql deleted file mode 100644 index f4b211912..000000000 --- a/sql-files/upgrades/upgrade_svn16823.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `item_db_re` MODIFY `defence` SMALLINT(5) DEFAULT NULL; -ALTER TABLE `item_db` MODIFY `defence` SMALLINT(5) DEFAULT NULL; diff --git a/sql-files/upgrades/upgrade_svn16914.sql b/sql-files/upgrades/upgrade_svn16914.sql deleted file mode 100644 index 2352077ac..000000000 --- a/sql-files/upgrades/upgrade_svn16914.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `zenylog` MODIFY `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B') NOT NULL DEFAULT 'S'; diff --git a/sql-files/upgrades/upgrade_svn17014.sql b/sql-files/upgrades/upgrade_svn17014.sql deleted file mode 100644 index 68a279aa7..000000000 --- a/sql-files/upgrades/upgrade_svn17014.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `elemental` CHANGE COLUMN `str` `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `agi` `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `vit` `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `int` `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `dex` `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `luk` `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `life_time` `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - ADD COLUMN `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0 AFTER `flee`, - ADD COLUMN `life_time` INT(11) NOT NULL DEFAULT 0 AFTER `hit`; \ No newline at end of file diff --git a/sql-files/upgrades/upgrade_svn17080.sql b/sql-files/upgrades/upgrade_svn17080.sql deleted file mode 100644 index cfbe5dfe0..000000000 --- a/sql-files/upgrades/upgrade_svn17080.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE IF NOT EXISTS `interreg` ( - `varname` varchar(11) NOT NULL, - `value` varchar(20) NOT NULL, - PRIMARY KEY (`varname`) -) ENGINE=InnoDB; -INSERT INTO `interreg` (`varname`, `value`) VALUES -('nsiuid', '0'); - -ALTER TABLE `auction` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; -ALTER TABLE `cart_inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; -ALTER TABLE `guild_storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; -ALTER TABLE `inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; -ALTER TABLE `mail` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; -ALTER TABLE `storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `picklog` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0' AFTER `card3`; diff --git a/sql-files/upgrades/upgrade_svn17086.sql b/sql-files/upgrades/upgrade_svn17086.sql deleted file mode 100644 index 3ba53e9ba..000000000 --- a/sql-files/upgrades/upgrade_svn17086.sql +++ /dev/null @@ -1,11 +0,0 @@ -UPDATE `interreg` SET `varname` = 'unique_id' WHERE `interreg`.`varname` = 'nsiuid'; - - -ALTER TABLE `auction` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `cart_inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `guild_storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `mail` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `picklog` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/src/char/char.c b/src/char/char.c index 1b5c7898d..f3f93ab01 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -4820,6 +4820,7 @@ int do_init(int argc, char **argv) char_fd = make_listen_bind(bind_ip, char_port); ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); + Sql_HerculesUpdateCheck(sql_handle); if( runflag != CORE_ST_STOP ) { shutdown_callback = do_shutdown; diff --git a/src/common/sql.c b/src/common/sql.c index b842db46d..fdb6e0114 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1016,6 +1016,53 @@ void Sql_inter_server_read(const char* cfgName, bool first) { return; } +void Sql_HerculesUpdateCheck(Sql* self) { + char line[22];// "yyyy-mm-dd--hh-mm" (17) + ".sql" (4) + 1 + FILE* ifp;/* index fp */ + unsigned int performed = 0; + + if( !( ifp = fopen("sql-files/upgrades/index.txt", "r") ) ) { + ShowError("SQL upgrade index was not found!\n"); + return; + } + + while(fgets(line, sizeof(line), ifp)) { + char path[41];// "sql-files/upgrades/" (19) + "yyyy-mm-dd--hh-mm" (17) + ".sql" (4) + 1 + char timestamp[11];// "1360186680" (10) + 1 + FILE* ufp;/* upgrade fp */ + + sprintf(path,"sql-files/upgrades/%s",line); + + if( !( ufp = fopen(path, "r") ) ) { + ShowError("SQL upgrade file %s was not found!\n",path); + continue; + } + + if( fgetc(ufp) != '#' ) + continue; + + fseek (ufp,1,SEEK_SET);/* woo. skip the # */ + + if( fgets(timestamp,sizeof(timestamp),ufp) ) { + unsigned int timestampui = atol(timestamp); + if( SQL_ERROR == Sql_Query(self, "SELECT 1 FROM `sql_updates` WHERE `timestamp` = '%u' LIMIT 1", timestampui) ) + Sql_ShowDebug(self); + if( Sql_NumRows(self) != 1 ) { + ShowSQL("'"CL_WHITE"%s"CL_RESET"' wasn't applied to the database\n",path); + performed++; + } + } + + fclose(ufp); + } + + fclose(ifp); + + if( performed ) { + ShowSQL("If you did apply these updates or would like to be skip, insert a new entry in your sql_updates table with the timestamp of each file\n"); + } +} + void Sql_Init(void) { Sql_inter_server_read("conf/inter-server.conf",true); } diff --git a/src/common/sql.h b/src/common/sql.h index b7159ec90..ebbd1711f 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -325,7 +325,7 @@ int SqlStmt_NextRow(SqlStmt* self); /// Frees the result of the statement execution. void SqlStmt_FreeResult(SqlStmt* self); - +void Sql_HerculesUpdateCheck(Sql* self); #if defined(SQL_REMOVE_SHOWDEBUG) #define SqlStmt_ShowDebug(self) (void)0 diff --git a/src/login/account.h b/src/login/account.h index 1b567be70..adbcb7102 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -152,5 +152,6 @@ struct AccountDB AccountDBIterator* (*iterator)(AccountDB* self); }; +void account_db_sql_up(AccountDB* self); #endif // __ACCOUNT_H_INCLUDED__ diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 5073941e2..ae80163af 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -678,3 +678,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo return result; } +void account_db_sql_up(AccountDB* self) { + AccountDB_SQL* db = (AccountDB_SQL*)self; + Sql_HerculesUpdateCheck(db->accounts); +} \ No newline at end of file diff --git a/src/login/login.c b/src/login/login.c index 7f272e2a4..c7e250040 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1879,6 +1879,8 @@ int do_init(int argc, char** argv) ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port); login_log(0, "login server", 100, "login server started"); - + + account_db_sql_up(accounts); + return 0; } diff --git a/src/map/map.c b/src/map/map.c index 6f9401dad..a42d7abca 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3939,6 +3939,8 @@ int do_init(int argc, char *argv[]) ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port); + Sql_HerculesUpdateCheck(mmysql_handle); + if( runflag != CORE_ST_STOP ) { shutdown_callback = do_shutdown; -- cgit v1.2.3-70-g09d2 From 2bc85620e0b91aaaa29f929e618d5f6d6623b4f0 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 17:18:11 -0200 Subject: Fixed Bug #5018 Skills granted through scripts are now permanent, until this date they were not relog persistent Signed-off-by: shennetsind --- sql-files/main.sql | 3 +++ sql-files/upgrades/2013-02-14--16-15.sql | 7 +++++++ sql-files/upgrades/index.txt | 1 + src/char/char.c | 26 +++++++++++++++----------- src/map/pc.c | 17 ++++++++++------- 5 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 sql-files/upgrades/2013-02-14--16-15.sql (limited to 'src') diff --git a/sql-files/main.sql b/sql-files/main.sql index d772cec98..fbdf40dde 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -618,6 +618,7 @@ CREATE TABLE IF NOT EXISTS `skill` ( `char_id` int(11) unsigned NOT NULL default '0', `id` smallint(11) unsigned NOT NULL default '0', `lv` tinyint(4) unsigned NOT NULL default '0', + `flag` TINYINT(1) UNSIGNED NOT NULL default 0, PRIMARY KEY (`char_id`,`id`) ) ENGINE=MyISAM; @@ -641,6 +642,8 @@ CREATE TABLE IF NOT EXISTS `sql_updates` ( `ignored` enum('Yes','No') NOT NULL DEFAULT 'No' ) ENGINE=MyISAM; +-- Existent updates to enter +INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500); -- -- Table structure for table `sstatus` diff --git a/sql-files/upgrades/2013-02-14--16-15.sql b/sql-files/upgrades/2013-02-14--16-15.sql new file mode 100644 index 000000000..9afd034b1 --- /dev/null +++ b/sql-files/upgrades/2013-02-14--16-15.sql @@ -0,0 +1,7 @@ +#1360858500 +CREATE TABLE IF NOT EXISTS `sql_updates` ( + `timestamp` int(11) unsigned NOT NULL, + `ignored` enum('Yes','No') NOT NULL DEFAULT 'No' +) ENGINE=MyISAM; +ALTER TABLE `skill` ADD COLUMN `flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500); \ No newline at end of file diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index e69de29bb..e0c49cbce 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -0,0 +1 @@ +2013-02-14--16-15.sql \ No newline at end of file diff --git a/src/char/char.c b/src/char/char.c index f3f93ab01..8be0134ba 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -595,19 +595,20 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus* p) } StringBuf_Clear(&buf); - StringBuf_Printf(&buf, "INSERT INTO `%s`(`char_id`,`id`,`lv`) VALUES ", skill_db); + StringBuf_Printf(&buf, "INSERT INTO `%s`(`char_id`,`id`,`lv`,`flag`) VALUES ", skill_db); //insert here. - for( i = 0, count = 0; i < MAX_SKILL; ++i ) - { - if( p->skill[i].id != 0 && p->skill[i].flag != SKILL_FLAG_TEMPORARY ) - { - if( p->skill[i].flag == SKILL_FLAG_PERMANENT && p->skill[i].lv == 0 ) + for( i = 0, count = 0; i < MAX_SKILL; ++i ) { + if( p->skill[i].id != 0 && p->skill[i].flag != SKILL_FLAG_TEMPORARY ) { + + if( p->skill[i].lv == 0 && ( p->skill[i].flag == SKILL_FLAG_PERM_GRANTED || p->skill[i].flag == SKILL_FLAG_PERMANENT ) ) continue; - if( p->skill[i].flag != SKILL_FLAG_PERMANENT && (p->skill[i].flag - SKILL_FLAG_REPLACED_LV_0) == 0 ) + if( p->skill[i].flag != SKILL_FLAG_PERMANENT && p->skill[i].flag != SKILL_FLAG_PERM_GRANTED && (p->skill[i].flag - SKILL_FLAG_REPLACED_LV_0) == 0 ) continue; if( count ) StringBuf_AppendStr(&buf, ","); - StringBuf_Printf(&buf, "('%d','%d','%d')", char_id, p->skill[i].id, (p->skill[i].flag == SKILL_FLAG_PERMANENT ? p->skill[i].lv : p->skill[i].flag - SKILL_FLAG_REPLACED_LV_0)); + StringBuf_Printf(&buf, "('%d','%d','%d','%d')", char_id, p->skill[i].id, + ( (p->skill[i].flag == SKILL_FLAG_PERMANENT || p->skill[i].flag == SKILL_FLAG_PERM_GRANTED) ? p->skill[i].lv : p->skill[i].flag - SKILL_FLAG_REPLACED_LV_0), + p->skill[i].flag == SKILL_FLAG_PERM_GRANTED ? p->skill[i].flag : 0);/* other flags do not need to be saved */ ++count; } } @@ -1274,13 +1275,16 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything //read skill //`skill` (`char_id`, `id`, `lv`) - if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `id`, `lv` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL) + if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_USHORT, &tmp_skill.id, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 1, SQLDT_USHORT, &tmp_skill.lv, 0, NULL, NULL) ) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 1, SQLDT_USHORT, &tmp_skill.lv, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 2, SQLDT_USHORT, &tmp_skill.flag, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); - tmp_skill.flag = SKILL_FLAG_PERMANENT; + + if( tmp_skill.flag != SKILL_FLAG_PERM_GRANTED ) + tmp_skill.flag = SKILL_FLAG_PERMANENT; for( i = 0; i < MAX_SKILL && SQL_SUCCESS == SqlStmt_NextRow(stmt); ++i ) { diff --git a/src/map/pc.c b/src/map/pc.c index 0dd210394..1bc37040e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1253,7 +1253,7 @@ static int pc_calc_skillpoint(struct map_session_data* sd) if(sd->status.skill[i].flag == SKILL_FLAG_PERMANENT) skill_point += skill; else - if(sd->status.skill[i].flag >= SKILL_FLAG_REPLACED_LV_0) + if(sd->status.skill[i].flag == SKILL_FLAG_REPLACED_LV_0) skill_point += (sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0); } } @@ -1283,13 +1283,13 @@ int pc_calc_skilltree(struct map_session_data *sd) for( i = 0; i < MAX_SKILL; i++ ) { - if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) //Don't touch plagiarized skills + if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these sd->status.skill[i].id = 0; //First clear skills. } for( i = 0; i < MAX_SKILL; i++ ) { - if( sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) + if( sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) { // Restore original level of skills after deleting earned skills. sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; sd->status.skill[i].flag = SKILL_FLAG_PERMANENT; @@ -1509,7 +1509,7 @@ int pc_clean_skilltree(struct map_session_data *sd) sd->status.skill[i].flag = 0; } else - if (sd->status.skill[i].flag >= SKILL_FLAG_REPLACED_LV_0){ + if (sd->status.skill[i].flag == SKILL_FLAG_REPLACED_LV_0){ sd->status.skill[i].lv = sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; sd->status.skill[i].flag = 0; } @@ -3442,7 +3442,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag) case 0: //Set skill data overwriting whatever was there before. sd->status.skill[id].id = id; sd->status.skill[id].lv = level; - sd->status.skill[id].flag = SKILL_FLAG_PERMANENT; + sd->status.skill[id].flag = SKILL_FLAG_PERM_GRANTED; if( level == 0 ) //Remove skill. { sd->status.skill[id].id = 0; @@ -6056,7 +6056,7 @@ int pc_allskillup(struct map_session_data *sd) nullpo_ret(sd); for(i=0;istatus.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED) { + if (sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED) { sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; sd->status.skill[i].flag = SKILL_FLAG_PERMANENT; if (sd->status.skill[i].lv == 0) @@ -6329,6 +6329,9 @@ int pc_resetskill(struct map_session_data* sd, int flag) if( i == NV_BASIC && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE ) continue; + if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED ) + continue; + if( flag&4 && !skill_ischangesex(i) ) continue; @@ -6344,7 +6347,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) if( sd->status.skill[i].flag == SKILL_FLAG_PERMANENT ) skill_point += lv; else - if( sd->status.skill[i].flag >= SKILL_FLAG_REPLACED_LV_0 ) + if( sd->status.skill[i].flag == SKILL_FLAG_REPLACED_LV_0 ) skill_point += (sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0); if( !(flag&2) ) -- cgit v1.2.3-70-g09d2 From 49831814d6a462104e5a4b61bdff405a3bb69fb1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 17:22:50 -0200 Subject: Updating equip[] for script.c functions Script commands relying on equipment slot may now access the 3 following types EQI_COSTUME_HEAD_LOW (11) EQI_COSTUME_HEAD_MID (12) EQI_COSTUME_HEAD_TOP (13) e.g. getequipid(13) returns the item id of the equipped costume head top (if any) Signed-off-by: shennetsind --- src/map/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index b89121ee4..83b6c1a68 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7347,7 +7347,7 @@ BUILDIN_FUNC(strnpcinfo) // aegis->athena slot position conversion table -static unsigned int equip[] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW}; +static unsigned int equip[] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_TOP}; /*========================================== * GetEquipID(Pos); Pos: 1-10 -- cgit v1.2.3-70-g09d2 From 82005a99f5b1cca68e9fb1ac6b1614c815e4bd45 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 19:13:14 -0200 Subject: Introducing Git Hash Added 'Git Hash' way to identify where you last updated your working copy (it won't detect your local changes' hash -- intended). Also Implemented HERC_UNKNOWN_VER, a simple way to detect whether get_svn_revision or get_git_hash failed to detect (before you'd need to strncmp for "unknown" or similars) Signed-off-by: shennetsind --- src/common/core.c | 40 ++++++++++++++++++++++++++++++++++++---- src/common/core.h | 5 ++++- src/map/pc.c | 11 +++++++++-- src/map/script.c | 6 +++--- 4 files changed, 52 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/common/core.c b/src/common/core.c index 42cdfa7cd..d1a374b29 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -254,17 +254,46 @@ const char* get_svn_revision(void) } // fallback - snprintf(svn_version_buffer, sizeof(svn_version_buffer), "Unknown"); + svn_version_buffer[0] = HERC_UNKNOWN_VER; return svn_version_buffer; } #endif - +/* whats our origin */ +#define GIT_ORIGIN "master" +/* Grabs the hash from the last time the user updated his working copy (last pull) */ +const char *get_git_hash (void) { + static char HerculesGitHash[41] = "";//Sha(40) + 1 + FILE *fp; + + if( HerculesGitHash[0] != '\0' ) + return HerculesGitHash; + + if ( (fp = fopen (".git/refs/remotes/origin/"GIT_ORIGIN, "r")) != NULL) { + char line[64]; + char *rev = malloc (sizeof (char) * 50); + + if (fgets (line, sizeof (line), fp) && sscanf (line, "%s", rev)) + snprintf (HerculesGitHash, sizeof (HerculesGitHash), "%s", rev); + + free (rev); + fclose (fp); + } else { + HerculesGitHash[0] = HERC_UNKNOWN_VER; + } + + if (! (*HerculesGitHash)) { + HerculesGitHash[0] = HERC_UNKNOWN_VER; + } + + return HerculesGitHash; +} /*====================================== * CORE : Display title * ASCII By CalciumKid 1/12/2011 *--------------------------------------*/ static void display_title(void) { - //ClearScreen(); // clear screen and go up/left (0, 0 position in text) + const char* svn = get_svn_revision(); + const char* git = get_git_hash(); ShowMessage("\n"); ShowMessage(""CL_BG_RED" "CL_BT_WHITE" "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); @@ -279,7 +308,10 @@ static void display_title(void) { ShowMessage(""CL_BG_RED" "CL_BT_WHITE" http://hercules.ws/board/ "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); ShowMessage(""CL_BG_RED" "CL_BT_WHITE" "CL_BG_RED""CL_CLL""CL_NORMAL"\n"); - //ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision()); + if( git[0] != HERC_UNKNOWN_VER ) + ShowInfo("Git Hash: '"CL_WHITE"%s"CL_RESET"'\n", git); + else if( svn[0] != HERC_UNKNOWN_VER ) + ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'\n", svn); } // Warning if executed as superuser (root) diff --git a/src/common/core.h b/src/common/core.h index f619d821f..8007e6036 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -16,6 +16,8 @@ extern char **arg_v; extern int buildbotflag; #endif +#define HERC_UNKNOWN_VER '\x02' + /// @see E_CORE_ST extern int runflag; extern char *SERVER_NAME; @@ -31,7 +33,8 @@ enum { extern char SERVER_TYPE; extern int parse_console(const char* buf); -extern const char *get_svn_revision(void); +const char *get_svn_revision(void); +const char *get_git_hash (void); extern int do_init(int,char**); extern void set_server_type(void); extern void do_abort(void); diff --git a/src/map/pc.c b/src/map/pc.c index 1bc37040e..e544fdd53 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1058,9 +1058,16 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim if( !changing_mapservers ) { - if (battle_config.display_version == 1){ + if (battle_config.display_version == 1) { + const char* svn = get_svn_revision(); + const char* git = get_git_hash(); char buf[256]; - sprintf(buf, "SVN version: %s", get_svn_revision()); + if( git[0] != HERC_UNKNOWN_VER ) + sprintf(buf,"Git Hash: %s", git); + else if( svn[0] != HERC_UNKNOWN_VER ) + sprintf(buf,"SVN Revision: %s", svn); + else + sprintf(buf,"Unknown Version"); clif_displaymessage(sd->fd, buf); } diff --git a/src/map/script.c b/src/map/script.c index 83b6c1a68..fe00599a6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16992,10 +16992,10 @@ BUILDIN_FUNC(is_function) { * get_revision() -> retrieves the current svn revision (if available) **/ BUILDIN_FUNC(get_revision) { - const char * revision; + const char *svn = get_svn_revision(); - if ( (revision = get_svn_revision()) != 0 ) - script_pushint(st,atoi(revision)); + if ( svn[0] != HERC_UNKNOWN_VER ) + script_pushint(st,atoi(svn)); else script_pushint(st,-1);//unknown -- cgit v1.2.3-70-g09d2 From 7d33212f95653edd621961487f5622611d62ae88 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 21:12:18 -0200 Subject: New Mapflag adjust_unit_duration Made as a improvement of the original ADJUST_TRAP_DURATION -- special thanks to Muad_Dib! . This mapflag allows you to control the duration of unit skills in any map, for example. "prontera mapflag adjust_unit_duration PR_SANCTUARY 50" halves the duration of sanctuary in prontera Another Example: "prontera mapflag adjust_unit_duration WZ_QUAGMIRE 250" Increases duration of quagmire by 2.5 times in prontera map. Be aware that some skill units have their visual effect durations not controlled by the server (e.g. storm gust). Signed-off-by: shennetsind --- src/map/map.c | 61 +++-- src/map/map.h | 8 + src/map/npc.c | 21 +- src/map/skill.c | 687 ++++++++++++++++++++++++++++---------------------------- 4 files changed, 417 insertions(+), 360 deletions(-) (limited to 'src') diff --git a/src/map/map.c b/src/map/map.c index a42d7abca..1ffffdf59 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2894,13 +2894,41 @@ int map_delmap(char* mapname) return 0; } +void map_data_clean(void) { + int i; + + for( i = 0; i < map_num; i++ ) { + + if(map[i].cell) aFree(map[i].cell); + if(map[i].block) aFree(map[i].block); + if(map[i].block_mob) aFree(map[i].block_mob); + + if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random] + int j; + if(map[i].mob_delete_timer != INVALID_TIMER) + delete_timer(map[i].mob_delete_timer, map_removemobs_timer); + for (j=0; jdestroy(map_db, map_db_final); - for (i=0; i USHRT_MAX ) { + ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", atoi(mod), w4, map[m].name, filepath, strline(buffer,start-buffer)); + } else { + int idx = map[m].unit_count; + RECREATE(map[m].units, struct adjust_unit_duration*, ++map[m].unit_count); + CREATE(map[m].units[idx],struct adjust_unit_duration,1); + map[m].units[idx]->skill_id = skill_id; + map[m].units[idx]->modifier = (unsigned short)atoi(mod); + } + } else ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// continue diff --git a/src/map/skill.c b/src/map/skill.c index ba720da42..b37d28e3c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10570,308 +10570,316 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill unit_flag = skill_get_unit_flag(skill_id); layout = skill_get_unit_layout(skill_id,skill_lv,src,x,y); + if( map[src->m].unit_count ) { + ARR_FIND(0, map[src->m].unit_count, i, map[src->m].units[i]->skill_id == skill_id ); + + if( i < map[src->m].unit_count ) { + limit = limit * map[src->m].units[i]->modifier / 100; + } + } + sd = BL_CAST(BL_PC, src); status = status_get_status_data(src); sc = status_get_sc(src); // for traps, firewall and fogwall - celest switch( skill_id ) { - case MH_STEINWAND: - val2 = 4 + skill_lv; //nb of attack blocked - break; - case MG_SAFETYWALL: - #ifdef RENEWAL - /** - * According to data provided in RE, SW life is equal to 3 times caster's health - **/ - val2 = status_get_max_hp(src) * 3; - #else - val2 = skill_lv+1; - #endif - break; - case MG_FIREWALL: - if(sc && sc->data[SC_VIOLENTGALE]) - limit = limit*3/2; - val2=4+skill_lv; - break; + case MH_STEINWAND: + val2 = 4 + skill_lv; //nb of attack blocked + break; + case MG_SAFETYWALL: + #ifdef RENEWAL + /** + * According to data provided in RE, SW life is equal to 3 times caster's health + **/ + val2 = status_get_max_hp(src) * 3; + #else + val2 = skill_lv+1; + #endif + break; + case MG_FIREWALL: + if(sc && sc->data[SC_VIOLENTGALE]) + limit = limit*3/2; + val2=4+skill_lv; + break; - case AL_WARP: - val1=skill_lv+6; - if(!(flag&1)) - limit=2000; - else // previous implementation (not used anymore) - { //Warp Portal morphing to active mode, extract relevant data from src. [Skotlex] - if( src->type != BL_SKILL ) return NULL; - group = ((TBL_SKILL*)src)->group; - src = map_id2bl(group->src_id); - if( !src ) return NULL; - val2 = group->val2; //Copy the (x,y) position you warp to - val3 = group->val3; //as well as the mapindex to warp to. - } - break; - case HP_BASILICA: - val1 = src->id; // Store caster id. - break; + case AL_WARP: + val1=skill_lv+6; + if(!(flag&1)) + limit=2000; + else // previous implementation (not used anymore) + { //Warp Portal morphing to active mode, extract relevant data from src. [Skotlex] + if( src->type != BL_SKILL ) return NULL; + group = ((TBL_SKILL*)src)->group; + src = map_id2bl(group->src_id); + if( !src ) return NULL; + val2 = group->val2; //Copy the (x,y) position you warp to + val3 = group->val3; //as well as the mapindex to warp to. + } + break; + case HP_BASILICA: + val1 = src->id; // Store caster id. + break; - case PR_SANCTUARY: - case NPC_EVILLAND: - val1=(skill_lv+3)*2; - break; + case PR_SANCTUARY: + case NPC_EVILLAND: + val1=(skill_lv+3)*2; + break; - case WZ_FIREPILLAR: - if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) - return NULL; - if((flag&1)!=0) - limit=1000; - val1=skill_lv+2; - break; - case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex] - case AM_DEMONSTRATION: - case GN_HELLS_PLANT: - if (map_flag_vs(src->m) && battle_config.vs_traps_bctall - && (src->type&battle_config.vs_traps_bctall)) - target = BCT_ALL; - break; - case HT_SHOCKWAVE: - val1=skill_lv*15+10; - case HT_SANDMAN: - case MA_SANDMAN: - case HT_CLAYMORETRAP: - case HT_SKIDTRAP: - case MA_SKIDTRAP: - case HT_LANDMINE: - case MA_LANDMINE: - case HT_ANKLESNARE: - case HT_FLASHER: - case HT_FREEZINGTRAP: - case MA_FREEZINGTRAP: - case HT_BLASTMINE: - /** - * Ranger - **/ - case RA_ELECTRICSHOCKER: - case RA_CLUSTERBOMB: - case RA_MAGENTATRAP: - case RA_COBALTTRAP: - case RA_MAIZETRAP: - case RA_VERDURETRAP: - case RA_FIRINGTRAP: - case RA_ICEBOUNDTRAP: - { - struct skill_condition req = skill_get_requirement(sd,skill_id,skill_lv); - ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY)); - if( req.itemid[i] ) - req_item = req.itemid[i]; - if( map_flag_gvg(src->m) || map[src->m].flag.battleground ) - limit *= 4; // longer trap times in WOE [celest] - if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) ) + case WZ_FIREPILLAR: + if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + return NULL; + if((flag&1)!=0) + limit=1000; + val1=skill_lv+2; + break; + case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex] + case AM_DEMONSTRATION: + case GN_HELLS_PLANT: + if (map_flag_vs(src->m) && battle_config.vs_traps_bctall + && (src->type&battle_config.vs_traps_bctall)) target = BCT_ALL; - } - break; + break; + case HT_SHOCKWAVE: + val1=skill_lv*15+10; + case HT_SANDMAN: + case MA_SANDMAN: + case HT_CLAYMORETRAP: + case HT_SKIDTRAP: + case MA_SKIDTRAP: + case HT_LANDMINE: + case MA_LANDMINE: + case HT_ANKLESNARE: + case HT_FLASHER: + case HT_FREEZINGTRAP: + case MA_FREEZINGTRAP: + case HT_BLASTMINE: + /** + * Ranger + **/ + case RA_ELECTRICSHOCKER: + case RA_CLUSTERBOMB: + case RA_MAGENTATRAP: + case RA_COBALTTRAP: + case RA_MAIZETRAP: + case RA_VERDURETRAP: + case RA_FIRINGTRAP: + case RA_ICEBOUNDTRAP: + { + struct skill_condition req = skill_get_requirement(sd,skill_id,skill_lv); + ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY)); + if( req.itemid[i] ) + req_item = req.itemid[i]; + if( map_flag_gvg(src->m) || map[src->m].flag.battleground ) + limit *= 4; // longer trap times in WOE [celest] + if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) ) + target = BCT_ALL; + } + break; - case SA_LANDPROTECTOR: - case SA_VOLCANO: - case SA_DELUGE: - case SA_VIOLENTGALE: - { - struct skill_unit_group *old_sg; - if ((old_sg = skill_locate_element_field(src)) != NULL) - { //HelloKitty confirmed that these are interchangeable, - //so you can change element and not consume gemstones. - if (( - old_sg->skill_id == SA_VOLCANO || - old_sg->skill_id == SA_DELUGE || - old_sg->skill_id == SA_VIOLENTGALE - ) && old_sg->limit > 0) - { //Use the previous limit (minus the elapsed time) [Skotlex] - limit = old_sg->limit - DIFF_TICK(gettick(), old_sg->tick); - if (limit < 0) //This can happen... - limit = skill_get_time(skill_id,skill_lv); + case SA_LANDPROTECTOR: + case SA_VOLCANO: + case SA_DELUGE: + case SA_VIOLENTGALE: + { + struct skill_unit_group *old_sg; + if ((old_sg = skill_locate_element_field(src)) != NULL) + { //HelloKitty confirmed that these are interchangeable, + //so you can change element and not consume gemstones. + if (( + old_sg->skill_id == SA_VOLCANO || + old_sg->skill_id == SA_DELUGE || + old_sg->skill_id == SA_VIOLENTGALE + ) && old_sg->limit > 0) + { //Use the previous limit (minus the elapsed time) [Skotlex] + limit = old_sg->limit - DIFF_TICK(gettick(), old_sg->tick); + if (limit < 0) //This can happen... + limit = skill_get_time(skill_id,skill_lv); + } + skill_clear_group(src,1); } - skill_clear_group(src,1); + break; } - break; - } - case BA_DISSONANCE: - case DC_UGLYDANCE: - val1 = 10; //FIXME: This value is not used anywhere, what is it for? [Skotlex] - break; - case BA_WHISTLE: - val1 = skill_lv +status->agi/10; // Flee increase - val2 = ((skill_lv+1)/2)+status->luk/10; // Perfect dodge increase - if(sd){ - val1 += pc_checkskill(sd,BA_MUSICALLESSON); - val2 += pc_checkskill(sd,BA_MUSICALLESSON); - } - break; - case DC_HUMMING: - val1 = 2*skill_lv+status->dex/10; // Hit increase + case BA_DISSONANCE: + case DC_UGLYDANCE: + val1 = 10; //FIXME: This value is not used anywhere, what is it for? [Skotlex] + break; + case BA_WHISTLE: + val1 = skill_lv +status->agi/10; // Flee increase + val2 = ((skill_lv+1)/2)+status->luk/10; // Perfect dodge increase + if(sd){ + val1 += pc_checkskill(sd,BA_MUSICALLESSON); + val2 += pc_checkskill(sd,BA_MUSICALLESSON); + } + break; + case DC_HUMMING: + val1 = 2*skill_lv+status->dex/10; // Hit increase + #ifdef RENEWAL + val1 *= 2; + #endif + if(sd) + val1 += pc_checkskill(sd,DC_DANCINGLESSON); + break; + case BA_POEMBRAGI: + val1 = 3*skill_lv+status->dex/10; // Casting time reduction + //For some reason at level 10 the base delay reduction is 50%. + val2 = (skill_lv<10?3*skill_lv:50)+status->int_/5; // After-cast delay reduction + if(sd){ + val1 += 2*pc_checkskill(sd,BA_MUSICALLESSON); + val2 += 2*pc_checkskill(sd,BA_MUSICALLESSON); + } + break; + case DC_DONTFORGETME: + val1 = status->dex/10 + 3*skill_lv + 5; // ASPD decrease + val2 = status->agi/10 + 3*skill_lv + 5; // Movement speed adjustment. + if(sd){ + val1 += pc_checkskill(sd,DC_DANCINGLESSON); + val2 += pc_checkskill(sd,DC_DANCINGLESSON); + } + break; + case BA_APPLEIDUN: + val1 = 5+2*skill_lv+status->vit/10; // MaxHP percent increase + if(sd) + val1 += pc_checkskill(sd,BA_MUSICALLESSON); + break; + case DC_SERVICEFORYOU: + val1 = 15+skill_lv+(status->int_/10); // MaxSP percent increase TO-DO: this INT bonus value is guessed + val2 = 20+3*skill_lv+(status->int_/10); // SP cost reduction + if(sd){ + val1 += pc_checkskill(sd,DC_DANCINGLESSON); //TO-DO This bonus value is guessed + val2 += pc_checkskill(sd,DC_DANCINGLESSON); //TO-DO Should be half this value + } + break; + case BA_ASSASSINCROSS: + val1 = 100+(10*skill_lv)+(status->agi/10); // ASPD increase + if(sd) + val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON); + break; + case DC_FORTUNEKISS: + val1 = 10+skill_lv+(status->luk/10); // Critical increase + if(sd) + val1 += pc_checkskill(sd,DC_DANCINGLESSON); + val1*=10; //Because every 10 crit is an actual cri point. + break; + case BD_DRUMBATTLEFIELD: #ifdef RENEWAL - val1 *= 2; + val1 = (skill_lv+5)*25; //Watk increase + val2 = skill_lv*10; //Def increase + #else + val1 = (skill_lv+1)*25; //Watk increase + val2 = (skill_lv+1)*2; //Def increase #endif - if(sd) - val1 += pc_checkskill(sd,DC_DANCINGLESSON); - break; - case BA_POEMBRAGI: - val1 = 3*skill_lv+status->dex/10; // Casting time reduction - //For some reason at level 10 the base delay reduction is 50%. - val2 = (skill_lv<10?3*skill_lv:50)+status->int_/5; // After-cast delay reduction - if(sd){ - val1 += 2*pc_checkskill(sd,BA_MUSICALLESSON); - val2 += 2*pc_checkskill(sd,BA_MUSICALLESSON); - } - break; - case DC_DONTFORGETME: - val1 = status->dex/10 + 3*skill_lv + 5; // ASPD decrease - val2 = status->agi/10 + 3*skill_lv + 5; // Movement speed adjustment. - if(sd){ - val1 += pc_checkskill(sd,DC_DANCINGLESSON); - val2 += pc_checkskill(sd,DC_DANCINGLESSON); - } - break; - case BA_APPLEIDUN: - val1 = 5+2*skill_lv+status->vit/10; // MaxHP percent increase - if(sd) - val1 += pc_checkskill(sd,BA_MUSICALLESSON); - break; - case DC_SERVICEFORYOU: - val1 = 15+skill_lv+(status->int_/10); // MaxSP percent increase TO-DO: this INT bonus value is guessed - val2 = 20+3*skill_lv+(status->int_/10); // SP cost reduction - if(sd){ - val1 += pc_checkskill(sd,DC_DANCINGLESSON); //TO-DO This bonus value is guessed - val2 += pc_checkskill(sd,DC_DANCINGLESSON); //TO-DO Should be half this value - } - break; - case BA_ASSASSINCROSS: - val1 = 100+(10*skill_lv)+(status->agi/10); // ASPD increase - if(sd) - val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON); - break; - case DC_FORTUNEKISS: - val1 = 10+skill_lv+(status->luk/10); // Critical increase - if(sd) - val1 += pc_checkskill(sd,DC_DANCINGLESSON); - val1*=10; //Because every 10 crit is an actual cri point. - break; - case BD_DRUMBATTLEFIELD: - #ifdef RENEWAL - val1 = (skill_lv+5)*25; //Watk increase - val2 = skill_lv*10; //Def increase - #else - val1 = (skill_lv+1)*25; //Watk increase - val2 = (skill_lv+1)*2; //Def increase - #endif - break; - case BD_RINGNIBELUNGEN: - val1 = (skill_lv+2)*25; //Watk increase - break; - case BD_RICHMANKIM: - val1 = 25 + 11*skill_lv; //Exp increase bonus. - break; - case BD_SIEGFRIED: - val1 = 55 + skill_lv*5; //Elemental Resistance - val2 = skill_lv*10; //Status ailment resistance - break; - case WE_CALLPARTNER: - if (sd) val1 = sd->status.partner_id; - break; - case WE_CALLPARENT: - if (sd) { - val1 = sd->status.father; - val2 = sd->status.mother; - } - break; - case WE_CALLBABY: - if (sd) val1 = sd->status.child; - break; - case NJ_KAENSIN: - skill_clear_group(src, 1); //Delete previous Kaensins/Suitons - val2 = (skill_lv+1)/2 + 4; - break; - case NJ_SUITON: - skill_clear_group(src, 1); - break; + break; + case BD_RINGNIBELUNGEN: + val1 = (skill_lv+2)*25; //Watk increase + break; + case BD_RICHMANKIM: + val1 = 25 + 11*skill_lv; //Exp increase bonus. + break; + case BD_SIEGFRIED: + val1 = 55 + skill_lv*5; //Elemental Resistance + val2 = skill_lv*10; //Status ailment resistance + break; + case WE_CALLPARTNER: + if (sd) val1 = sd->status.partner_id; + break; + case WE_CALLPARENT: + if (sd) { + val1 = sd->status.father; + val2 = sd->status.mother; + } + break; + case WE_CALLBABY: + if (sd) val1 = sd->status.child; + break; + case NJ_KAENSIN: + skill_clear_group(src, 1); //Delete previous Kaensins/Suitons + val2 = (skill_lv+1)/2 + 4; + break; + case NJ_SUITON: + skill_clear_group(src, 1); + break; - case GS_GROUNDDRIFT: - { - int element[5]={ELE_WIND,ELE_DARK,ELE_POISON,ELE_WATER,ELE_FIRE}; + case GS_GROUNDDRIFT: + { + int element[5]={ELE_WIND,ELE_DARK,ELE_POISON,ELE_WATER,ELE_FIRE}; - val1 = status->rhw.ele; - if (!val1) - val1=element[rnd()%5]; + val1 = status->rhw.ele; + if (!val1) + val1=element[rnd()%5]; - switch (val1) - { - case ELE_FIRE: - subunt++; - case ELE_WATER: - subunt++; - case ELE_POISON: - subunt++; - case ELE_DARK: - subunt++; - case ELE_WIND: - break; - default: - subunt=rnd()%5; - break; - } + switch (val1) + { + case ELE_FIRE: + subunt++; + case ELE_WATER: + subunt++; + case ELE_POISON: + subunt++; + case ELE_DARK: + subunt++; + case ELE_WIND: + break; + default: + subunt=rnd()%5; + break; + } - break; - } - case GC_POISONSMOKE: - if( !(sc && sc->data[SC_POISONINGWEAPON]) ) - return NULL; - val2 = sc->data[SC_POISONINGWEAPON]->val2; // Type of Poison - val3 = sc->data[SC_POISONINGWEAPON]->val1; - limit = 4000 + 2000 * skill_lv; - break; - case GD_LEADERSHIP: - case GD_GLORYWOUNDS: - case GD_SOULCOLD: - case GD_HAWKEYES: - limit = 1000000;//it doesn't matter - break; - case LG_BANDING: - limit = -1; - break; - case WM_REVERBERATION: - interval = limit; - val2 = 1; - case WM_POEMOFNETHERWORLD: // Can't be placed on top of Land Protector. - if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) - return NULL; - break; - case SO_CLOUD_KILL: - skill_clear_group(src, 4); - break; - case SO_WARMER: - skill_clear_group(src, 8); - break; - case SO_VACUUM_EXTREME: - range++; + break; + } + case GC_POISONSMOKE: + if( !(sc && sc->data[SC_POISONINGWEAPON]) ) + return NULL; + val2 = sc->data[SC_POISONINGWEAPON]->val2; // Type of Poison + val3 = sc->data[SC_POISONINGWEAPON]->val1; + limit = 4000 + 2000 * skill_lv; + break; + case GD_LEADERSHIP: + case GD_GLORYWOUNDS: + case GD_SOULCOLD: + case GD_HAWKEYES: + limit = 1000000;//it doesn't matter + break; + case LG_BANDING: + limit = -1; + break; + case WM_REVERBERATION: + interval = limit; + val2 = 1; + case WM_POEMOFNETHERWORLD: // Can't be placed on top of Land Protector. + if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + return NULL; + break; + case SO_CLOUD_KILL: + skill_clear_group(src, 4); + break; + case SO_WARMER: + skill_clear_group(src, 8); + break; + case SO_VACUUM_EXTREME: + range++; - break; - case SC_BLOODYLUST: - skill_clear_group(src, 32); - break; - case GN_WALLOFTHORN: - if( flag&1 ) - limit = 3000; - val3 = (x<<16)|y; - break; - case KO_ZENKAI: - if( sd ){ - ARR_FIND(1, 6, i, sd->talisman[i] > 0); - if( i < 5 ){ - val1 = sd->talisman[i]; // no. of aura - val2 = i; // aura type - limit += val1 * 1000; - subunt = i - 1; - pc_del_talisman(sd, sd->talisman[i], i); + break; + case SC_BLOODYLUST: + skill_clear_group(src, 32); + break; + case GN_WALLOFTHORN: + if( flag&1 ) + limit = 3000; + val3 = (x<<16)|y; + break; + case KO_ZENKAI: + if( sd ){ + ARR_FIND(1, 6, i, sd->talisman[i] > 0); + if( i < 5 ){ + val1 = sd->talisman[i]; // no. of aura + val2 = i; // aura type + limit += val1 * 1000; + subunt = i - 1; + pc_del_talisman(sd, sd->talisman[i], i); + } } - } - break; + break; } nullpo_retr(NULL, group=skill_initunitgroup(src,layout->count,skill_id,skill_lv,skill_get_unit_id(skill_id,flag&1)+subunt, limit, interval)); @@ -10910,8 +10918,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill } limit = group->limit; - for( i = 0; i < layout->count; i++ ) - { + for( i = 0; i < layout->count; i++ ) { struct skill_unit *unit; int ux = x + layout->dx[i]; int uy = y + layout->dy[i]; @@ -10924,65 +10931,61 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill if( battle_config.skill_wall_check && skill_get_unit_flag(skill_id)&UF_PATHCHECK && !path_search_long(NULL,src->m,ux,uy,x,y,CELL_CHKWALL) ) continue; // no path between cell and center of casting. - switch( skill_id ) - { - case MG_FIREWALL: - case NJ_KAENSIN: - val2=group->val2; - break; - case WZ_ICEWALL: - val1 = (skill_lv <= 1) ? 500 : 200 + 200*skill_lv; - val2 = map_getcell(src->m, ux, uy, CELL_GETTYPE); - break; - case HT_LANDMINE: - case MA_LANDMINE: - case HT_ANKLESNARE: - case HT_SHOCKWAVE: - case HT_SANDMAN: - case MA_SANDMAN: - case HT_FLASHER: - case HT_FREEZINGTRAP: - case MA_FREEZINGTRAP: - case HT_TALKIEBOX: - case HT_SKIDTRAP: - case MA_SKIDTRAP: - case HT_CLAYMORETRAP: - case HT_BLASTMINE: - /** - * Ranger - **/ - case RA_ELECTRICSHOCKER: - case RA_CLUSTERBOMB: - case RA_MAGENTATRAP: - case RA_COBALTTRAP: - case RA_MAIZETRAP: - case RA_VERDURETRAP: - case RA_FIRINGTRAP: - case RA_ICEBOUNDTRAP: - val1 = 3500; - break; - case GS_DESPERADO: - val1 = abs(layout->dx[i]); - val2 = abs(layout->dy[i]); - if (val1 < 2 || val2 < 2) { //Nearby cross, linear decrease with no diagonals - if (val2 > val1) val1 = val2; - if (val1) val1--; - val1 = 36 -12*val1; - } else //Diagonal edges - val1 = 28 -4*val1 -4*val2; - if (val1 < 1) val1 = 1; - val2 = 0; - break; - case WM_REVERBERATION: - val1 = 1 + skill_lv; - break; - case GN_WALLOFTHORN: - val1 = 1000 * skill_lv; // Need official value. [LimitLine] - break; - default: - if (group->state.song_dance&0x1) - val2 = unit_flag&(UF_DANCE|UF_SONG); //Store whether this is a song/dance - break; + switch( skill_id ) { + case MG_FIREWALL: + case NJ_KAENSIN: + val2=group->val2; + break; + case WZ_ICEWALL: + val1 = (skill_lv <= 1) ? 500 : 200 + 200*skill_lv; + val2 = map_getcell(src->m, ux, uy, CELL_GETTYPE); + break; + case HT_LANDMINE: + case MA_LANDMINE: + case HT_ANKLESNARE: + case HT_SHOCKWAVE: + case HT_SANDMAN: + case MA_SANDMAN: + case HT_FLASHER: + case HT_FREEZINGTRAP: + case MA_FREEZINGTRAP: + case HT_TALKIEBOX: + case HT_SKIDTRAP: + case MA_SKIDTRAP: + case HT_CLAYMORETRAP: + case HT_BLASTMINE: + case RA_ELECTRICSHOCKER: + case RA_CLUSTERBOMB: + case RA_MAGENTATRAP: + case RA_COBALTTRAP: + case RA_MAIZETRAP: + case RA_VERDURETRAP: + case RA_FIRINGTRAP: + case RA_ICEBOUNDTRAP: + val1 = 3500; + break; + case GS_DESPERADO: + val1 = abs(layout->dx[i]); + val2 = abs(layout->dy[i]); + if (val1 < 2 || val2 < 2) { //Nearby cross, linear decrease with no diagonals + if (val2 > val1) val1 = val2; + if (val1) val1--; + val1 = 36 -12*val1; + } else //Diagonal edges + val1 = 28 -4*val1 -4*val2; + if (val1 < 1) val1 = 1; + val2 = 0; + break; + case WM_REVERBERATION: + val1 = 1 + skill_lv; + break; + case GN_WALLOFTHORN: + val1 = 1000 * skill_lv; // Need official value. [LimitLine] + break; + default: + if (group->state.song_dance&0x1) + val2 = unit_flag&(UF_DANCE|UF_SONG); //Store whether this is a song/dance + break; } if (skill_get_unit_flag(skill_id) & UF_RANGEDSINGLEUNIT && i == (layout->count / 2)) val2 |= UF_RANGEDSINGLEUNIT; // center. -- cgit v1.2.3-70-g09d2 From ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 23:12:19 -0200 Subject: New Mapflag adjust_skill_damage Made as a improvement of the original ADJUST_SKILL_DAMAGE -- special thanks to Muad_Dib! . This mapflag allows you to modify the damage of any skill in any map, for example "prontera mapflag adjust_skill_damage MG_FIREBOLT 200" doubles the damage of Firebolt in prontera Another Example: "prontera mapflag adjust_skill_damage MG_FIREBOLT 50" Halves the damage of Firebolt in prontera. Signed-off-by: shennetsind --- src/map/battle.c | 22 ++++++++++++++++++++++ src/map/map.c | 41 +++++++++++++++++++++++++++++++---------- src/map/map.h | 10 +++++++--- src/map/npc.c | 25 ++++++++++++++++++++++--- 4 files changed, 82 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 2ad066d33..5bc3df6f8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1606,7 +1606,20 @@ static int battle_range_type( return BF_SHORT; return BF_LONG; } +static inline int battle_adjust_skill_damage(int m, unsigned short skill_id) { + if( map[m].skill_count ) { + int i; + ARR_FIND(0, map[m].skill_count, i, map[m].skills[i]->skill_id == skill_id ); + + if( i < map[m].skill_count ) { + return map[m].skills[i]->modifier; + } + + } + + return 0; +} static int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int i; @@ -3094,6 +3107,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if (skill_id && (i = pc_skillatk_bonus(sd, skill_id))) ATK_ADDRATE(i); + if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) + ATK_RATE(i); + if( skill_id != PA_SACRIFICE && skill_id != MO_INVESTIGATE && skill_id != CR_GRANDCROSS && skill_id != NPC_GRANDDARKNESS && skill_id != PA_SHIELDCHAIN && !flag.cri ) { //Elemental/Racial adjustments if( sd->right_weapon.def_ratio_atk_ele & (1<def_ele) || @@ -4075,6 +4091,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list //Damage bonuses if ((i = pc_skillatk_bonus(sd, skill_id))) ad.damage += ad.damage*i/100; + + if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) + MATK_RATE(i); //Ignore Defense? if (!flag.imdef && ( @@ -4456,6 +4475,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * if (sd && (i = pc_skillatk_bonus(sd, skill_id))) md.damage += md.damage*i/100; + if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) + md.damage = md.damage * i / 100; + if(md.damage < 0) md.damage = 0; else if(md.damage && tstatus->mode&MD_PLANT){ diff --git a/src/map/map.c b/src/map/map.c index 1ffffdf59..dde922f39 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2894,8 +2894,8 @@ int map_delmap(char* mapname) return 0; } -void map_data_clean(void) { - int i; +void do_final_maps(void) { + int i, v = 0; for( i = 0; i < map_num; i++ ) { @@ -2912,21 +2912,34 @@ void map_data_clean(void) { } if( map[i].unit_count ) { - int v; for(v = 0; v < map[i].unit_count; v++) { aFree(map[i].units[v]); } - aFree(map[i].units); + if( map[i].units ) { + aFree(map[i].units); + map[i].units = NULL; + } map[i].unit_count = 0; } + if( map[i].skill_count ) { + for(v = 0; v < map[i].skill_count; v++) { + aFree(map[i].skills[v]); + } + if( map[i].skills ) { + aFree(map[i].skills); + map[i].skills = NULL; + } + map[i].skill_count = 0; + } + } } /// Initializes map flags and adjusts them depending on configuration. void map_flags_init(void) { - int i; + int i, v = 0; for( i = 0; i < map_num; i++ ) { // mapflags @@ -2940,13 +2953,22 @@ void map_flags_init(void) { memset(map[i].drop_list, 0, sizeof(map[i].drop_list)); // pvp nightmare drop list if( map[i].unit_count ) { - int v; for(v = 0; v < map[i].unit_count; v++) { aFree(map[i].units[v]); } aFree(map[i].units); - map[i].unit_count = 0; } + map[i].units = NULL; + map[i].unit_count = 0; + + if( map[i].skill_count ) { + for(v = 0; v < map[i].skill_count; v++) { + aFree(map[i].skills[v]); + } + aFree(map[i].skills); + } + map[i].skills = NULL; + map[i].skill_count = 0; // adjustments if( battle_config.pk_mode ) @@ -3637,10 +3659,9 @@ void do_final(void) do_final_battleground(); do_final_duel(); do_final_elemental(); - + do_final_maps(); + map_db->destroy(map_db, map_db_final); - - map_data_clean(); mapindex_final(); if(enable_grf) diff --git a/src/map/map.h b/src/map/map.h index a9699efc2..861a55d0a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -496,8 +496,8 @@ struct iwall_data { bool shootable; }; -struct adjust_unit_duration { - int skill_id; +struct mapflag_skill_adjust { + unsigned short skill_id; unsigned short modifier; }; @@ -594,8 +594,12 @@ struct map_data { int instance_id; int instance_src_map; - struct adjust_unit_duration **units; + /* adjust_unit_duration mapflag */ + struct mapflag_skill_adjust **units; unsigned short unit_count; + /* adjust_skill_damage mapflag */ + struct mapflag_skill_adjust **skills; + unsigned short skill_count; }; /// Stores information about a remote map (for multi-mapserver setups). diff --git a/src/map/npc.c b/src/map/npc.c index 265fbb01f..671b4485a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3412,11 +3412,30 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", atoi(mod), w4, map[m].name, filepath, strline(buffer,start-buffer)); } else { int idx = map[m].unit_count; - RECREATE(map[m].units, struct adjust_unit_duration*, ++map[m].unit_count); - CREATE(map[m].units[idx],struct adjust_unit_duration,1); - map[m].units[idx]->skill_id = skill_id; + RECREATE(map[m].units, struct mapflag_skill_adjust*, ++map[m].unit_count); + CREATE(map[m].units[idx],struct mapflag_skill_adjust,1); + map[m].units[idx]->skill_id = (unsigned short)skill_id; map[m].units[idx]->modifier = (unsigned short)atoi(mod); } + } else if (!strcmpi(w3,"adjust_skill_damage")) { + char *mod; + int skill_id; + + strtok(w4,"\t");/* makes w4 contain only 4th param */ + + if( !(mod = strtok(NULL,"\t")) ) {/* makes mod contain only the 5th param */ + ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); + } else if( !( skill_id = skill_name2id(w4) ) ) { + ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", w4, map[m].name, filepath, strline(buffer,start-buffer)); + } else if ( atoi(mod) < 1 || atoi(mod) > USHRT_MAX ) { + ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", atoi(mod), w4, map[m].name, filepath, strline(buffer,start-buffer)); + } else { + int idx = map[m].skill_count; + RECREATE(map[m].skills, struct mapflag_skill_adjust*, ++map[m].skill_count); + CREATE(map[m].skills[idx],struct mapflag_skill_adjust,1); + map[m].skills[idx]->skill_id = (unsigned short)skill_id; + map[m].skills[idx]->modifier = (unsigned short)atoi(mod); + } } else ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); -- cgit v1.2.3-70-g09d2 From ac784540e034708959c3ebce999b31124f99ab7a Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 00:14:58 -0200 Subject: Extending readparam functionality Added many more bonuses including missing key stuff such as def/mdef. Signed-off-by: shennetsind --- src/map/pc.c | 1316 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 708 insertions(+), 608 deletions(-) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index e544fdd53..ad779a268 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2020,604 +2020,604 @@ int pc_bonus(struct map_session_data *sd,int type,int val) status = &sd->base_status; switch(type){ - case SP_STR: - case SP_AGI: - case SP_VIT: - case SP_INT: - case SP_DEX: - case SP_LUK: - if(sd->state.lr_flag != 2) - sd->param_bonus[type-SP_STR]+=val; - break; - case SP_ATK1: - if(!sd->state.lr_flag) { - bonus = status->rhw.atk + val; - status->rhw.atk = cap_value(bonus, 0, USHRT_MAX); - } - else if(sd->state.lr_flag == 1) { - bonus = status->lhw.atk + val; - status->lhw.atk = cap_value(bonus, 0, USHRT_MAX); - } - break; - case SP_ATK2: - if(!sd->state.lr_flag) { - bonus = status->rhw.atk2 + val; - status->rhw.atk2 = cap_value(bonus, 0, USHRT_MAX); - } - else if(sd->state.lr_flag == 1) { - bonus = status->lhw.atk2 + val; - status->lhw.atk2 = cap_value(bonus, 0, USHRT_MAX); - } - break; - case SP_BASE_ATK: - if(sd->state.lr_flag != 2) { -//#ifdef RENEWAL -// sd->bonus.eatk += val; -//#else - bonus = status->batk + val; - status->batk = cap_value(bonus, 0, USHRT_MAX); -//#endif - } - break; - case SP_DEF1: - if(sd->state.lr_flag != 2) { - bonus = status->def + val; -#ifdef RENEWAL - status->def = cap_value(bonus, SHRT_MIN, SHRT_MAX); -#else - status->def = cap_value(bonus, CHAR_MIN, CHAR_MAX); -#endif - } - break; - case SP_DEF2: - if(sd->state.lr_flag != 2) { - bonus = status->def2 + val; - status->def2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } - break; - case SP_MDEF1: - if(sd->state.lr_flag != 2) { - bonus = status->mdef + val; -#ifdef RENEWAL - status->mdef = cap_value(bonus, SHRT_MIN, SHRT_MAX); -#else - status->mdef = cap_value(bonus, CHAR_MIN, CHAR_MAX); -#endif - if( sd->state.lr_flag == 3 ) {//Shield, used for royal guard - sd->bonus.shieldmdef += bonus; + case SP_STR: + case SP_AGI: + case SP_VIT: + case SP_INT: + case SP_DEX: + case SP_LUK: + if(sd->state.lr_flag != 2) + sd->param_bonus[type-SP_STR]+=val; + break; + case SP_ATK1: + if(!sd->state.lr_flag) { + bonus = status->rhw.atk + val; + status->rhw.atk = cap_value(bonus, 0, USHRT_MAX); + } + else if(sd->state.lr_flag == 1) { + bonus = status->lhw.atk + val; + status->lhw.atk = cap_value(bonus, 0, USHRT_MAX); } - } - break; - case SP_MDEF2: - if(sd->state.lr_flag != 2) { - bonus = status->mdef2 + val; - status->mdef2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } - break; - case SP_HIT: - if(sd->state.lr_flag != 2) { - bonus = status->hit + val; - status->hit = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } else - sd->bonus.arrow_hit+=val; - break; - case SP_FLEE1: - if(sd->state.lr_flag != 2) { - bonus = status->flee + val; - status->flee = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } - break; - case SP_FLEE2: - if(sd->state.lr_flag != 2) { - bonus = status->flee2 + val*10; - status->flee2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } - break; - case SP_CRITICAL: - if(sd->state.lr_flag != 2) { - bonus = status->cri + val*10; - status->cri = cap_value(bonus, SHRT_MIN, SHRT_MAX); - } else - sd->bonus.arrow_cri += val*10; - break; - case SP_ATKELE: - if(val >= ELE_MAX) { - ShowError("pc_bonus: SP_ATKELE: Invalid element %d\n", val); break; - } - switch (sd->state.lr_flag) - { - case 2: - switch (sd->status.weapon) { - case W_BOW: - case W_REVOLVER: - case W_RIFLE: - case W_GATLING: - case W_SHOTGUN: - case W_GRENADE: - //Become weapon element. - status->rhw.ele=val; - break; - default: //Become arrow element. - sd->bonus.arrow_ele=val; - break; + case SP_ATK2: + if(!sd->state.lr_flag) { + bonus = status->rhw.atk2 + val; + status->rhw.atk2 = cap_value(bonus, 0, USHRT_MAX); + } + else if(sd->state.lr_flag == 1) { + bonus = status->lhw.atk2 + val; + status->lhw.atk2 = cap_value(bonus, 0, USHRT_MAX); } break; - case 1: - status->lhw.ele=val; + case SP_BASE_ATK: + if(sd->state.lr_flag != 2) { + //#ifdef RENEWAL + // sd->bonus.eatk += val; + //#else + bonus = status->batk + val; + status->batk = cap_value(bonus, 0, USHRT_MAX); + //#endif + } break; - default: - status->rhw.ele=val; + case SP_DEF1: + if(sd->state.lr_flag != 2) { + bonus = status->def + val; + #ifdef RENEWAL + status->def = cap_value(bonus, SHRT_MIN, SHRT_MAX); + #else + status->def = cap_value(bonus, CHAR_MIN, CHAR_MAX); + #endif + } break; - } - break; - case SP_DEFELE: - if(val >= ELE_MAX) { - ShowError("pc_bonus: SP_DEFELE: Invalid element %d\n", val); + case SP_DEF2: + if(sd->state.lr_flag != 2) { + bonus = status->def2 + val; + status->def2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); + } break; - } - if(sd->state.lr_flag != 2) - status->def_ele=val; - break; - case SP_MAXHP: - if(sd->state.lr_flag == 2) + case SP_MDEF1: + if(sd->state.lr_flag != 2) { + bonus = status->mdef + val; + #ifdef RENEWAL + status->mdef = cap_value(bonus, SHRT_MIN, SHRT_MAX); + #else + status->mdef = cap_value(bonus, CHAR_MIN, CHAR_MAX); + #endif + if( sd->state.lr_flag == 3 ) {//Shield, used for royal guard + sd->bonus.shieldmdef += bonus; + } + } break; - val += (int)status->max_hp; - //Negative bonuses will underflow, this will be handled in status_calc_pc through casting - //If this is called outside of status_calc_pc, you'd better pray they do not underflow and end with UINT_MAX max_hp. - status->max_hp = (unsigned int)val; - break; - case SP_MAXSP: - if(sd->state.lr_flag == 2) + case SP_MDEF2: + if(sd->state.lr_flag != 2) { + bonus = status->mdef2 + val; + status->mdef2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); + } break; - val += (int)status->max_sp; - status->max_sp = (unsigned int)val; - break; -#ifndef RENEWAL_CAST - case SP_VARCASTRATE: -#endif - case SP_CASTRATE: - if(sd->state.lr_flag != 2) - sd->castrate+=val; - break; - case SP_MAXHPRATE: - if(sd->state.lr_flag != 2) - sd->hprate+=val; - break; - case SP_MAXSPRATE: - if(sd->state.lr_flag != 2) - sd->sprate+=val; - break; - case SP_SPRATE: - if(sd->state.lr_flag != 2) - sd->dsprate+=val; - break; - case SP_ATTACKRANGE: - switch (sd->state.lr_flag) { - case 2: - switch (sd->status.weapon) { - case W_BOW: - case W_REVOLVER: - case W_RIFLE: - case W_GATLING: - case W_SHOTGUN: - case W_GRENADE: - status->rhw.range += val; + case SP_HIT: + if(sd->state.lr_flag != 2) { + bonus = status->hit + val; + status->hit = cap_value(bonus, SHRT_MIN, SHRT_MAX); + } else + sd->bonus.arrow_hit+=val; + break; + case SP_FLEE1: + if(sd->state.lr_flag != 2) { + bonus = status->flee + val; + status->flee = cap_value(bonus, SHRT_MIN, SHRT_MAX); } break; - case 1: - status->lhw.range += val; + case SP_FLEE2: + if(sd->state.lr_flag != 2) { + bonus = status->flee2 + val*10; + status->flee2 = cap_value(bonus, SHRT_MIN, SHRT_MAX); + } break; - default: - status->rhw.range += val; + case SP_CRITICAL: + if(sd->state.lr_flag != 2) { + bonus = status->cri + val*10; + status->cri = cap_value(bonus, SHRT_MIN, SHRT_MAX); + } else + sd->bonus.arrow_cri += val*10; break; - } - break; - case SP_SPEED_RATE: //Non stackable increase - if(sd->state.lr_flag != 2) - sd->bonus.speed_rate = min(sd->bonus.speed_rate, -val); - break; - case SP_SPEED_ADDRATE: //Stackable increase - if(sd->state.lr_flag != 2) - sd->bonus.speed_add_rate -= val; - break; - case SP_ASPD: //Raw increase - if(sd->state.lr_flag != 2) - sd->bonus.aspd_add -= 10*val; - break; - case SP_ASPD_RATE: //Stackable increase - Made it linear as per rodatazone - if(sd->state.lr_flag != 2) -#ifndef RENEWAL_ASPD - status->aspd_rate -= 10*val; -#else - status->aspd_rate2 += val; -#endif - break; - case SP_HP_RECOV_RATE: - if(sd->state.lr_flag != 2) - sd->hprecov_rate += val; - break; - case SP_SP_RECOV_RATE: - if(sd->state.lr_flag != 2) - sd->sprecov_rate += val; - break; - case SP_CRITICAL_DEF: - if(sd->state.lr_flag != 2) - sd->bonus.critical_def += val; - break; - case SP_NEAR_ATK_DEF: - if(sd->state.lr_flag != 2) - sd->bonus.near_attack_def_rate += val; - break; - case SP_LONG_ATK_DEF: - if(sd->state.lr_flag != 2) - sd->bonus.long_attack_def_rate += val; - break; - case SP_DOUBLE_RATE: - if(sd->state.lr_flag == 0 && sd->bonus.double_rate < val) - sd->bonus.double_rate = val; - break; - case SP_DOUBLE_ADD_RATE: - if(sd->state.lr_flag == 0) - sd->bonus.double_add_rate += val; - break; - case SP_MATK_RATE: - if(sd->state.lr_flag != 2) - sd->matk_rate += val; - break; - case SP_IGNORE_DEF_ELE: - if(val >= ELE_MAX) { - ShowError("pc_bonus: SP_IGNORE_DEF_ELE: Invalid element %d\n", val); + case SP_ATKELE: + if(val >= ELE_MAX) { + ShowError("pc_bonus: SP_ATKELE: Invalid element %d\n", val); + break; + } + switch (sd->state.lr_flag) + { + case 2: + switch (sd->status.weapon) { + case W_BOW: + case W_REVOLVER: + case W_RIFLE: + case W_GATLING: + case W_SHOTGUN: + case W_GRENADE: + //Become weapon element. + status->rhw.ele=val; + break; + default: //Become arrow element. + sd->bonus.arrow_ele=val; + break; + } + break; + case 1: + status->lhw.ele=val; + break; + default: + status->rhw.ele=val; + break; + } break; - } - if(!sd->state.lr_flag) - sd->right_weapon.ignore_def_ele |= 1<state.lr_flag == 1) - sd->left_weapon.ignore_def_ele |= 1<state.lr_flag) - sd->right_weapon.ignore_def_race |= 1<state.lr_flag == 1) - sd->left_weapon.ignore_def_race |= 1<state.lr_flag != 2) - sd->bonus.atk_rate += val; - break; - case SP_MAGIC_ATK_DEF: - if(sd->state.lr_flag != 2) - sd->bonus.magic_def_rate += val; - break; - case SP_MISC_ATK_DEF: - if(sd->state.lr_flag != 2) - sd->bonus.misc_def_rate += val; - break; - case SP_IGNORE_MDEF_RATE: - if(sd->state.lr_flag != 2) { - sd->ignore_mdef[RC_NONBOSS] += val; - sd->ignore_mdef[RC_BOSS] += val; - } - break; - case SP_IGNORE_MDEF_ELE: - if(val >= ELE_MAX) { - ShowError("pc_bonus: SP_IGNORE_MDEF_ELE: Invalid element %d\n", val); + case SP_DEFELE: + if(val >= ELE_MAX) { + ShowError("pc_bonus: SP_DEFELE: Invalid element %d\n", val); + break; + } + if(sd->state.lr_flag != 2) + status->def_ele=val; break; - } - if(sd->state.lr_flag != 2) - sd->bonus.ignore_mdef_ele |= 1<state.lr_flag != 2) - sd->bonus.ignore_mdef_race |= 1<state.lr_flag != 2 && sd->bonus.perfect_hit < val) - sd->bonus.perfect_hit = val; - break; - case SP_PERFECT_HIT_ADD_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.perfect_hit_add += val; - break; - case SP_CRITICAL_RATE: - if(sd->state.lr_flag != 2) - sd->critical_rate+=val; - break; - case SP_DEF_RATIO_ATK_ELE: - if(val >= ELE_MAX) { - ShowError("pc_bonus: SP_DEF_RATIO_ATK_ELE: Invalid element %d\n", val); + case SP_MAXHP: + if(sd->state.lr_flag == 2) + break; + val += (int)status->max_hp; + //Negative bonuses will underflow, this will be handled in status_calc_pc through casting + //If this is called outside of status_calc_pc, you'd better pray they do not underflow and end with UINT_MAX max_hp. + status->max_hp = (unsigned int)val; break; - } - if(!sd->state.lr_flag) - sd->right_weapon.def_ratio_atk_ele |= 1<state.lr_flag == 1) - sd->left_weapon.def_ratio_atk_ele |= 1<= RC_MAX) { - ShowError("pc_bonus: SP_DEF_RATIO_ATK_RACE: Invalid race %d\n", val); + case SP_MAXSP: + if(sd->state.lr_flag == 2) + break; + val += (int)status->max_sp; + status->max_sp = (unsigned int)val; break; - } - if(!sd->state.lr_flag) - sd->right_weapon.def_ratio_atk_race |= 1<state.lr_flag == 1) - sd->left_weapon.def_ratio_atk_race |= 1<state.lr_flag != 2) - sd->hit_rate += val; - break; - case SP_FLEE_RATE: - if(sd->state.lr_flag != 2) - sd->flee_rate += val; - break; - case SP_FLEE2_RATE: - if(sd->state.lr_flag != 2) - sd->flee2_rate += val; - break; - case SP_DEF_RATE: - if(sd->state.lr_flag != 2) - sd->def_rate += val; - break; - case SP_DEF2_RATE: - if(sd->state.lr_flag != 2) - sd->def2_rate += val; - break; - case SP_MDEF_RATE: - if(sd->state.lr_flag != 2) - sd->mdef_rate += val; - break; - case SP_MDEF2_RATE: - if(sd->state.lr_flag != 2) - sd->mdef2_rate += val; - break; - case SP_RESTART_FULL_RECOVER: - if(sd->state.lr_flag != 2) - sd->special_state.restart_full_recover = 1; - break; - case SP_NO_CASTCANCEL: - if(sd->state.lr_flag != 2) - sd->special_state.no_castcancel = 1; - break; - case SP_NO_CASTCANCEL2: - if(sd->state.lr_flag != 2) - sd->special_state.no_castcancel2 = 1; - break; - case SP_NO_SIZEFIX: - if(sd->state.lr_flag != 2) - sd->special_state.no_sizefix = 1; - break; - case SP_NO_MAGIC_DAMAGE: - if(sd->state.lr_flag == 2) + #ifndef RENEWAL_CAST + case SP_VARCASTRATE: + #endif + case SP_CASTRATE: + if(sd->state.lr_flag != 2) + sd->castrate+=val; break; - val+= sd->special_state.no_magic_damage; - sd->special_state.no_magic_damage = cap_value(val,0,100); - break; - case SP_NO_WEAPON_DAMAGE: - if(sd->state.lr_flag == 2) + case SP_MAXHPRATE: + if(sd->state.lr_flag != 2) + sd->hprate+=val; break; - val+= sd->special_state.no_weapon_damage; - sd->special_state.no_weapon_damage = cap_value(val,0,100); - break; - case SP_NO_MISC_DAMAGE: - if(sd->state.lr_flag == 2) + case SP_MAXSPRATE: + if(sd->state.lr_flag != 2) + sd->sprate+=val; break; - val+= sd->special_state.no_misc_damage; - sd->special_state.no_misc_damage = cap_value(val,0,100); - break; - case SP_NO_GEMSTONE: - if(sd->state.lr_flag != 2) - sd->special_state.no_gemstone = 1; - break; - case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG] - if(sd->state.lr_flag != 2) { - sd->special_state.intravision = 1; - clif_status_load(&sd->bl, SI_INTRAVISION, 1); - } - break; - case SP_NO_KNOCKBACK: - if(sd->state.lr_flag != 2) - sd->special_state.no_knockback = 1; - break; - case SP_SPLASH_RANGE: - if(sd->bonus.splash_range < val) - sd->bonus.splash_range = val; - break; - case SP_SPLASH_ADD_RANGE: - sd->bonus.splash_add_range += val; - break; - case SP_SHORT_WEAPON_DAMAGE_RETURN: - if(sd->state.lr_flag != 2) - sd->bonus.short_weapon_damage_return += val; - break; - case SP_LONG_WEAPON_DAMAGE_RETURN: - if(sd->state.lr_flag != 2) - sd->bonus.long_weapon_damage_return += val; - break; - case SP_MAGIC_DAMAGE_RETURN: //AppleGirl Was Here - if(sd->state.lr_flag != 2) - sd->bonus.magic_damage_return += val; - break; - case SP_ALL_STATS: // [Valaris] - if(sd->state.lr_flag!=2) { - sd->param_bonus[SP_STR-SP_STR]+=val; - sd->param_bonus[SP_AGI-SP_STR]+=val; - sd->param_bonus[SP_VIT-SP_STR]+=val; - sd->param_bonus[SP_INT-SP_STR]+=val; - sd->param_bonus[SP_DEX-SP_STR]+=val; - sd->param_bonus[SP_LUK-SP_STR]+=val; - } - break; - case SP_AGI_VIT: // [Valaris] - if(sd->state.lr_flag!=2) { - sd->param_bonus[SP_AGI-SP_STR]+=val; - sd->param_bonus[SP_VIT-SP_STR]+=val; - } - break; - case SP_AGI_DEX_STR: // [Valaris] - if(sd->state.lr_flag!=2) { - sd->param_bonus[SP_AGI-SP_STR]+=val; - sd->param_bonus[SP_DEX-SP_STR]+=val; - sd->param_bonus[SP_STR-SP_STR]+=val; - } - break; - case SP_PERFECT_HIDE: // [Valaris] - if(sd->state.lr_flag!=2) - sd->special_state.perfect_hiding=1; - break; - case SP_UNBREAKABLE: - if(sd->state.lr_flag!=2) - sd->bonus.unbreakable += val; - break; - case SP_UNBREAKABLE_WEAPON: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_WEAPON; - break; - case SP_UNBREAKABLE_ARMOR: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_ARMOR; - break; - case SP_UNBREAKABLE_HELM: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_HELM; - break; - case SP_UNBREAKABLE_SHIELD: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_SHIELD; - break; - case SP_UNBREAKABLE_GARMENT: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_GARMENT; - break; - case SP_UNBREAKABLE_SHOES: - if(sd->state.lr_flag != 2) - sd->bonus.unbreakable_equip |= EQP_SHOES; - break; - case SP_CLASSCHANGE: // [Valaris] - if(sd->state.lr_flag !=2) - sd->bonus.classchange=val; - break; - case SP_LONG_ATK_RATE: - if(sd->state.lr_flag != 2) //[Lupus] it should stack, too. As any other cards rate bonuses - sd->bonus.long_attack_atk_rate+=val; - break; - case SP_BREAK_WEAPON_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.break_weapon_rate+=val; - break; - case SP_BREAK_ARMOR_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.break_armor_rate+=val; - break; - case SP_ADD_STEAL_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.add_steal_rate+=val; - break; - case SP_DELAYRATE: - if(sd->state.lr_flag != 2) - sd->delayrate+=val; - break; - case SP_CRIT_ATK_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.crit_atk_rate += val; - break; - case SP_NO_REGEN: - if(sd->state.lr_flag != 2) - sd->regen.state.block|=val; - break; - case SP_UNSTRIPABLE_WEAPON: - if(sd->state.lr_flag != 2) - sd->bonus.unstripable_equip |= EQP_WEAPON; - break; - case SP_UNSTRIPABLE: - case SP_UNSTRIPABLE_ARMOR: - if(sd->state.lr_flag != 2) - sd->bonus.unstripable_equip |= EQP_ARMOR; - break; - case SP_UNSTRIPABLE_HELM: - if(sd->state.lr_flag != 2) - sd->bonus.unstripable_equip |= EQP_HELM; - break; - case SP_UNSTRIPABLE_SHIELD: - if(sd->state.lr_flag != 2) - sd->bonus.unstripable_equip |= EQP_SHIELD; - break; - case SP_HP_DRAIN_VALUE: - if(!sd->state.lr_flag) { - sd->right_weapon.hp_drain[RC_NONBOSS].value += val; - sd->right_weapon.hp_drain[RC_BOSS].value += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.hp_drain[RC_NONBOSS].value += val; - sd->left_weapon.hp_drain[RC_BOSS].value += val; - } - break; - case SP_SP_DRAIN_VALUE: - if(!sd->state.lr_flag) { - sd->right_weapon.sp_drain[RC_NONBOSS].value += val; - sd->right_weapon.sp_drain[RC_BOSS].value += val; - } - else if(sd->state.lr_flag == 1) { - sd->left_weapon.sp_drain[RC_NONBOSS].value += val; - sd->left_weapon.sp_drain[RC_BOSS].value += val; - } - break; - case SP_SP_GAIN_VALUE: - if(!sd->state.lr_flag) - sd->bonus.sp_gain_value += val; - break; - case SP_HP_GAIN_VALUE: - if(!sd->state.lr_flag) - sd->bonus.hp_gain_value += val; - break; - case SP_MAGIC_SP_GAIN_VALUE: - if(!sd->state.lr_flag) - sd->bonus.magic_sp_gain_value += val; - break; - case SP_MAGIC_HP_GAIN_VALUE: - if(!sd->state.lr_flag) - sd->bonus.magic_hp_gain_value += val; - break; - case SP_ADD_HEAL_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.add_heal_rate += val; - break; - case SP_ADD_HEAL2_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.add_heal2_rate += val; - break; - case SP_ADD_ITEM_HEAL_RATE: - if(sd->state.lr_flag != 2) - sd->bonus.itemhealrate2 += val; - break; - case SP_EMATK: - if(sd->state.lr_flag != 2) - sd->bonus.ematk += val; - break; - case SP_FIXCASTRATE: - if(sd->state.lr_flag != 2) - sd->bonus.fixcastrate -= val; - break; - case SP_ADD_FIXEDCAST: - if(sd->state.lr_flag != 2) - sd->bonus.add_fixcast += val; + case SP_SPRATE: + if(sd->state.lr_flag != 2) + sd->dsprate+=val; + break; + case SP_ATTACKRANGE: + switch (sd->state.lr_flag) { + case 2: + switch (sd->status.weapon) { + case W_BOW: + case W_REVOLVER: + case W_RIFLE: + case W_GATLING: + case W_SHOTGUN: + case W_GRENADE: + status->rhw.range += val; + } + break; + case 1: + status->lhw.range += val; + break; + default: + status->rhw.range += val; + break; + } + break; + case SP_SPEED_RATE: //Non stackable increase + if(sd->state.lr_flag != 2) + sd->bonus.speed_rate = min(sd->bonus.speed_rate, -val); + break; + case SP_SPEED_ADDRATE: //Stackable increase + if(sd->state.lr_flag != 2) + sd->bonus.speed_add_rate -= val; + break; + case SP_ASPD: //Raw increase + if(sd->state.lr_flag != 2) + sd->bonus.aspd_add -= 10*val; + break; + case SP_ASPD_RATE: //Stackable increase - Made it linear as per rodatazone + if(sd->state.lr_flag != 2) + #ifndef RENEWAL_ASPD + status->aspd_rate -= 10*val; + #else + status->aspd_rate2 += val; + #endif + break; + case SP_HP_RECOV_RATE: + if(sd->state.lr_flag != 2) + sd->hprecov_rate += val; + break; + case SP_SP_RECOV_RATE: + if(sd->state.lr_flag != 2) + sd->sprecov_rate += val; + break; + case SP_CRITICAL_DEF: + if(sd->state.lr_flag != 2) + sd->bonus.critical_def += val; + break; + case SP_NEAR_ATK_DEF: + if(sd->state.lr_flag != 2) + sd->bonus.near_attack_def_rate += val; + break; + case SP_LONG_ATK_DEF: + if(sd->state.lr_flag != 2) + sd->bonus.long_attack_def_rate += val; + break; + case SP_DOUBLE_RATE: + if(sd->state.lr_flag == 0 && sd->bonus.double_rate < val) + sd->bonus.double_rate = val; + break; + case SP_DOUBLE_ADD_RATE: + if(sd->state.lr_flag == 0) + sd->bonus.double_add_rate += val; + break; + case SP_MATK_RATE: + if(sd->state.lr_flag != 2) + sd->matk_rate += val; + break; + case SP_IGNORE_DEF_ELE: + if(val >= ELE_MAX) { + ShowError("pc_bonus: SP_IGNORE_DEF_ELE: Invalid element %d\n", val); + break; + } + if(!sd->state.lr_flag) + sd->right_weapon.ignore_def_ele |= 1<state.lr_flag == 1) + sd->left_weapon.ignore_def_ele |= 1<state.lr_flag) + sd->right_weapon.ignore_def_race |= 1<state.lr_flag == 1) + sd->left_weapon.ignore_def_race |= 1<state.lr_flag != 2) + sd->bonus.atk_rate += val; + break; + case SP_MAGIC_ATK_DEF: + if(sd->state.lr_flag != 2) + sd->bonus.magic_def_rate += val; + break; + case SP_MISC_ATK_DEF: + if(sd->state.lr_flag != 2) + sd->bonus.misc_def_rate += val; + break; + case SP_IGNORE_MDEF_RATE: + if(sd->state.lr_flag != 2) { + sd->ignore_mdef[RC_NONBOSS] += val; + sd->ignore_mdef[RC_BOSS] += val; + } + break; + case SP_IGNORE_MDEF_ELE: + if(val >= ELE_MAX) { + ShowError("pc_bonus: SP_IGNORE_MDEF_ELE: Invalid element %d\n", val); + break; + } + if(sd->state.lr_flag != 2) + sd->bonus.ignore_mdef_ele |= 1<state.lr_flag != 2) + sd->bonus.ignore_mdef_race |= 1<state.lr_flag != 2 && sd->bonus.perfect_hit < val) + sd->bonus.perfect_hit = val; + break; + case SP_PERFECT_HIT_ADD_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.perfect_hit_add += val; + break; + case SP_CRITICAL_RATE: + if(sd->state.lr_flag != 2) + sd->critical_rate+=val; + break; + case SP_DEF_RATIO_ATK_ELE: + if(val >= ELE_MAX) { + ShowError("pc_bonus: SP_DEF_RATIO_ATK_ELE: Invalid element %d\n", val); + break; + } + if(!sd->state.lr_flag) + sd->right_weapon.def_ratio_atk_ele |= 1<state.lr_flag == 1) + sd->left_weapon.def_ratio_atk_ele |= 1<= RC_MAX) { + ShowError("pc_bonus: SP_DEF_RATIO_ATK_RACE: Invalid race %d\n", val); + break; + } + if(!sd->state.lr_flag) + sd->right_weapon.def_ratio_atk_race |= 1<state.lr_flag == 1) + sd->left_weapon.def_ratio_atk_race |= 1<state.lr_flag != 2) + sd->hit_rate += val; + break; + case SP_FLEE_RATE: + if(sd->state.lr_flag != 2) + sd->flee_rate += val; + break; + case SP_FLEE2_RATE: + if(sd->state.lr_flag != 2) + sd->flee2_rate += val; + break; + case SP_DEF_RATE: + if(sd->state.lr_flag != 2) + sd->def_rate += val; + break; + case SP_DEF2_RATE: + if(sd->state.lr_flag != 2) + sd->def2_rate += val; + break; + case SP_MDEF_RATE: + if(sd->state.lr_flag != 2) + sd->mdef_rate += val; + break; + case SP_MDEF2_RATE: + if(sd->state.lr_flag != 2) + sd->mdef2_rate += val; + break; + case SP_RESTART_FULL_RECOVER: + if(sd->state.lr_flag != 2) + sd->special_state.restart_full_recover = 1; + break; + case SP_NO_CASTCANCEL: + if(sd->state.lr_flag != 2) + sd->special_state.no_castcancel = 1; + break; + case SP_NO_CASTCANCEL2: + if(sd->state.lr_flag != 2) + sd->special_state.no_castcancel2 = 1; + break; + case SP_NO_SIZEFIX: + if(sd->state.lr_flag != 2) + sd->special_state.no_sizefix = 1; + break; + case SP_NO_MAGIC_DAMAGE: + if(sd->state.lr_flag == 2) + break; + val+= sd->special_state.no_magic_damage; + sd->special_state.no_magic_damage = cap_value(val,0,100); + break; + case SP_NO_WEAPON_DAMAGE: + if(sd->state.lr_flag == 2) + break; + val+= sd->special_state.no_weapon_damage; + sd->special_state.no_weapon_damage = cap_value(val,0,100); + break; + case SP_NO_MISC_DAMAGE: + if(sd->state.lr_flag == 2) + break; + val+= sd->special_state.no_misc_damage; + sd->special_state.no_misc_damage = cap_value(val,0,100); + break; + case SP_NO_GEMSTONE: + if(sd->state.lr_flag != 2) + sd->special_state.no_gemstone = 1; + break; + case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG] + if(sd->state.lr_flag != 2) { + sd->special_state.intravision = 1; + clif_status_load(&sd->bl, SI_INTRAVISION, 1); + } + break; + case SP_NO_KNOCKBACK: + if(sd->state.lr_flag != 2) + sd->special_state.no_knockback = 1; + break; + case SP_SPLASH_RANGE: + if(sd->bonus.splash_range < val) + sd->bonus.splash_range = val; + break; + case SP_SPLASH_ADD_RANGE: + sd->bonus.splash_add_range += val; + break; + case SP_SHORT_WEAPON_DAMAGE_RETURN: + if(sd->state.lr_flag != 2) + sd->bonus.short_weapon_damage_return += val; + break; + case SP_LONG_WEAPON_DAMAGE_RETURN: + if(sd->state.lr_flag != 2) + sd->bonus.long_weapon_damage_return += val; + break; + case SP_MAGIC_DAMAGE_RETURN: //AppleGirl Was Here + if(sd->state.lr_flag != 2) + sd->bonus.magic_damage_return += val; + break; + case SP_ALL_STATS: // [Valaris] + if(sd->state.lr_flag!=2) { + sd->param_bonus[SP_STR-SP_STR]+=val; + sd->param_bonus[SP_AGI-SP_STR]+=val; + sd->param_bonus[SP_VIT-SP_STR]+=val; + sd->param_bonus[SP_INT-SP_STR]+=val; + sd->param_bonus[SP_DEX-SP_STR]+=val; + sd->param_bonus[SP_LUK-SP_STR]+=val; + } + break; + case SP_AGI_VIT: // [Valaris] + if(sd->state.lr_flag!=2) { + sd->param_bonus[SP_AGI-SP_STR]+=val; + sd->param_bonus[SP_VIT-SP_STR]+=val; + } + break; + case SP_AGI_DEX_STR: // [Valaris] + if(sd->state.lr_flag!=2) { + sd->param_bonus[SP_AGI-SP_STR]+=val; + sd->param_bonus[SP_DEX-SP_STR]+=val; + sd->param_bonus[SP_STR-SP_STR]+=val; + } + break; + case SP_PERFECT_HIDE: // [Valaris] + if(sd->state.lr_flag!=2) + sd->special_state.perfect_hiding=1; + break; + case SP_UNBREAKABLE: + if(sd->state.lr_flag!=2) + sd->bonus.unbreakable += val; + break; + case SP_UNBREAKABLE_WEAPON: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_WEAPON; + break; + case SP_UNBREAKABLE_ARMOR: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_ARMOR; + break; + case SP_UNBREAKABLE_HELM: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_HELM; + break; + case SP_UNBREAKABLE_SHIELD: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_SHIELD; + break; + case SP_UNBREAKABLE_GARMENT: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_GARMENT; + break; + case SP_UNBREAKABLE_SHOES: + if(sd->state.lr_flag != 2) + sd->bonus.unbreakable_equip |= EQP_SHOES; + break; + case SP_CLASSCHANGE: // [Valaris] + if(sd->state.lr_flag !=2) + sd->bonus.classchange=val; + break; + case SP_LONG_ATK_RATE: + if(sd->state.lr_flag != 2) //[Lupus] it should stack, too. As any other cards rate bonuses + sd->bonus.long_attack_atk_rate+=val; + break; + case SP_BREAK_WEAPON_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.break_weapon_rate+=val; + break; + case SP_BREAK_ARMOR_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.break_armor_rate+=val; + break; + case SP_ADD_STEAL_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.add_steal_rate+=val; + break; + case SP_DELAYRATE: + if(sd->state.lr_flag != 2) + sd->delayrate+=val; + break; + case SP_CRIT_ATK_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.crit_atk_rate += val; + break; + case SP_NO_REGEN: + if(sd->state.lr_flag != 2) + sd->regen.state.block|=val; + break; + case SP_UNSTRIPABLE_WEAPON: + if(sd->state.lr_flag != 2) + sd->bonus.unstripable_equip |= EQP_WEAPON; + break; + case SP_UNSTRIPABLE: + case SP_UNSTRIPABLE_ARMOR: + if(sd->state.lr_flag != 2) + sd->bonus.unstripable_equip |= EQP_ARMOR; + break; + case SP_UNSTRIPABLE_HELM: + if(sd->state.lr_flag != 2) + sd->bonus.unstripable_equip |= EQP_HELM; + break; + case SP_UNSTRIPABLE_SHIELD: + if(sd->state.lr_flag != 2) + sd->bonus.unstripable_equip |= EQP_SHIELD; + break; + case SP_HP_DRAIN_VALUE: + if(!sd->state.lr_flag) { + sd->right_weapon.hp_drain[RC_NONBOSS].value += val; + sd->right_weapon.hp_drain[RC_BOSS].value += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.hp_drain[RC_NONBOSS].value += val; + sd->left_weapon.hp_drain[RC_BOSS].value += val; + } + break; + case SP_SP_DRAIN_VALUE: + if(!sd->state.lr_flag) { + sd->right_weapon.sp_drain[RC_NONBOSS].value += val; + sd->right_weapon.sp_drain[RC_BOSS].value += val; + } + else if(sd->state.lr_flag == 1) { + sd->left_weapon.sp_drain[RC_NONBOSS].value += val; + sd->left_weapon.sp_drain[RC_BOSS].value += val; + } + break; + case SP_SP_GAIN_VALUE: + if(!sd->state.lr_flag) + sd->bonus.sp_gain_value += val; + break; + case SP_HP_GAIN_VALUE: + if(!sd->state.lr_flag) + sd->bonus.hp_gain_value += val; + break; + case SP_MAGIC_SP_GAIN_VALUE: + if(!sd->state.lr_flag) + sd->bonus.magic_sp_gain_value += val; + break; + case SP_MAGIC_HP_GAIN_VALUE: + if(!sd->state.lr_flag) + sd->bonus.magic_hp_gain_value += val; + break; + case SP_ADD_HEAL_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.add_heal_rate += val; + break; + case SP_ADD_HEAL2_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.add_heal2_rate += val; + break; + case SP_ADD_ITEM_HEAL_RATE: + if(sd->state.lr_flag != 2) + sd->bonus.itemhealrate2 += val; + break; + case SP_EMATK: + if(sd->state.lr_flag != 2) + sd->bonus.ematk += val; + break; + case SP_FIXCASTRATE: + if(sd->state.lr_flag != 2) + sd->bonus.fixcastrate -= val; + break; + case SP_ADD_FIXEDCAST: + if(sd->state.lr_flag != 2) + sd->bonus.add_fixcast += val; - break; -#ifdef RENEWAL_CAST - case SP_VARCASTRATE: - if(sd->state.lr_flag != 2) - sd->bonus.varcastrate -= val; - break; - case SP_ADD_VARIABLECAST: - if(sd->state.lr_flag != 2) + break; + #ifdef RENEWAL_CAST + case SP_VARCASTRATE: + if(sd->state.lr_flag != 2) + sd->bonus.varcastrate -= val; + break; + case SP_ADD_VARIABLECAST: + if(sd->state.lr_flag != 2) - sd->bonus.add_varcast += val; + sd->bonus.add_varcast += val; - break; -#endif - default: - ShowWarning("pc_bonus: unknown type %d %d !\n",type,val); - break; + break; + #endif + default: + ShowWarning("pc_bonus: unknown type %d %d !\n",type,val); + break; } return 0; } @@ -6875,39 +6875,139 @@ int pc_readparam(struct map_session_data* sd,int type) nullpo_ret(sd); switch(type) { - case SP_SKILLPOINT: val = sd->status.skill_point; break; - case SP_STATUSPOINT: val = sd->status.status_point; break; - case SP_ZENY: val = sd->status.zeny; break; - case SP_BASELEVEL: val = sd->status.base_level; break; - case SP_JOBLEVEL: val = sd->status.job_level; break; - case SP_CLASS: val = sd->status.class_; break; - case SP_BASEJOB: val = pc_mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type. - case SP_UPPER: val = sd->class_&JOBL_UPPER?1:(sd->class_&JOBL_BABY?2:0); break; - case SP_BASECLASS: val = pc_mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex] - case SP_SEX: val = sd->status.sex; break; - case SP_WEIGHT: val = sd->weight; break; - case SP_MAXWEIGHT: val = sd->max_weight; break; - case SP_BASEEXP: val = sd->status.base_exp; break; - case SP_JOBEXP: val = sd->status.job_exp; break; - case SP_NEXTBASEEXP: val = pc_nextbaseexp(sd); break; - case SP_NEXTJOBEXP: val = pc_nextjobexp(sd); break; - case SP_HP: val = sd->battle_status.hp; break; - case SP_MAXHP: val = sd->battle_status.max_hp; break; - case SP_SP: val = sd->battle_status.sp; break; - case SP_MAXSP: val = sd->battle_status.max_sp; break; - case SP_STR: val = sd->status.str; break; - case SP_AGI: val = sd->status.agi; break; - case SP_VIT: val = sd->status.vit; break; - case SP_INT: val = sd->status.int_; break; - case SP_DEX: val = sd->status.dex; break; - case SP_LUK: val = sd->status.luk; break; - case SP_KARMA: val = sd->status.karma; break; - case SP_MANNER: val = sd->status.manner; break; - case SP_FAME: val = sd->status.fame; break; - case SP_KILLERRID: val = sd->killerrid; break; - case SP_KILLEDRID: val = sd->killedrid; break; - case SP_CRITICAL: val = sd->battle_status.cri/10; break; - case SP_ASPD: val = (2000-sd->battle_status.amotion)/10; break; + case SP_SKILLPOINT: val = sd->status.skill_point; break; + case SP_STATUSPOINT: val = sd->status.status_point; break; + case SP_ZENY: val = sd->status.zeny; break; + case SP_BASELEVEL: val = sd->status.base_level; break; + case SP_JOBLEVEL: val = sd->status.job_level; break; + case SP_CLASS: val = sd->status.class_; break; + case SP_BASEJOB: val = pc_mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type. + case SP_UPPER: val = sd->class_&JOBL_UPPER?1:(sd->class_&JOBL_BABY?2:0); break; + case SP_BASECLASS: val = pc_mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex] + case SP_SEX: val = sd->status.sex; break; + case SP_WEIGHT: val = sd->weight; break; + case SP_MAXWEIGHT: val = sd->max_weight; break; + case SP_BASEEXP: val = sd->status.base_exp; break; + case SP_JOBEXP: val = sd->status.job_exp; break; + case SP_NEXTBASEEXP: val = pc_nextbaseexp(sd); break; + case SP_NEXTJOBEXP: val = pc_nextjobexp(sd); break; + case SP_HP: val = sd->battle_status.hp; break; + case SP_MAXHP: val = sd->battle_status.max_hp; break; + case SP_SP: val = sd->battle_status.sp; break; + case SP_MAXSP: val = sd->battle_status.max_sp; break; + case SP_STR: val = sd->status.str; break; + case SP_AGI: val = sd->status.agi; break; + case SP_VIT: val = sd->status.vit; break; + case SP_INT: val = sd->status.int_; break; + case SP_DEX: val = sd->status.dex; break; + case SP_LUK: val = sd->status.luk; break; + case SP_KARMA: val = sd->status.karma; break; + case SP_MANNER: val = sd->status.manner; break; + case SP_FAME: val = sd->status.fame; break; + case SP_KILLERRID: val = sd->killerrid; break; + case SP_KILLEDRID: val = sd->killedrid; break; + case SP_CRITICAL: val = sd->battle_status.cri/10; break; + case SP_ASPD: val = (2000-sd->battle_status.amotion)/10; break; + case SP_BASE_ATK: val = sd->battle_status.batk; break; + case SP_DEF1: val = sd->battle_status.def; break; + case SP_DEF2: val = sd->battle_status.def2; break; + case SP_MDEF1: val = sd->battle_status.mdef; break; + case SP_MDEF2: val = sd->battle_status.mdef2; break; + case SP_HIT: val = sd->battle_status.hit; break; + case SP_FLEE1: val = sd->battle_status.flee; break; + case SP_FLEE2: val = sd->battle_status.flee2; break; + case SP_DEFELE: val = sd->battle_status.def_ele; break; +#ifndef RENEWAL_CAST + case SP_VARCASTRATE: +#endif + case SP_CASTRATE: + val = sd->castrate+=val; + break; + case SP_MAXHPRATE: val = sd->hprate; break; + case SP_MAXSPRATE: val = sd->sprate; break; + case SP_SPRATE: val = sd->dsprate; break; + case SP_SPEED_RATE: val = sd->bonus.speed_rate; break; + case SP_SPEED_ADDRATE: val = sd->bonus.speed_add_rate; break; + case SP_ASPD_RATE: +#ifndef RENEWAL_ASPD + val = sd->battle_status.aspd_rate; +#else + val = sd->battle_status.aspd_rate2; +#endif + break; + case SP_HP_RECOV_RATE: val = sd->hprecov_rate; break; + case SP_SP_RECOV_RATE: val = sd->sprecov_rate; break; + case SP_CRITICAL_DEF: val = sd->bonus.critical_def; break; + case SP_NEAR_ATK_DEF: val = sd->bonus.near_attack_def_rate; break; + case SP_LONG_ATK_DEF: val = sd->bonus.long_attack_def_rate; break; + case SP_DOUBLE_RATE: val = sd->bonus.double_rate; break; + case SP_DOUBLE_ADD_RATE: val = sd->bonus.double_add_rate; break; + case SP_MATK_RATE: val = sd->matk_rate; break; + case SP_ATK_RATE: val = sd->bonus.atk_rate; break; + case SP_MAGIC_ATK_DEF: val = sd->bonus.magic_def_rate; break; + case SP_MISC_ATK_DEF: val = sd->bonus.misc_def_rate; break; + case SP_PERFECT_HIT_RATE:val = sd->bonus.perfect_hit; break; + case SP_PERFECT_HIT_ADD_RATE: val = sd->bonus.perfect_hit_add; break; + case SP_CRITICAL_RATE: val = sd->critical_rate; break; + case SP_HIT_RATE: val = sd->hit_rate; break; + case SP_FLEE_RATE: val = sd->flee_rate; break; + case SP_FLEE2_RATE: val = sd->flee2_rate; break; + case SP_DEF_RATE: val = sd->def_rate; break; + case SP_DEF2_RATE: val = sd->def2_rate; break; + case SP_MDEF_RATE: val = sd->mdef_rate; break; + case SP_MDEF2_RATE: val = sd->mdef2_rate; break; + case SP_RESTART_FULL_RECOVER: val = sd->special_state.restart_full_recover?1:0; break; + case SP_NO_CASTCANCEL: val = sd->special_state.no_castcancel?1:0; break; + case SP_NO_CASTCANCEL2: val = sd->special_state.no_castcancel2?1:0; break; + case SP_NO_SIZEFIX: val = sd->special_state.no_sizefix?1:0; break; + case SP_NO_MAGIC_DAMAGE: val = sd->special_state.no_magic_damage; break; + case SP_NO_WEAPON_DAMAGE:val = sd->special_state.no_weapon_damage; break; + case SP_NO_MISC_DAMAGE: val = sd->special_state.no_misc_damage; break; + case SP_NO_GEMSTONE: val = sd->special_state.no_gemstone?1:0; break; + case SP_INTRAVISION: val = sd->special_state.intravision?1:0; break; + case SP_NO_KNOCKBACK: val = sd->special_state.no_knockback?1:0; break; + case SP_SPLASH_RANGE: val = sd->bonus.splash_range; break; + case SP_SPLASH_ADD_RANGE:val = sd->bonus.splash_add_range; break; + case SP_SHORT_WEAPON_DAMAGE_RETURN: val = sd->bonus.short_weapon_damage_return; break; + case SP_LONG_WEAPON_DAMAGE_RETURN: val = sd->bonus.long_weapon_damage_return; break; + case SP_MAGIC_DAMAGE_RETURN: val = sd->bonus.magic_damage_return; break; + case SP_PERFECT_HIDE: val = sd->special_state.perfect_hiding?1:0; break; + case SP_UNBREAKABLE: val = sd->bonus.unbreakable; break; + case SP_UNBREAKABLE_WEAPON: val = (sd->bonus.unbreakable_equip&EQP_WEAPON)?1:0; break; + case SP_UNBREAKABLE_ARMOR: val = (sd->bonus.unbreakable_equip&EQP_ARMOR)?1:0; break; + case SP_UNBREAKABLE_HELM: val = (sd->bonus.unbreakable_equip&EQP_HELM)?1:0; break; + case SP_UNBREAKABLE_SHIELD: val = (sd->bonus.unbreakable_equip&EQP_SHIELD)?1:0; break; + case SP_UNBREAKABLE_GARMENT: val = (sd->bonus.unbreakable_equip&EQP_GARMENT)?1:0; break; + case SP_UNBREAKABLE_SHOES: val = (sd->bonus.unbreakable_equip&EQP_SHOES)?1:0; break; + case SP_CLASSCHANGE: val = sd->bonus.classchange; break; + case SP_LONG_ATK_RATE: val = sd->bonus.long_attack_atk_rate; break; + case SP_BREAK_WEAPON_RATE: val = sd->bonus.break_weapon_rate; break; + case SP_BREAK_ARMOR_RATE: val = sd->bonus.break_armor_rate; break; + case SP_ADD_STEAL_RATE: val = sd->bonus.add_steal_rate; break; + case SP_DELAYRATE: val = sd->delayrate; break; + case SP_CRIT_ATK_RATE: val = sd->bonus.crit_atk_rate; break; + case SP_UNSTRIPABLE_WEAPON: val = (sd->bonus.unstripable_equip&EQP_WEAPON)?1:0; break; + case SP_UNSTRIPABLE: + case SP_UNSTRIPABLE_ARMOR: + val = (sd->bonus.unstripable_equip&EQP_ARMOR)?1:0; + break; + case SP_UNSTRIPABLE_HELM: val = (sd->bonus.unstripable_equip&EQP_HELM)?1:0; break; + case SP_UNSTRIPABLE_SHIELD: val = (sd->bonus.unstripable_equip&EQP_SHIELD)?1:0; break; + case SP_SP_GAIN_VALUE: val = sd->bonus.sp_gain_value; break; + case SP_HP_GAIN_VALUE: val = sd->bonus.hp_gain_value; break; + case SP_MAGIC_SP_GAIN_VALUE: val = sd->bonus.magic_sp_gain_value; break; + case SP_MAGIC_HP_GAIN_VALUE: val = sd->bonus.magic_hp_gain_value; break; + case SP_ADD_HEAL_RATE: val = sd->bonus.add_heal_rate; break; + case SP_ADD_HEAL2_RATE: val = sd->bonus.add_heal2_rate; break; + case SP_ADD_ITEM_HEAL_RATE: val = sd->bonus.itemhealrate2; break; + case SP_EMATK: val = sd->bonus.ematk; break; + case SP_FIXCASTRATE: val = sd->bonus.fixcastrate; break; + case SP_ADD_FIXEDCAST: val = sd->bonus.add_fixcast; break; +#ifdef RENEWAL_CAST + case SP_VARCASTRATE: val = sd->bonus.varcastrate; break; + case SP_ADD_VARIABLECAST:val = sd->bonus.add_varcast; break; +#endif + } return val; -- cgit v1.2.3-70-g09d2 From a244b61804209ec8a836d8d3f1b7220b2bfec990 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 01:16:28 -0200 Subject: Fixed Bug #7039 Status effects no longer propagate with magical reflection (e.g. when frost diver is reflected there is no chance that target will be frozen) http://hercules.ws/board/tracker/issue-7039-frost-diver/ Signed-off-by: shennetsind --- src/map/battle.c | 14 ++++++++------ src/map/battle.h | 2 +- src/map/skill.c | 16 ++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 5bc3df6f8..460826414 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -209,6 +209,7 @@ struct delay_damage { uint16 skill_id; enum damage_lv dmg_lv; unsigned short attack_type; + bool additional_effects; }; int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { @@ -231,7 +232,7 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { { map_freeblock_lock(); status_fix_damage(src, target, dat->damage, dat->delay); - if( dat->attack_type && !status_isdead(target) ) + if( dat->attack_type && !status_isdead(target) && dat->additional_effects ) skill_additional_effect(src,target,dat->skill_id,dat->skill_lv,dat->attack_type,dat->dmg_lv,tick); if( dat->dmg_lv > ATK_BLOCK && dat->attack_type ) skill_counter_additional_effect(src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick); @@ -249,7 +250,7 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { return 0; } -int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int damage, enum damage_lv dmg_lv, int ddelay) +int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) { struct delay_damage *dat; struct status_change *sc; @@ -264,7 +265,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, if ( !battle_config.delay_battle_damage || amotion <= 1 ) { map_freeblock_lock(); status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope] - if( attack_type && !status_isdead(target) ) + if( attack_type && !status_isdead(target) && additional_effects ) skill_additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, gettick()); if( dmg_lv > ATK_BLOCK && attack_type ) skill_counter_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick()); @@ -281,6 +282,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, dat->dmg_lv = dmg_lv; dat->delay = ddelay; dat->distance = distance_bl(src, target)+10; //Attack should connect regardless unless you teleported. + dat->additional_effects = additional_effects; if (src->type != BL_PC && amotion > 1000) amotion = 1000; //Aegis places a damage-delay cap of 1 sec to non player attacks. [Skotlex] @@ -4690,7 +4692,7 @@ int battle_damage_area( struct block_list *bl, va_list ap) { if( src->type == BL_PC ) battle_drain((TBL_PC*)src, bl, damage, damage, status_get_race(bl), is_boss(bl)); if( amotion ) - battle_delay_damage(tick, amotion,src,bl,0,CR_REFLECTSHIELD,0,damage,ATK_DEF,0); + battle_delay_damage(tick, amotion,src,bl,0,CR_REFLECTSHIELD,0,damage,ATK_DEF,0,true); else status_fix_damage(src,bl,damage,0); clif_damage(bl,bl,tick,amotion,dmotion,damage,1,ATK_BLOCK,0); @@ -4927,7 +4929,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t } map_freeblock_lock(); - battle_delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion); + battle_delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion, true); if( tsc ) { if( tsc->data[SC_DEVOTION] ) { struct status_change_entry *sce = tsc->data[SC_DEVOTION]; @@ -5055,7 +5057,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if (rdamage > 0 && !(tsc && tsc->data[SC_REFLECTDAMAGE])) { //By sending attack type "none" skill_additional_effect won't be invoked. [Skotlex] if(tsd && src != target) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src)); - battle_delay_damage(tick, wd.amotion, target, src, 0, CR_REFLECTSHIELD, 0, rdamage, ATK_DEF, rdelay); + battle_delay_damage(tick, wd.amotion, target, src, 0, CR_REFLECTSHIELD, 0, rdamage, ATK_DEF, rdelay, true); } if (tsc) { diff --git a/src/map/battle.h b/src/map/battle.h index cd626cd6b..e3a0a51ab 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -62,7 +62,7 @@ enum { // Flag of the final calculation BF_SKILLMASK= 0x0f00, }; -int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int damage, enum damage_lv dmg_lv, int ddelay); +int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects); // Summary normal attack treatment (basic attack) enum damage_lv battle_weapon_attack( struct block_list *bl,struct block_list *target,unsigned int tick,int flag); diff --git a/src/map/skill.c b/src/map/skill.c index b37d28e3c..86a03b64b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2192,6 +2192,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds struct map_session_data *sd, *tsd; int type,damage,rdamage=0; int8 rmdamage=0;//magic reflected + bool additional_effects = true; if(skill_id > 0 && !skill_lv) return 0; @@ -2272,7 +2273,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds sc->data[SC_SPIRIT]->val3 = skill_id; sc->data[SC_SPIRIT]->val4 = dsrc->id; } - } + } else if( type != 2 ) /* Kaite bypasses */ + additional_effects = false; /** * Official Magic Reflection Behavior : damage reflected depends on gears caster wears, not target @@ -2618,7 +2620,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds { //Instant damage if( !sc || (!sc->data[SC_DEVOTION] && skill_id != CR_REFLECTSHIELD) ) status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo. - if( !status_isdead(bl) ) + if( !status_isdead(bl) && additional_effects ) skill_additional_effect(src,bl,skill_id,skill_lv,dmg.flag,dmg.dmg_lv,tick); if( damage > 0 ) //Counter status effects [Skotlex] skill_counter_additional_effect(src,bl,skill_id,skill_lv,dmg.flag,tick); @@ -2692,10 +2694,9 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds //Delayed damage must be dealt after the knockback (it needs to know actual position of target) if (dmg.amotion) - battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skill_id,skill_lv,damage,dmg.dmg_lv,dmg.dmotion); + battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skill_id,skill_lv,damage,dmg.dmg_lv,dmg.dmotion, additional_effects); - if( sc && sc->data[SC_DEVOTION] && skill_id != PA_PRESSURE ) - { + if( sc && sc->data[SC_DEVOTION] && skill_id != PA_PRESSURE ) { struct status_change_entry *sce = sc->data[SC_DEVOTION]; struct block_list *d_bl = map_id2bl(sce->val1); @@ -2707,8 +2708,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if(!rmdamage){ clif_damage(d_bl,d_bl, gettick(), 0, 0, damage, 0, 0, 0); status_fix_damage(NULL,d_bl, damage, 0); - } - else{//Reflected magics are done directly on the target not on paladin + } else{ //Reflected magics are done directly on the target not on paladin //This check is only for magical skill. //For BF_WEAPON skills types track var rdamage and function battle_calc_return_damage clif_damage(bl,bl, gettick(), 0, 0, damage, 0, 0, 0); @@ -2750,7 +2750,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds map_foreachinshootrange(battle_damage_area,bl,skill_get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,tick,bl,dmg.amotion,sstatus->dmotion,rdamage,tstatus->race); } else { if( dmg.amotion ) - battle_delay_damage(tick, dmg.amotion,bl,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,0); + battle_delay_damage(tick, dmg.amotion,bl,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,0,additional_effects); else status_fix_damage(bl,src,rdamage,0); clif_damage(src,src,tick, dmg.amotion,0,rdamage,1,4,0); // in aegis damage reflected is shown in single hit. -- cgit v1.2.3-70-g09d2 From 2c13a2a2dab83b3471bf5ce24371259012036e19 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 14:10:50 -0200 Subject: Adjusted 'adjust_skill_damage' Mapflag The flag is now respected by all unit types, not only players. This also fixes a previous problem as reported by exneval (Thanks!) Signed-off-by: shennetsind --- src/map/battle.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 460826414..a6605da5e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3104,13 +3104,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo break; } - if( sd ) - { + if( (i = battle_adjust_skill_damage(src->m,skill_id)) ) + ATK_RATE(i); + + if( sd ) { if (skill_id && (i = pc_skillatk_bonus(sd, skill_id))) ATK_ADDRATE(i); - - if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) - ATK_RATE(i); if( skill_id != PA_SACRIFICE && skill_id != MO_INVESTIGATE && skill_id != CR_GRANDCROSS && skill_id != NPC_GRANDDARKNESS && skill_id != PA_SHIELDCHAIN && !flag.cri ) { //Elemental/Racial adjustments @@ -4094,7 +4093,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list if ((i = pc_skillatk_bonus(sd, skill_id))) ad.damage += ad.damage*i/100; - if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) + if( (i = battle_adjust_skill_damage(src->m,skill_id)) ) MATK_RATE(i); //Ignore Defense? @@ -4477,7 +4476,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * if (sd && (i = pc_skillatk_bonus(sd, skill_id))) md.damage += md.damage*i/100; - if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) ) + if( (i = battle_adjust_skill_damage(src->m,skill_id)) ) md.damage = md.damage * i / 100; if(md.damage < 0) -- cgit v1.2.3-70-g09d2 From 651d6857d7784f4f2a7412e0eae1681fc7ccd147 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 18:12:47 -0200 Subject: MySQL Update Checker: Updated Added a primary key to the `sql_updates` table (special thanks to Trojal) Modified the parser to ignore new/empty lines and added support for "//" comments in the index file. Signed-off-by: shennetsind --- sql-files/main.sql | 3 ++- sql-files/upgrades/2013-02-15--18-06.sql | 3 +++ sql-files/upgrades/index.txt | 3 ++- src/common/sql.c | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 sql-files/upgrades/2013-02-15--18-06.sql (limited to 'src') diff --git a/sql-files/main.sql b/sql-files/main.sql index fbdf40dde..42f57064e 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -639,7 +639,8 @@ CREATE TABLE IF NOT EXISTS `skill_homunculus` ( CREATE TABLE IF NOT EXISTS `sql_updates` ( `timestamp` int(11) unsigned NOT NULL, - `ignored` enum('Yes','No') NOT NULL DEFAULT 'No' + `ignored` enum('Yes','No') NOT NULL DEFAULT 'No', + PRIMARY KEY (`timestamp`) ) ENGINE=MyISAM; -- Existent updates to enter diff --git a/sql-files/upgrades/2013-02-15--18-06.sql b/sql-files/upgrades/2013-02-15--18-06.sql new file mode 100644 index 000000000..066693c70 --- /dev/null +++ b/sql-files/upgrades/2013-02-15--18-06.sql @@ -0,0 +1,3 @@ +#1360951560 +ALTER TABLE `sql_updates` ADD PRIMARY KEY(`timestamp`); +INSERT INTO `sql_updates` (`timestamp`) VALUES (1360951560); \ No newline at end of file diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index e0c49cbce..3d4df8c23 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -1 +1,2 @@ -2013-02-14--16-15.sql \ No newline at end of file +2013-02-14--16-15.sql +2013-02-15--18-06.sql \ No newline at end of file diff --git a/src/common/sql.c b/src/common/sql.c index fdb6e0114..c0ab19e4e 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1031,6 +1031,9 @@ void Sql_HerculesUpdateCheck(Sql* self) { char timestamp[11];// "1360186680" (10) + 1 FILE* ufp;/* upgrade fp */ + if( line[0] == '\n' || ( line[0] == '/' && line[1] == '/' ) )/* skip \n and "//" comments */ + continue; + sprintf(path,"sql-files/upgrades/%s",line); if( !( ufp = fopen(path, "r") ) ) { -- cgit v1.2.3-70-g09d2 From 126225b561859c8bdd3c2ae319ddeec15bbaca47 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 19:42:10 -0200 Subject: Fix to char.c::mmo_char_fromsql loading skill id and flag as USHORT while both are UCHAR Signed-off-by: shennetsind --- src/char/char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index 8be0134ba..effcd6c31 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1278,9 +1278,9 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_USHORT, &tmp_skill.id, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 1, SQLDT_USHORT, &tmp_skill.lv, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 2, SQLDT_USHORT, &tmp_skill.flag, 0, NULL, NULL) ) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_USHORT, &tmp_skill.id , 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 1, SQLDT_UCHAR , &tmp_skill.lv , 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 2, SQLDT_UCHAR , &tmp_skill.flag, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); if( tmp_skill.flag != SKILL_FLAG_PERM_GRANTED ) -- cgit v1.2.3-70-g09d2 From 2a83c9fb013e93fb16c34319f329be183da38d47 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 21:05:36 -0200 Subject: Modified GIT_ORIGIN macro Made it possible to modify the whole path, making it flexible to users with customised repositories -- special thanks to Trojal Signed-off-by: shennetsind --- src/common/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/core.c b/src/common/core.c index d1a374b29..73416497d 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -259,7 +259,7 @@ const char* get_svn_revision(void) } #endif /* whats our origin */ -#define GIT_ORIGIN "master" +#define GIT_ORIGIN "refs/remotes/origin/master" /* Grabs the hash from the last time the user updated his working copy (last pull) */ const char *get_git_hash (void) { static char HerculesGitHash[41] = "";//Sha(40) + 1 @@ -268,7 +268,7 @@ const char *get_git_hash (void) { if( HerculesGitHash[0] != '\0' ) return HerculesGitHash; - if ( (fp = fopen (".git/refs/remotes/origin/"GIT_ORIGIN, "r")) != NULL) { + if ( (fp = fopen (".git/"GIT_ORIGIN, "r")) != NULL) { char line[64]; char *rev = malloc (sizeof (char) * 50); -- cgit v1.2.3-70-g09d2 From 484c1b6ac438e58c66f5ff16b09e2cf07c8e1981 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 21:24:29 -0200 Subject: Updating core.h header Really I just need to commit to test something. Signed-off-by: shennetsind --- src/common/core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/core.h b/src/common/core.h index 8007e6036..dc4db6004 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _CORE_H_ #define _CORE_H_ -- cgit v1.2.3-70-g09d2 From 78b4db8a026e9e16367daa12eac03955815ef94c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 16 Feb 2013 17:37:50 -0200 Subject: Dropped _sql suffix in server names. Updated .gitignore to reflect this change, also renamed some other stuff to make their functionality clearer. Signed-off-by: shennetsind --- .gitignore | 20 +- Hercules-10.sln | 6 +- Hercules-12.sln | 6 +- Hercules-9.sln | 6 +- athena-start | 6 +- char-server.bat | 2 + char-server.sh | 6 +- charserv-sql.bat | 2 - login-server.bat | 2 + login-server.sh | 6 +- logserv-sql.bat | 2 - map-server.bat | 2 + map-server.sh | 6 +- mapserv-sql.bat | 2 - run-server.bat | 8 + runserver-sql.bat | 8 - serv.bat | 4 +- src/char/CMakeLists.txt | 16 +- src/char/Makefile.in | 14 +- src/login/Makefile.in | 8 +- src/login/sql/CMakeLists.txt | 18 +- src/map/Makefile.in | 8 +- src/map/sql/CMakeLists.txt | 18 +- vcproj-10/char-server.vcxproj | 213 ++++++++ vcproj-10/char-server.vcxproj.filters | 249 ++++++++++ vcproj-10/char-server_sql.vcxproj | 213 -------- vcproj-10/char-server_sql.vcxproj.filters | 249 ---------- vcproj-10/login-server.vcxproj | 199 ++++++++ vcproj-10/login-server.vcxproj.filters | 201 ++++++++ vcproj-10/login-server_sql.vcxproj | 199 -------- vcproj-10/login-server_sql.vcxproj.filters | 201 -------- vcproj-10/map-server.vcxproj | 283 +++++++++++ vcproj-10/map-server.vcxproj.filters | 425 ++++++++++++++++ vcproj-10/map-server_sql.vcxproj | 283 ----------- vcproj-10/map-server_sql.vcxproj.filters | 425 ---------------- vcproj-12/char-server.vcxproj | 216 ++++++++ vcproj-12/char-server.vcxproj.filters | 249 ++++++++++ vcproj-12/char-server_sql.vcxproj | 216 -------- vcproj-12/char-server_sql.vcxproj.filters | 249 ---------- vcproj-12/login-server.vcxproj | 203 ++++++++ vcproj-12/login-server.vcxproj.filters | 201 ++++++++ vcproj-12/login-server_sql.vcxproj | 203 -------- vcproj-12/login-server_sql.vcxproj.filters | 201 -------- vcproj-12/map-server.vcxproj | 287 +++++++++++ vcproj-12/map-server.vcxproj.filters | 425 ++++++++++++++++ vcproj-12/map-server_sql.vcxproj | 287 ----------- vcproj-12/map-server_sql.vcxproj.filters | 425 ---------------- vcproj-9/char-server.vcproj | 535 ++++++++++++++++++++ vcproj-9/char-server_sql.vcproj | 535 -------------------- vcproj-9/login-server.vcproj | 473 ++++++++++++++++++ vcproj-9/login-server_sql.vcproj | 473 ------------------ vcproj-9/map-server.vcproj | 774 +++++++++++++++++++++++++++++ vcproj-9/map-server_sql.vcproj | 774 ----------------------------- 53 files changed, 5027 insertions(+), 5015 deletions(-) create mode 100755 char-server.bat delete mode 100755 charserv-sql.bat create mode 100755 login-server.bat delete mode 100755 logserv-sql.bat create mode 100755 map-server.bat delete mode 100755 mapserv-sql.bat create mode 100755 run-server.bat delete mode 100755 runserver-sql.bat create mode 100644 vcproj-10/char-server.vcxproj create mode 100644 vcproj-10/char-server.vcxproj.filters delete mode 100644 vcproj-10/char-server_sql.vcxproj delete mode 100644 vcproj-10/char-server_sql.vcxproj.filters create mode 100644 vcproj-10/login-server.vcxproj create mode 100644 vcproj-10/login-server.vcxproj.filters delete mode 100644 vcproj-10/login-server_sql.vcxproj delete mode 100644 vcproj-10/login-server_sql.vcxproj.filters create mode 100644 vcproj-10/map-server.vcxproj create mode 100644 vcproj-10/map-server.vcxproj.filters delete mode 100644 vcproj-10/map-server_sql.vcxproj delete mode 100644 vcproj-10/map-server_sql.vcxproj.filters create mode 100644 vcproj-12/char-server.vcxproj create mode 100644 vcproj-12/char-server.vcxproj.filters delete mode 100644 vcproj-12/char-server_sql.vcxproj delete mode 100644 vcproj-12/char-server_sql.vcxproj.filters create mode 100644 vcproj-12/login-server.vcxproj create mode 100644 vcproj-12/login-server.vcxproj.filters delete mode 100644 vcproj-12/login-server_sql.vcxproj delete mode 100644 vcproj-12/login-server_sql.vcxproj.filters create mode 100644 vcproj-12/map-server.vcxproj create mode 100644 vcproj-12/map-server.vcxproj.filters delete mode 100644 vcproj-12/map-server_sql.vcxproj delete mode 100644 vcproj-12/map-server_sql.vcxproj.filters create mode 100644 vcproj-9/char-server.vcproj delete mode 100644 vcproj-9/char-server_sql.vcproj create mode 100644 vcproj-9/login-server.vcproj delete mode 100644 vcproj-9/login-server_sql.vcproj create mode 100644 vcproj-9/map-server.vcproj delete mode 100644 vcproj-9/map-server_sql.vcproj (limited to 'src') diff --git a/.gitignore b/.gitignore index 447365f22..7d981021d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,17 +13,20 @@ /*.sdf /*.stackdump /*.suo -/char-server_sql +/char-server /config.log /config.status /core /ipch -/login-server_sql +/login-server /Makefile /Makefile.cache -/map-server_sql +/map-server /mapcache +#OSX Xcode project user-sensitive-stuff +/Hercules + # /3rdparty/libconfig/ /3rdparty/libconfig/Makefile /3rdparty/libconfig/*.o @@ -37,7 +40,7 @@ # /log/ /log/*.log -/log/map-server_sql.leaks +/log/*.leaks # /src/char/ /src/char/Makefile @@ -76,6 +79,9 @@ /tools/*.pdb # /vcproj-12/ +/vcproj-12/map-server +/vcproj-12/char-server +/vcproj-12/login-server /vcproj-12/char-server_sql /vcproj-12/login-server_sql /vcproj-12/mapcache @@ -83,6 +89,9 @@ /vcproj-12/*.user # /vcproj-10/ +/vcproj-10/map-server +/vcproj-10/char-server +/vcproj-10/login-server /vcproj-10/char-server_sql /vcproj-10/login-server_sql /vcproj-10/mapcache @@ -91,6 +100,9 @@ # /vcproj-9/ /vcproj-9/*.user +/vcproj-9/char-server +/vcproj-9/login-server +/vcproj-9/map-server /vcproj-9/char-server_sql /vcproj-9/login-server_sql /vcproj-9/map-server_sql diff --git a/Hercules-10.sln b/Hercules-10.sln index ea8847037..a740ee0b1 100644 --- a/Hercules-10.sln +++ b/Hercules-10.sln @@ -1,10 +1,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-10\char-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-10\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-10\login-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-10\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-10\map-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-10\map-server.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapcache.vcxproj", "{D356871D-58E1-450B-967A-E7E9646175AF}" EndProject diff --git a/Hercules-12.sln b/Hercules-12.sln index e38ab4cbd..4f271290f 100644 --- a/Hercules-12.sln +++ b/Hercules-12.sln @@ -1,11 +1,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-12\char-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-12\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-12\login-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-12\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-12\map-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-12\map-server.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-12\mapcache.vcxproj", "{D356871D-58E1-450B-967A-E7E9646175AF}" EndProject diff --git a/Hercules-9.sln b/Hercules-9.sln index 8ea06598a..7159e3f7f 100644 --- a/Hercules-9.sln +++ b/Hercules-9.sln @@ -1,10 +1,10 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-9\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-9\char-server.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-9\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-9\login-server.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-9\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-9\map-server.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-9\mapcache.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}" EndProject diff --git a/athena-start b/athena-start index 2b9fcc38e..eb3dbdf5a 100755 --- a/athena-start +++ b/athena-start @@ -4,9 +4,9 @@ PATH=./:$PATH -L_SRV=login-server_sql -C_SRV=char-server_sql -M_SRV=map-server_sql +L_SRV=login-server +C_SRV=char-server +M_SRV=map-server print_start() { # more << EOF diff --git a/char-server.bat b/char-server.bat new file mode 100755 index 000000000..c88168475 --- /dev/null +++ b/char-server.bat @@ -0,0 +1,2 @@ +@ECHO OFF +CALL serv.bat char-server_sql.exe Char-Server diff --git a/char-server.sh b/char-server.sh index 9e7e6840a..9f4bf41b1 100644 --- a/char-server.sh +++ b/char-server.sh @@ -5,10 +5,10 @@ ulimit -Sc unlimited while [ 3 ] ; do if [ -f .stopserver3 ] ; then -echo server marked down >> servlog.txt +echo server marked down >> server-log.txt else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./char-server_sql +echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> start-log.txt +./char-server fi sleep 5 diff --git a/charserv-sql.bat b/charserv-sql.bat deleted file mode 100755 index c88168475..000000000 --- a/charserv-sql.bat +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -CALL serv.bat char-server_sql.exe Char-Server diff --git a/login-server.bat b/login-server.bat new file mode 100755 index 000000000..e38daa6d5 --- /dev/null +++ b/login-server.bat @@ -0,0 +1,2 @@ +@ECHO OFF +CALL serv.bat login-server_sql.exe Login-Server diff --git a/login-server.sh b/login-server.sh index 5cddb968a..45990a645 100644 --- a/login-server.sh +++ b/login-server.sh @@ -5,10 +5,10 @@ ulimit -Sc unlimited while [ 2 ] ; do if [ -f .stopserver2 ] ; then -echo server marked down >> servlog.txt +echo server marked down >> server-log.txt else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./login-server_sql +echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> start-log.txt +./login-server fi sleep 5 diff --git a/logserv-sql.bat b/logserv-sql.bat deleted file mode 100755 index e38daa6d5..000000000 --- a/logserv-sql.bat +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -CALL serv.bat login-server_sql.exe Login-Server diff --git a/map-server.bat b/map-server.bat new file mode 100755 index 000000000..9938a25f1 --- /dev/null +++ b/map-server.bat @@ -0,0 +1,2 @@ +@ECHO OFF +CALL serv.bat map-server_sql.exe Map-Server diff --git a/map-server.sh b/map-server.sh index d1acd8f69..0a9cdd00d 100644 --- a/map-server.sh +++ b/map-server.sh @@ -5,10 +5,10 @@ ulimit -Sc unlimited while [ 1 ] ; do if [ -f .stopserver ] ; then -echo server marked down >> servlog.txt +echo server marked down >> server-log.txt else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./map-server_sql +echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> start-log.txt +./map-server fi sleep 5 diff --git a/mapserv-sql.bat b/mapserv-sql.bat deleted file mode 100755 index 9938a25f1..000000000 --- a/mapserv-sql.bat +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -CALL serv.bat map-server_sql.exe Map-Server diff --git a/run-server.bat b/run-server.bat new file mode 100755 index 000000000..f111acf46 --- /dev/null +++ b/run-server.bat @@ -0,0 +1,8 @@ +@echo off +rem This is and auto-restart script for the rAthena Ragnarok Online Server Emulator. +rem It will also keep the map server OPEN after it crashes to that errors may be +rem more easily identified +rem Writen by Jbain +start cmd /k logserv-sql.bat +start cmd /k charserv-sql.bat +start cmd /k mapserv-sql.bat diff --git a/runserver-sql.bat b/runserver-sql.bat deleted file mode 100755 index f111acf46..000000000 --- a/runserver-sql.bat +++ /dev/null @@ -1,8 +0,0 @@ -@echo off -rem This is and auto-restart script for the rAthena Ragnarok Online Server Emulator. -rem It will also keep the map server OPEN after it crashes to that errors may be -rem more easily identified -rem Writen by Jbain -start cmd /k logserv-sql.bat -start cmd /k charserv-sql.bat -start cmd /k mapserv-sql.bat diff --git a/serv.bat b/serv.bat index 6e8037faa..cc7d37e20 100755 --- a/serv.bat +++ b/serv.bat @@ -47,8 +47,8 @@ ECHO %2 has crashed! GOTO RESTART_NT :DIRECT -ECHO Do not run this file directly. It is used by logserv.bat, charserv.bat, -ECHO mapserv.bat and their '-sql' counterparts. +ECHO Do not run this file directly. It is used by login-server.bat, char-server.bat, +ECHO and map-server.bat GOTO END :NOTFOUND diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt index 22b793bef..8c71a3b4c 100644 --- a/src/char/CMakeLists.txt +++ b/src/char/CMakeLists.txt @@ -9,7 +9,7 @@ set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) # char sql # if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target char-server_sql" ) +message( STATUS "Creating target char-server" ) set( SQL_CHAR_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/char.h" "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.h" @@ -46,15 +46,15 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADER source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) source_group( char FILES ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} ) include_directories( ${INCLUDE_DIRS} ) -add_executable( char-server_sql ${SOURCE_FILES} ) -add_dependencies( char-server_sql ${DEPENDENCIES} ) -target_link_libraries( char-server_sql ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( char-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) +add_executable( char-server ${SOURCE_FILES} ) +add_dependencies( char-server ${DEPENDENCIES} ) +target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} ) +set_target_properties( char-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server_sql" GROUP Runtime ) - install( TARGETS char-server_sql + cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server" GROUP Runtime ) + install( TARGETS char-server DESTINATION "." COMPONENT Runtime_charserver_sql ) endif( INSTALL_COMPONENT_RUNTIME ) -message( STATUS "Creating target char-server_sql - done" ) +message( STATUS "Creating target char-server - done" ) endif( BUILD_SQL_SERVERS ) diff --git a/src/char/Makefile.in b/src/char/Makefile.in index bfe9d1585..a64145dea 100644 --- a/src/char/Makefile.in +++ b/src/char/Makefile.in @@ -29,21 +29,21 @@ endif @SET_MAKE@ ##################################################################### -.PHONY : all char-server_sql clean help +.PHONY : all char-server clean help -all: char-server_sql +all: char-server -char-server_sql: $(CHAR_SERVER_SQL_DEPENDS) +char-server: $(CHAR_SERVER_SQL_DEPENDS) @echo " LD $@" - @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @@CC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ clean: @echo " CLEAN char" - @rm -rf *.o obj_sql ../../char-server_sql@EXEEXT@ + @rm -rf *.o obj_sql ../../char-server@EXEEXT@ help: - @echo "possible targets are 'char-server_sql' 'all' 'clean' 'help'" - @echo "'char-server_sql' - char server (SQL version)" + @echo "possible targets are 'char-server' 'all' 'clean' 'help'" + @echo "'char-server' - char server (SQL version)" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" @echo "'help' - outputs this message" diff --git a/src/login/Makefile.in b/src/login/Makefile.in index d0fc34756..543b31b93 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -31,11 +31,11 @@ endif all: sql -sql: obj_sql login-server_sql +sql: obj_sql login-server clean: @echo " CLEAN login" - @rm -rf *.o obj_sql ../../login-server@EXEEXT@ ../../login-server_sql@EXEEXT@ + @rm -rf *.o obj_sql ../../login-server@EXEEXT@ ../../login-server@EXEEXT@ help: @echo "possible targets are 'sql' 'all' 'clean' 'help'" @@ -58,9 +58,9 @@ obj_sql: #executables -login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS) +login-server: $(LOGIN_SERVER_SQL_DEPENDS) @echo " LD $@" - @@CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @@CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ # login object files diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt index 1355f17ee..46cf4db02 100644 --- a/src/login/sql/CMakeLists.txt +++ b/src/login/sql/CMakeLists.txt @@ -3,7 +3,7 @@ # login sql # if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target login-server_sql" ) +message( STATUS "Creating target login-server" ) set( SQL_LOGIN_HEADERS "${SQL_LOGIN_SOURCE_DIR}/account.h" "${SQL_LOGIN_SOURCE_DIR}/ipban.h" @@ -24,16 +24,16 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADE source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) source_group( login FILES ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} ) include_directories( ${INCLUDE_DIRS} ) -add_executable( login-server_sql ${SOURCE_FILES} ) -add_dependencies( login-server_sql ${DEPENDENCIES} ) -target_link_libraries( login-server_sql ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( login-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) +add_executable( login-server ${SOURCE_FILES} ) +add_dependencies( login-server ${DEPENDENCIES} ) +target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} ) +set_target_properties( login-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server_sql" GROUP Runtime ) - install( TARGETS login-server_sql + cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server" GROUP Runtime ) + install( TARGETS login-server DESTINATION "." COMPONENT Runtime_loginserver_sql ) endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} login-server_sql CACHE INTERNAL "" ) -message( STATUS "Creating target login-server_sql - done" ) +set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" ) +message( STATUS "Creating target login-server - done" ) endif( BUILD_SQL_SERVERS ) diff --git a/src/map/Makefile.in b/src/map/Makefile.in index 8e97221a7..d2c9d63d0 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -32,7 +32,7 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) ALL_DEPENDS=txt sql - SQL_DEPENDS=map-server_sql + SQL_DEPENDS=map-server else ALL_TARGET=txt SQL_DEPENDS=needs_mysql @@ -59,7 +59,7 @@ sql: $(SQL_DEPENDS) clean: @echo " CLEAN map" - @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server_sql@EXEEXT@ + @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server@EXEEXT@ help: ifeq ($(HAVE_MYSQL),yes) @@ -90,9 +90,9 @@ obj_sql: # executables -map-server_sql: obj_sql $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a +map-server: obj_sql $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a @echo " LD $@" - @@CC@ @LDFLAGS@ -o ../../map-server_sql@EXEEXT@ $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@ + @@CC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@ # map object files diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt index 47c8e495c..1d8bd5fe2 100644 --- a/src/map/sql/CMakeLists.txt +++ b/src/map/sql/CMakeLists.txt @@ -3,7 +3,7 @@ # map sql # if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target map-server_sql" ) +message( STATUS "Creating target map-server" ) set( SQL_MAP_HEADERS "${SQL_MAP_SOURCE_DIR}/atcommand.h" "${SQL_MAP_SOURCE_DIR}/battle.h" @@ -97,16 +97,16 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} ) include_directories( ${INCLUDE_DIRS} ) -add_executable( map-server_sql ${SOURCE_FILES} ) -add_dependencies( map-server_sql ${DEPENDENCIES} ) -target_link_libraries( map-server_sql ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( map-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) +add_executable( map-server ${SOURCE_FILES} ) +add_dependencies( map-server ${DEPENDENCIES} ) +target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} ) +set_target_properties( map-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server_sql" GROUP Runtime ) - install( TARGETS map-server_sql + cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server" GROUP Runtime ) + install( TARGETS map-server DESTINATION "." COMPONENT Runtime_mapserver_sql ) endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} map-server_sql CACHE INTERNAL "" ) -message( STATUS "Creating target map-server_sql - done" ) +set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" ) +message( STATUS "Creating target map-server - done" ) endif( BUILD_SQL_SERVERS ) diff --git a/vcproj-10/char-server.vcxproj b/vcproj-10/char-server.vcxproj new file mode 100644 index 000000000..4900ffc91 --- /dev/null +++ b/vcproj-10/char-server.vcxproj @@ -0,0 +1,213 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E4E9646175AF} + char-server_sql + Win32Proj + $(VCTargetsPath11) + + + + Application + MultiByte + true + + + Application + MultiByte + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + char-server_sql + char-server_sql + + + + Disabled + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LIBCONFIG_STATIC;YY_USE_CONST;FD_SETSIZE=4096;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + Level3 + ProgramDatabase + CompileAsC + 4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcproj-10/char-server.vcxproj.filters b/vcproj-10/char-server.vcxproj.filters new file mode 100644 index 000000000..06f69e35e --- /dev/null +++ b/vcproj-10/char-server.vcxproj.filters @@ -0,0 +1,249 @@ +サソ + + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {623f21b1-c166-4848-83d8-8b4fe0e2e2df} + + + {83b1ecf5-21d1-4dac-915f-95ff77a90899} + + + {b3f5c857-79c0-4a55-b8c5-7e7f56a8f948} + + + {847768ab-8c4b-431b-8667-00f8ae3b915c} + + + {9e8badd7-548f-4eb4-9e87-613e87e772ff} + + + \ No newline at end of file diff --git a/vcproj-10/char-server_sql.vcxproj b/vcproj-10/char-server_sql.vcxproj deleted file mode 100644 index 4900ffc91..000000000 --- a/vcproj-10/char-server_sql.vcxproj +++ /dev/null @@ -1,213 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E4E9646175AF} - char-server_sql - Win32Proj - $(VCTargetsPath11) - - - - Application - MultiByte - true - - - Application - MultiByte - v100 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - char-server_sql - char-server_sql - - - - Disabled - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LIBCONFIG_STATIC;YY_USE_CONST;FD_SETSIZE=4096;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - Level3 - ProgramDatabase - CompileAsC - 4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vcproj-10/char-server_sql.vcxproj.filters b/vcproj-10/char-server_sql.vcxproj.filters deleted file mode 100644 index 06f69e35e..000000000 --- a/vcproj-10/char-server_sql.vcxproj.filters +++ /dev/null @@ -1,249 +0,0 @@ -サソ - - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {623f21b1-c166-4848-83d8-8b4fe0e2e2df} - - - {83b1ecf5-21d1-4dac-915f-95ff77a90899} - - - {b3f5c857-79c0-4a55-b8c5-7e7f56a8f948} - - - {847768ab-8c4b-431b-8667-00f8ae3b915c} - - - {9e8badd7-548f-4eb4-9e87-613e87e772ff} - - - \ No newline at end of file diff --git a/vcproj-10/login-server.vcxproj b/vcproj-10/login-server.vcxproj new file mode 100644 index 000000000..a9e693676 --- /dev/null +++ b/vcproj-10/login-server.vcxproj @@ -0,0 +1,199 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E5E9646175AF} + login-server_sql + Win32Proj + + + + Application + MultiByte + true + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + login-server_sql + login-server_sql + + + + Disabled + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4100;4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + + + + + Level3 + ProgramDatabase + CompileAsC + 4100;4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcproj-10/login-server.vcxproj.filters b/vcproj-10/login-server.vcxproj.filters new file mode 100644 index 000000000..f4280a018 --- /dev/null +++ b/vcproj-10/login-server.vcxproj.filters @@ -0,0 +1,201 @@ +サソ + + + + login_sql + + + login_sql + + + login_sql + + + login_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + login_sql + + + login_sql + + + login_sql + + + login_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {b50ee803-e71d-4d41-8f7d-2dad5839df50} + + + {8eea96ed-d379-4694-ae2e-ffb0be95170c} + + + {ab5c90ec-923d-4847-a214-45b40818211e} + + + {68e3bcee-28d9-4b2d-8701-614d50f32999} + + + {779e8145-9bb2-4a88-9149-60586ab0bdd4} + + + \ No newline at end of file diff --git a/vcproj-10/login-server_sql.vcxproj b/vcproj-10/login-server_sql.vcxproj deleted file mode 100644 index a9e693676..000000000 --- a/vcproj-10/login-server_sql.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E5E9646175AF} - login-server_sql - Win32Proj - - - - Application - MultiByte - true - - - Application - MultiByte - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - login-server_sql - login-server_sql - - - - Disabled - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4100;4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - - - - - Level3 - ProgramDatabase - CompileAsC - 4100;4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vcproj-10/login-server_sql.vcxproj.filters b/vcproj-10/login-server_sql.vcxproj.filters deleted file mode 100644 index f4280a018..000000000 --- a/vcproj-10/login-server_sql.vcxproj.filters +++ /dev/null @@ -1,201 +0,0 @@ -サソ - - - - login_sql - - - login_sql - - - login_sql - - - login_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - login_sql - - - login_sql - - - login_sql - - - login_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {b50ee803-e71d-4d41-8f7d-2dad5839df50} - - - {8eea96ed-d379-4694-ae2e-ffb0be95170c} - - - {ab5c90ec-923d-4847-a214-45b40818211e} - - - {68e3bcee-28d9-4b2d-8701-614d50f32999} - - - {779e8145-9bb2-4a88-9149-60586ab0bdd4} - - - \ No newline at end of file diff --git a/vcproj-10/map-server.vcxproj b/vcproj-10/map-server.vcxproj new file mode 100644 index 000000000..9d7543e02 --- /dev/null +++ b/vcproj-10/map-server.vcxproj @@ -0,0 +1,283 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E6E9646175AF} + map-server_sql + Win32Proj + + + + Application + MultiByte + true + + + Application + MultiByte + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + map-server_sql + map-server_sql + + + + Disabled + ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4018;4100;4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + Level3 + ProgramDatabase + CompileAsC + 4018;4100;4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-10/map-server.vcxproj.filters b/vcproj-10/map-server.vcxproj.filters new file mode 100644 index 000000000..72ad44246 --- /dev/null +++ b/vcproj-10/map-server.vcxproj.filters @@ -0,0 +1,425 @@ +サソ + + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + map_sql + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + + + + + + common + + + map_sql + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {3a137217-ebf7-44ee-95d9-3d7c51d2a199} + + + {8c01a080-5a78-4fb7-96f2-862c33a02230} + + + {c4845ea8-bcc7-411b-af29-e3842adb6714} + + + {fcf23386-ddba-4a72-9b41-62f8e2d0e6c0} + + + {9caf40b7-c4d1-43b4-bd1f-0376b4f920e7} + + + \ No newline at end of file diff --git a/vcproj-10/map-server_sql.vcxproj b/vcproj-10/map-server_sql.vcxproj deleted file mode 100644 index 9d7543e02..000000000 --- a/vcproj-10/map-server_sql.vcxproj +++ /dev/null @@ -1,283 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E6E9646175AF} - map-server_sql - Win32Proj - - - - Application - MultiByte - true - - - Application - MultiByte - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - map-server_sql - map-server_sql - - - - Disabled - ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4018;4100;4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - Level3 - ProgramDatabase - CompileAsC - 4018;4100;4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcproj-10/map-server_sql.vcxproj.filters b/vcproj-10/map-server_sql.vcxproj.filters deleted file mode 100644 index 72ad44246..000000000 --- a/vcproj-10/map-server_sql.vcxproj.filters +++ /dev/null @@ -1,425 +0,0 @@ -サソ - - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - map_sql - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - - - - - - common - - - map_sql - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {3a137217-ebf7-44ee-95d9-3d7c51d2a199} - - - {8c01a080-5a78-4fb7-96f2-862c33a02230} - - - {c4845ea8-bcc7-411b-af29-e3842adb6714} - - - {fcf23386-ddba-4a72-9b41-62f8e2d0e6c0} - - - {9caf40b7-c4d1-43b4-bd1f-0376b4f920e7} - - - \ No newline at end of file diff --git a/vcproj-12/char-server.vcxproj b/vcproj-12/char-server.vcxproj new file mode 100644 index 000000000..0fb39a79a --- /dev/null +++ b/vcproj-12/char-server.vcxproj @@ -0,0 +1,216 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E4E9646175AF} + char-server_sql + Win32Proj + $(VCTargetsPath11) + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + char-server_sql + char-server_sql + + + + Disabled + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + false + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LIBCONFIG_STATIC;YY_USE_CONST;FD_SETSIZE=4096;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + Level3 + ProgramDatabase + CompileAsC + 4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-12/char-server.vcxproj.filters new file mode 100644 index 000000000..06f69e35e --- /dev/null +++ b/vcproj-12/char-server.vcxproj.filters @@ -0,0 +1,249 @@ +サソ + + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + char_sql + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {623f21b1-c166-4848-83d8-8b4fe0e2e2df} + + + {83b1ecf5-21d1-4dac-915f-95ff77a90899} + + + {b3f5c857-79c0-4a55-b8c5-7e7f56a8f948} + + + {847768ab-8c4b-431b-8667-00f8ae3b915c} + + + {9e8badd7-548f-4eb4-9e87-613e87e772ff} + + + \ No newline at end of file diff --git a/vcproj-12/char-server_sql.vcxproj b/vcproj-12/char-server_sql.vcxproj deleted file mode 100644 index 0fb39a79a..000000000 --- a/vcproj-12/char-server_sql.vcxproj +++ /dev/null @@ -1,216 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E4E9646175AF} - char-server_sql - Win32Proj - $(VCTargetsPath11) - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - char-server_sql - char-server_sql - - - - Disabled - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - false - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LIBCONFIG_STATIC;YY_USE_CONST;FD_SETSIZE=4096;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - Level3 - ProgramDatabase - CompileAsC - 4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vcproj-12/char-server_sql.vcxproj.filters b/vcproj-12/char-server_sql.vcxproj.filters deleted file mode 100644 index 06f69e35e..000000000 --- a/vcproj-12/char-server_sql.vcxproj.filters +++ /dev/null @@ -1,249 +0,0 @@ -サソ - - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - char_sql - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {623f21b1-c166-4848-83d8-8b4fe0e2e2df} - - - {83b1ecf5-21d1-4dac-915f-95ff77a90899} - - - {b3f5c857-79c0-4a55-b8c5-7e7f56a8f948} - - - {847768ab-8c4b-431b-8667-00f8ae3b915c} - - - {9e8badd7-548f-4eb4-9e87-613e87e772ff} - - - \ No newline at end of file diff --git a/vcproj-12/login-server.vcxproj b/vcproj-12/login-server.vcxproj new file mode 100644 index 000000000..aa766b972 --- /dev/null +++ b/vcproj-12/login-server.vcxproj @@ -0,0 +1,203 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E5E9646175AF} + login-server_sql + Win32Proj + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + login-server_sql + login-server_sql + + + + Disabled + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4100;4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + false + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + + + + + Level3 + ProgramDatabase + CompileAsC + 4100;4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-12/login-server.vcxproj.filters new file mode 100644 index 000000000..f4280a018 --- /dev/null +++ b/vcproj-12/login-server.vcxproj.filters @@ -0,0 +1,201 @@ +サソ + + + + login_sql + + + login_sql + + + login_sql + + + login_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + login_sql + + + login_sql + + + login_sql + + + login_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {b50ee803-e71d-4d41-8f7d-2dad5839df50} + + + {8eea96ed-d379-4694-ae2e-ffb0be95170c} + + + {ab5c90ec-923d-4847-a214-45b40818211e} + + + {68e3bcee-28d9-4b2d-8701-614d50f32999} + + + {779e8145-9bb2-4a88-9149-60586ab0bdd4} + + + \ No newline at end of file diff --git a/vcproj-12/login-server_sql.vcxproj b/vcproj-12/login-server_sql.vcxproj deleted file mode 100644 index aa766b972..000000000 --- a/vcproj-12/login-server_sql.vcxproj +++ /dev/null @@ -1,203 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E5E9646175AF} - login-server_sql - Win32Proj - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - login-server_sql - login-server_sql - - - - Disabled - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4100;4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - false - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\libconfig;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - - - - - Level3 - ProgramDatabase - CompileAsC - 4100;4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vcproj-12/login-server_sql.vcxproj.filters b/vcproj-12/login-server_sql.vcxproj.filters deleted file mode 100644 index f4280a018..000000000 --- a/vcproj-12/login-server_sql.vcxproj.filters +++ /dev/null @@ -1,201 +0,0 @@ -サソ - - - - login_sql - - - login_sql - - - login_sql - - - login_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - login_sql - - - login_sql - - - login_sql - - - login_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {b50ee803-e71d-4d41-8f7d-2dad5839df50} - - - {8eea96ed-d379-4694-ae2e-ffb0be95170c} - - - {ab5c90ec-923d-4847-a214-45b40818211e} - - - {68e3bcee-28d9-4b2d-8701-614d50f32999} - - - {779e8145-9bb2-4a88-9149-60586ab0bdd4} - - - \ No newline at end of file diff --git a/vcproj-12/map-server.vcxproj b/vcproj-12/map-server.vcxproj new file mode 100644 index 000000000..b01033971 --- /dev/null +++ b/vcproj-12/map-server.vcxproj @@ -0,0 +1,287 @@ +サソ + + + + Debug + Win32 + + + Release + Win32 + + + + {D356871D-58E1-450B-967A-E6E9646175AF} + map-server_sql + Win32Proj + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\ + $(ProjectName)\$(Configuration)\ + true + ..\ + $(ProjectName)\$(Configuration)\ + false + map-server_sql + map-server_sql + + + + Disabled + ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + false + false + + + EnableFastChecks + MultiThreadedDebug + true + + + + + Level3 + EditAndContinue + CompileAsC + 4018;4100;4800;%(DisableSpecificWarnings) + true + + + libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + false + + + MachineX86 + false + + + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) + WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + Level3 + ProgramDatabase + CompileAsC + 4018;4100;4800;%(DisableSpecificWarnings) + true + + + libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) + true + %(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + Console + true + true + UseLinkTimeCodeGeneration + false + + + MachineX86 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-12/map-server.vcxproj.filters b/vcproj-12/map-server.vcxproj.filters new file mode 100644 index 000000000..72ad44246 --- /dev/null +++ b/vcproj-12/map-server.vcxproj.filters @@ -0,0 +1,425 @@ +サソ + + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + map_sql + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + map_sql + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + common + + + + + + + + common + + + map_sql + + + common + + + 3rdparty\mt19937ar + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + 3rdparty\libconfig + + + common + + + common + + + common + + + common + + + common + + + + + {3a137217-ebf7-44ee-95d9-3d7c51d2a199} + + + {8c01a080-5a78-4fb7-96f2-862c33a02230} + + + {c4845ea8-bcc7-411b-af29-e3842adb6714} + + + {fcf23386-ddba-4a72-9b41-62f8e2d0e6c0} + + + {9caf40b7-c4d1-43b4-bd1f-0376b4f920e7} + + + \ No newline at end of file diff --git a/vcproj-12/map-server_sql.vcxproj b/vcproj-12/map-server_sql.vcxproj deleted file mode 100644 index b01033971..000000000 --- a/vcproj-12/map-server_sql.vcxproj +++ /dev/null @@ -1,287 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - {D356871D-58E1-450B-967A-E6E9646175AF} - map-server_sql - Win32Proj - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\ - $(ProjectName)\$(Configuration)\ - true - ..\ - $(ProjectName)\$(Configuration)\ - false - map-server_sql - map-server_sql - - - - Disabled - ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - false - false - - - EnableFastChecks - MultiThreadedDebug - true - - - - - Level3 - EditAndContinue - CompileAsC - 4018;4100;4800;%(DisableSpecificWarnings) - true - - - libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - false - - - MachineX86 - false - - - - - MaxSpeed - AnySuitable - true - Speed - true - true - true - ..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories) - WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions) - true - MultiThreaded - - - - - Level3 - ProgramDatabase - CompileAsC - 4018;4100;4800;%(DisableSpecificWarnings) - true - - - libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - ..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories) - true - %(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX86 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcproj-12/map-server_sql.vcxproj.filters b/vcproj-12/map-server_sql.vcxproj.filters deleted file mode 100644 index 72ad44246..000000000 --- a/vcproj-12/map-server_sql.vcxproj.filters +++ /dev/null @@ -1,425 +0,0 @@ -サソ - - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - map_sql - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - map_sql - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - - - - - - common - - - map_sql - - - common - - - 3rdparty\mt19937ar - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - 3rdparty\libconfig - - - common - - - common - - - common - - - common - - - common - - - - - {3a137217-ebf7-44ee-95d9-3d7c51d2a199} - - - {8c01a080-5a78-4fb7-96f2-862c33a02230} - - - {c4845ea8-bcc7-411b-af29-e3842adb6714} - - - {fcf23386-ddba-4a72-9b41-62f8e2d0e6c0} - - - {9caf40b7-c4d1-43b4-bd1f-0376b4f920e7} - - - \ No newline at end of file diff --git a/vcproj-9/char-server.vcproj b/vcproj-9/char-server.vcproj new file mode 100644 index 000000000..3933e5c6b --- /dev/null +++ b/vcproj-9/char-server.vcproj @@ -0,0 +1,535 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-9/char-server_sql.vcproj b/vcproj-9/char-server_sql.vcproj deleted file mode 100644 index 3933e5c6b..000000000 --- a/vcproj-9/char-server_sql.vcproj +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcproj-9/login-server.vcproj b/vcproj-9/login-server.vcproj new file mode 100644 index 000000000..a8d633997 --- /dev/null +++ b/vcproj-9/login-server.vcproj @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-9/login-server_sql.vcproj b/vcproj-9/login-server_sql.vcproj deleted file mode 100644 index a8d633997..000000000 --- a/vcproj-9/login-server_sql.vcproj +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcproj-9/map-server.vcproj b/vcproj-9/map-server.vcproj new file mode 100644 index 000000000..8b85ad3b3 --- /dev/null +++ b/vcproj-9/map-server.vcproj @@ -0,0 +1,774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-9/map-server_sql.vcproj b/vcproj-9/map-server_sql.vcproj deleted file mode 100644 index 8b85ad3b3..000000000 --- a/vcproj-9/map-server_sql.vcproj +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3-70-g09d2 From d7ce0c1ce8c4d9118d1340e48424ad9deae0da09 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 16 Feb 2013 18:39:14 -0200 Subject: Fixed Bug #7070 Character's online states are now updated as soon as they attempt a char select, instead of at the end of the procedure. This improves reliability with 3rd party software e.g. control panels. Signed-off-by: shennetsind --- src/char/char.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index effcd6c31..8b75f6394 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3768,7 +3768,18 @@ int parse_char(int fd) char_id = atoi(data); Sql_FreeResult(sql_handle); - mmo_char_fromsql(char_id, &char_dat, true); + + /* set char as online prior to loading its data so 3rd party applications will realise the sql data is not reliable */ + set_char_online(-2,char_id,sd->account_id); + if( !mmo_char_fromsql(char_id, &char_dat, true) ) { /* failed? set it back offline */ + set_char_offline(char_id, sd->account_id); + /* failed to load something. REJECT! */ + WFIFOHEAD(fd,3); + WFIFOW(fd,0) = 0x6c; + WFIFOB(fd,2) = 0; + WFIFOSET(fd,3); + break;/* jump off this boat */ + } //Have to switch over to the DB instance otherwise data won't propagate [Kevin] cd = (struct mmo_charstatus *)idb_get(char_db_, char_id); @@ -3867,8 +3878,6 @@ int parse_char(int fd) node->ip = ipl; idb_put(auth_db, sd->account_id, node); - set_char_online(-2,node->char_id,sd->account_id); - } break; -- cgit v1.2.3-70-g09d2 From d8280002947c462b0bb731c12c20efc301ccb891 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 16 Feb 2013 19:30:21 -0200 Subject: Minor changes; check description Login and Char servers will now exit when failing to bind to the port (as map server has always done). Moved Sql_HerculesUpdateCheck() to be run before "server is 'ready' " thing for layout-purposes. Signed-off-by: shennetsind --- src/char/char.c | 12 +++++++++--- src/login/login.c | 19 ++++++++++--------- src/map/clif.c | 2 +- src/map/map.c | 4 ++-- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index 8b75f6394..b6c88623c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -4830,10 +4830,16 @@ int do_init(int argc, char **argv) Sql_ShowDebug(sql_handle); set_defaultparse(parse_char); - char_fd = make_listen_bind(bind_ip, char_port); - ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); - + + if( (char_fd = make_listen_bind(bind_ip,char_port)) == -1 ) { + ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",char_port); + exit(EXIT_FAILURE); + } + Sql_HerculesUpdateCheck(sql_handle); + + ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); + if( runflag != CORE_ST_STOP ) { shutdown_callback = do_shutdown; diff --git a/src/login/login.c b/src/login/login.c index c7e250040..984326532 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1863,24 +1863,25 @@ int do_init(int argc, char** argv) } } - if( login_config.console ) - { + if( login_config.console ) { //##TODO invoke a CONSOLE_START plugin event } - // server port open & binding - login_fd = make_listen_bind(login_config.login_ip, login_config.login_port); + // server port open & binding + if( (login_fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) { + ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port); + exit(EXIT_FAILURE); + } - if( runflag != CORE_ST_STOP ) - { + if( runflag != CORE_ST_STOP ) { shutdown_callback = do_shutdown; runflag = LOGINSERVER_ST_RUNNING; } - ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port); - login_log(0, "login server", 100, "login server started"); - account_db_sql_up(accounts); + ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port); + login_log(0, "login server", 100, "login server started"); + return 0; } diff --git a/src/map/clif.c b/src/map/clif.c index 6d9e57bd2..7b4025b9d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17119,7 +17119,7 @@ int do_init_clif(void) { set_defaultparse(clif_parse); if( make_listen_bind(bind_ip,map_port) == -1 ) { - ShowFatalError("can't bind game port\n"); + ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",map_port); exit(EXIT_FAILURE); } diff --git a/src/map/map.c b/src/map/map.c index dde922f39..901234687 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3985,10 +3985,10 @@ int do_init(int argc, char *argv[]) if (battle_config.pk_mode) ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n"); - ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port); - Sql_HerculesUpdateCheck(mmysql_handle); + ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port); + if( runflag != CORE_ST_STOP ) { shutdown_callback = do_shutdown; -- cgit v1.2.3-70-g09d2 From dac7186c370db4fa7d15fc0d223a6cfecb0e810b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 16 Feb 2013 19:43:15 -0200 Subject: Updating the Headers across source files And adding missing ones. Signed-off-by: shennetsind --- src/char/char.c | 5 +++-- src/char/int_guild.c | 2 +- src/char/int_pet.c | 2 +- src/common/core.c | 2 +- src/common/core.h | 2 +- src/common/mapindex.c | 2 +- src/common/sql.c | 2 +- src/common/sql.h | 2 +- src/login/login.c | 2 +- src/map/battle.c | 2 +- src/map/battle.h | 2 +- src/map/chrif.c | 2 +- src/map/clif.c | 2 +- src/map/elemental.c | 2 +- src/map/homunculus.c | 2 +- src/map/map.c | 2 +- src/map/map.h | 2 +- src/map/mercenary.c | 2 +- src/map/mob.c | 2 +- src/map/npc.c | 2 +- src/map/pc.c | 2 +- src/map/pc.h | 2 +- src/map/script.c | 2 +- src/map/skill.c | 2 +- src/map/status.c | 2 +- src/map/unit.c | 2 +- 26 files changed, 28 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index b6c88623c..e7220aa36 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/core.h" diff --git a/src/char/int_guild.c b/src/char/int_guild.c index e25ebd902..7c2086722 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 7a6c217f9..311ccd4be 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/common/core.c b/src/common/core.c index 73416497d..4495cf1a2 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/common/core.h b/src/common/core.h index dc4db6004..ccdfa6c35 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 685af641c..edf9f26f8 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/common/sql.c b/src/common/sql.c index c0ab19e4e..3df9bc1c5 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/common/sql.h b/src/common/sql.h index ebbd1711f..319581504 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/login/login.c b/src/login/login.c index 984326532..1ced8cb93 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/battle.c b/src/map/battle.c index a6605da5e..cfb3df52e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/battle.h b/src/map/battle.h index e3a0a51ab..14bd70fee 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/chrif.c b/src/map/chrif.c index 06eef0564..573fd8501 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/clif.c b/src/map/clif.c index 7b4025b9d..ed2044127 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/elemental.c b/src/map/elemental.c index 33ef4d1b9..453845288 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 92868c7c7..6cc671526 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/map.c b/src/map/map.c index 901234687..c02506073 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/map.h b/src/map/map.h index 861a55d0a..38d9726cb 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/mercenary.c b/src/map/mercenary.c index a97651b87..665e6aeac 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/mob.c b/src/map/mob.c index 4f28923e9..b85238899 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/npc.c b/src/map/npc.c index 671b4485a..d734381af 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/pc.c b/src/map/pc.c index ad779a268..77b9948c4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/pc.h b/src/map/pc.h index 6e56a612e..1b00b7191 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/script.c b/src/map/script.c index fe00599a6..dd137d575 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/skill.c b/src/map/skill.c index 86a03b64b..ccf25f911 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1,4 +1,4 @@ -サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. +サソ// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/status.c b/src/map/status.c index 97b7c61a1..b07625322 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1,4 +1,4 @@ -サソ// Copyright (c) Hercules dev team, licensed under GNU GPL. +サソ// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams diff --git a/src/map/unit.c b/src/map/unit.c index 60de14093..4ca64d7f8 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1,4 +1,4 @@ -// Copyright (c) Hercules dev team, licensed under GNU GPL. +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -- cgit v1.2.3-70-g09d2 From b8379d2dc56197dc970db8bf1c0ba60ae4835819 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 16 Feb 2013 22:33:13 -0200 Subject: @skillid Improvement As suggested by Streusel and backed by the development team, @skillid now supports partial search. Signed-off-by: shennetsind --- conf/messages.conf | 7 +++++-- src/map/atcommand.c | 42 +++++++++++++++++++++++++++++++----------- src/map/skill.c | 2 -- src/map/skill.h | 8 ++++++-- 4 files changed, 42 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/conf/messages.conf b/conf/messages.conf index a554c116d..9b1af268a 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -1,4 +1,4 @@ -// Hercules msg_athena.conf +// Hercules messages.conf // Message Configuration // For translation, just change msg here (second line), no need to modify source code, // or alternatively, use conf/import/msg_conf.txt @@ -1013,7 +1013,7 @@ // @skillid 1163: Please enter a skill name to look up (usage: @skillid ). -1164: skill %d: %s +1164: skill %d: %s (%s) // @useskill 1165: Usage: @useskill @@ -1406,5 +1406,8 @@ 1396: You do not have a cart to be cleaned. 1397: Your cart was cleaned. +// @skillid (extension) +1398: -- Displaying first %d partial matches + //Custom translations import: conf/import/msg_conf.txt diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e54166019..320ca83ff 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5379,27 +5379,47 @@ ACMD_FUNC(clearcart) * @skillid by [MouseJstr] * lookup a skill by name *------------------------------------------*/ -ACMD_FUNC(skillid) -{ - int skillen, idx; +#define MAX_SKILLID_PARTIAL_RESULTS 5 +#define MAX_SKILLID_PARTIAL_RESULTS_LEN 74 /* "skill " (6) + "%d:" (up to 5) + "%s" (up to 30) + " (%s)" (up to 33) */ +ACMD_FUNC(skillid) { + int skillen, idx, i, found = 0; + DBIterator* iter; + DBKey key; + DBData *data; + char partials[MAX_SKILLID_PARTIAL_RESULTS][MAX_SKILLID_PARTIAL_RESULTS_LEN]; + nullpo_retr(-1, sd); - if (!message || !*message) - { + if (!message || !*message) { clif_displaymessage(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid ). return -1; } skillen = strlen(message); - - for (idx = 0; idx < MAX_SKILL_DB; idx++) { - if (strnicmp(skill_db[idx].name, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0) - { - sprintf(atcmd_output, msg_txt(1164), idx, skill_db[idx].desc); // skill %d: %s + + iter = db_iterator(skilldb_name2id); + + for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) { + idx = skill_get_index(db_data2i(data)); + if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0) { + sprintf(atcmd_output, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str); // skill %d: %s (%s) clif_displaymessage(fd, atcmd_output); + } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill_db[idx].desc,message) ) ) { + snprintf(partials[found++], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str); } } - + + dbi_destroy(iter); + + if( found ) { + sprintf(atcmd_output, msg_txt(1398), found); // -- Displaying first %d partial matches + clif_displaymessage(fd, atcmd_output); + } + + for(i = 0; i < found; i++) { /* partials */ + clif_displaymessage(fd, partials[i]); + } + return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index ccf25f911..51124e93b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -63,8 +63,6 @@ static struct eri *skill_timer_ers = NULL; //For handling skill_timerskills [Sko DBMap* skillunit_db = NULL; // int id -> struct skill_unit* -DBMap* skilldb_name2id = NULL; - /** * Skill Cool Down Delay Saving * Struct skill_cd is not a member of struct map_session_data diff --git a/src/map/skill.h b/src/map/skill.h index 9b6ba1b0c..94159d524 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1,10 +1,12 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _SKILL_H_ #define _SKILL_H_ #include "../common/mmo.h" // MAX_SKILL, struct square +#include "../common/db.h" #include "map.h" // struct block_list struct map_session_data; struct homun_data; @@ -22,6 +24,8 @@ struct status_change_entry; #define MAX_SKILL_LEVEL 100 +DBMap* skilldb_name2id; + //Constants to identify the skill's inf value: enum e_skill_inf { -- cgit v1.2.3-70-g09d2 From 237d76e7c409251b5fdb9f3eee40ef3fe5dc2b25 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 17 Feb 2013 10:52:12 -0300 Subject: Fixed Bug #6639 Fixed Homunculus not receiving EXP while its owner is on a even-share party. Special Thanks to Vali http://hercules.ws/board/tracker/issue-6639-homunculus-no-receives-exp/?gopid=16777#entry16777 Signed-off-by: shennetsind --- src/map/mob.c | 58 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index b85238899..dbbf4f30c 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2148,8 +2148,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if( md->dmglog[i].flag == MDLF_PET && (!tsd->status.pet_id || !tsd->pd) ) continue; // skip pet's share if inactive - if(md->dmglog[i].dmg > mvp_damage) - { + if(md->dmglog[i].dmg > mvp_damage) { third_sd = second_sd; second_sd = mvp_sd; mvp_sd = tsd; @@ -2158,8 +2157,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) tmpsd[i] = tsd; // record as valid damage-log entry - switch( md->dmglog[i].flag ) - { + switch( md->dmglog[i].flag ) { case MDLF_NORMAL: dmgbltypes|= BL_PC; break; case MDLF_HOMUN: dmgbltypes|= BL_HOM; break; case MDLF_PET: dmgbltypes|= BL_PET; break; @@ -2201,8 +2199,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris] bonus += (md->level-md->db->lv)*battle_config.mobs_level_up_exp_rate; - for(i = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) - { + for(i = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) { int flag=1,zeny=0; unsigned int base_exp, job_exp; double per; //Your share of the mob's exp @@ -2226,12 +2223,15 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } // change experience for different sized monsters [Valaris] - if (battle_config.mob_size_influence) - { - if (md->special_state.size == SZ_MEDIUM) - per /= 2.; - else if (md->special_state.size == SZ_BIG) - per *= 2.; + if (battle_config.mob_size_influence) { + switch( md->special_state.size ) { + case SZ_MEDIUM: + per /= 2.; + break; + case SZ_BIG: + per *= 2.; + break; + } } if( md->dmglog[i].flag == MDLF_PET ) @@ -2254,40 +2254,38 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) else job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map[m].jexp/100., 1, UINT_MAX); - if ((temp = tmpsd[i]->status.party_id)>0 /*&& !md->dmglog[i].flag == MDLF_HOMUN*/) //Homun-done damage (flag 1) is given to party - { + if ( (temp = tmpsd[i]->status.party_id) > 0 ) { int j; - for(j=0;jparty.exp) - { - pt[pnum].id=temp; - pt[pnum].base_exp=base_exp; - pt[pnum].job_exp=job_exp; - pt[pnum].zeny=zeny; // zeny share [Valaris] + if(pt[pnum].p && pt[pnum].p->party.exp) { + pt[pnum].id = temp; + pt[pnum].base_exp = base_exp; + pt[pnum].job_exp = job_exp; + pt[pnum].zeny = zeny; // zeny share [Valaris] pnum++; flag=0; } - }else{ //Add to total + } else { //Add to total if (pt[j].base_exp > UINT_MAX - base_exp) - pt[j].base_exp=UINT_MAX; + pt[j].base_exp = UINT_MAX; else - pt[j].base_exp+=base_exp; + pt[j].base_exp += base_exp; if (pt[j].job_exp > UINT_MAX - job_exp) - pt[j].job_exp=UINT_MAX; + pt[j].job_exp = UINT_MAX; else - pt[j].job_exp+=job_exp; + pt[j].job_exp += job_exp; pt[j].zeny+=zeny; // zeny share [Valaris] flag=0; } } + if(base_exp && md->dmglog[i].flag == MDLF_HOMUN) //tmpsd[i] is null if it has no homunc. + merc_hom_gainexp(tmpsd[i]->hd, base_exp); if(flag) { - if(base_exp && md->dmglog[i].flag == MDLF_HOMUN) //tmpsd[i] is null if it has no homunc. - merc_hom_gainexp(tmpsd[i]->hd, base_exp); if(base_exp || job_exp) { if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) { @@ -2304,7 +2302,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } } - for(i=0;ibl, pt[i].base_exp,pt[i].job_exp,pt[i].zeny); } //End EXP giving. -- cgit v1.2.3-70-g09d2 From 7e72f0cee8867837be53cb2119b610b00e9bd587 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 18 Feb 2013 00:30:28 -0300 Subject: Improvements all over the place Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind --- src/char/char.c | 14 +++++++------- src/char/int_guild.c | 11 ++++++----- src/common/core.c | 2 +- src/common/grfio.c | 16 +++++++++------- src/common/raconf.c | 6 +++--- src/common/socket.c | 6 +++--- src/login/account_sql.c | 2 +- src/login/login.c | 7 ++++--- src/map/atcommand.c | 43 ++++++++++++++++++++++--------------------- src/map/battle.c | 11 ++++++----- src/map/chat.c | 4 ++-- src/map/chrif.c | 3 ++- src/map/clif.c | 16 ++++++++-------- src/map/guild.c | 2 +- src/map/homunculus.c | 6 +++--- src/map/itemdb.c | 2 +- src/map/map.c | 4 ++-- src/map/mob.c | 20 ++++++++------------ src/map/npc.c | 14 ++++++++------ src/map/party.c | 5 ++--- src/map/pc.c | 33 ++++++++++++++++++--------------- src/map/pc_groups.c | 2 +- src/map/pet.c | 6 ++---- src/map/script.c | 15 ++++++++------- src/map/skill.c | 21 ++++++++++++--------- 25 files changed, 140 insertions(+), 131 deletions(-) (limited to 'src') diff --git a/src/char/char.c b/src/char/char.c index e7220aa36..cd1b1da66 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2833,8 +2833,6 @@ int parse_frommap(int fd) if( RFIFOREST(fd) < 18 ) return 0; { - struct auth_node* node; - int account_id = RFIFOL(fd,2); uint32 login_id1 = RFIFOL(fd,6); uint32 login_id2 = RFIFOL(fd,10); @@ -2851,6 +2849,8 @@ int parse_frommap(int fd) } else { + struct auth_node* node; + // create temporary auth entry CREATE(node, struct auth_node, 1); node->account_id = account_id; @@ -2880,7 +2880,6 @@ int parse_frommap(int fd) return 0; { int map_id, map_fd = -1; - struct online_char_data* data; struct mmo_charstatus* char_data; struct mmo_charstatus char_dat; @@ -2898,6 +2897,7 @@ int parse_frommap(int fd) session_isActive(map_fd) && char_data ) { //Send the map server the auth of this player. + struct online_char_data* data; struct auth_node* node; //Update the "last map" as this is where the player must be spawned on the new map server. @@ -4571,25 +4571,25 @@ int char_config_read(const char* cfgName) safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name)); } } else if (strcmpi(w1, "login_ip") == 0) { - char ip_str[16]; login_ip = host2ip(w2); if (login_ip) { + char ip_str[16]; safestrncpy(login_ip_str, w2, sizeof(login_ip_str)); ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str)); } } else if (strcmpi(w1, "login_port") == 0) { login_port = atoi(w2); } else if (strcmpi(w1, "char_ip") == 0) { - char ip_str[16]; char_ip = host2ip(w2); - if (char_ip){ + if (char_ip) { + char ip_str[16]; safestrncpy(char_ip_str, w2, sizeof(char_ip_str)); ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str)); } } else if (strcmpi(w1, "bind_ip") == 0) { - char ip_str[16]; bind_ip = host2ip(w2); if (bind_ip) { + char ip_str[16]; safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str)); ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str)); } diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 7c2086722..46bba63db 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -217,8 +217,8 @@ int inter_guild_tosql(struct guild *g,int flag) strcat(t_info, " level"); if( add_comma ) StringBuf_AppendStr(&buf, ", "); - else - add_comma = true; + //else //last condition using add_coma setting + // add_comma = true; StringBuf_Printf(&buf, "`guild_lv`=%d, `skill_point`=%d, `exp`=%"PRIu64", `next_exp`=%u, `max_member`=%d", g->guild_lv, g->skill_point, g->exp, g->next_exp, g->max_member); } StringBuf_Printf(&buf, " WHERE `guild_id`=%d", g->guild_id); @@ -509,7 +509,7 @@ struct guild * inter_guild_fromsql(int guild_id) { int id; Sql_GetData(sql_handle, 0, &data, NULL); id = atoi(data) - GD_SKILLBASE; - if( id < 0 && id >= MAX_GUILDSKILL ) + if( id < 0 || id >= MAX_GUILDSKILL ) continue;// invalid guild skill Sql_GetData(sql_handle, 1, &data, NULL); g->skill[id].lv = atoi(data); } @@ -604,7 +604,7 @@ static bool exp_guild_parse_row(char* split[], int column, int current) { unsigned int exp = (unsigned int)atol(split[0]); - if (exp < 0 || exp >= UINT_MAX) { + if (exp >= UINT_MAX) { ShowError("exp_guild: Invalid exp %d at line %d\n", exp, current); return false; } @@ -1262,7 +1262,7 @@ int mapif_parse_GuildAddMember(int fd,int guild_id,struct guild_member *m) // Delete member from guild int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { - int i, j; + int i; struct guild* g = inter_guild_fromsql(guild_id); if( g == NULL ) @@ -1285,6 +1285,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in if( flag ) { // Write expulsion reason // Find an empty slot + int j; ARR_FIND( 0, MAX_GUILDEXPULSION, j, g->expulsion[j].account_id == 0 ); if( j == MAX_GUILDEXPULSION ) { diff --git a/src/common/core.c b/src/common/core.c index 4495cf1a2..b004d2b96 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -272,7 +272,7 @@ const char *get_git_hash (void) { char line[64]; char *rev = malloc (sizeof (char) * 50); - if (fgets (line, sizeof (line), fp) && sscanf (line, "%s", rev)) + if (fgets (line, sizeof (line), fp) && sscanf (line, "%50s", rev)) snprintf (HerculesGitHash, sizeof (HerculesGitHash), "%s", rev); free (rev); diff --git a/src/common/grfio.c b/src/common/grfio.c index 8f430cfb9..cc2f866f7 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -393,12 +393,12 @@ void* grfio_reads(const char* fname, int* size) FILELIST* entry = filelist_find(fname); if( entry == NULL || entry->gentry <= 0 ) {// LocalFileCheck char lfname[256]; - int declen; FILE* in; grfio_localpath_create(lfname, sizeof(lfname), ( entry && entry->fnd ) ? entry->fnd : fname); in = fopen(lfname, "rb"); if( in != NULL ) { + int declen; fseek(in,0,SEEK_END); declen = ftell(in); fseek(in,0,SEEK_SET); @@ -475,14 +475,14 @@ static char* decode_filename(unsigned char* buf, int len) /// @return true if the file should undergo full mode 0 decryption, and true otherwise. static bool isFullEncrypt(const char* fname) { - static const char extensions[4][5] = { ".gnd", ".gat", ".act", ".str" }; - size_t i; - const char* ext = strrchr(fname, '.'); - if( ext != NULL ) + if( ext != NULL ) { + static const char extensions[4][5] = { ".gnd", ".gat", ".act", ".str" }; + size_t i; for( i = 0; i < ARRAYLENGTH(extensions); ++i ) if( strcmpi(ext, extensions[i]) == 0 ) return false; + } return true; } @@ -492,7 +492,7 @@ static bool isFullEncrypt(const char* fname) /// @param gentry index of the grf file name in the gentry_table static int grfio_entryread(const char* grfname, int gentry) { - long grf_size,list_size; + long grf_size; unsigned char grf_header[0x2e]; int entry,entrys,ofs,grf_version; unsigned char *grf_filelist; @@ -518,6 +518,7 @@ static int grfio_entryread(const char* grfname, int gentry) grf_version = getlong(grf_header+0x2a) >> 8; if( grf_version == 0x01 ) {// ****** Grf version 01xx ****** + long list_size; list_size = grf_size - ftell(fp); grf_filelist = (unsigned char *) aMalloc(list_size); if(fread(grf_filelist,1,list_size,fp) != list_size) { ShowError("Couldn't read all grf_filelist element of %s \n", grfname); } @@ -678,7 +679,7 @@ static bool grfio_parse_restable_row(const char* row) static void grfio_resourcecheck(void) { char restable[256]; - char *ptr, *buf; + char *buf; int size; FILE* fp; int i = 0; @@ -705,6 +706,7 @@ static void grfio_resourcecheck(void) buf = (char *)grfio_reads("data\\resnametable.txt", &size); if( buf != NULL ) { + char *ptr; buf[size] = '\0'; ptr = buf; diff --git a/src/common/raconf.c b/src/common/raconf.c index 2703560ff..f7d1284b7 100644 --- a/src/common/raconf.c +++ b/src/common/raconf.c @@ -41,12 +41,11 @@ struct conf_value{ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ struct conf_value *v; - char *p; - size_t sz; +/* size_t sz; sz = sizeof(struct conf_value); if(val_len >= sizeof(v->strval)) - sz += (val_len - sizeof(v->strval) + 1); + sz += (val_len - sizeof(v->strval) + 1);*/ v = (struct conf_value*)aCalloc(1, sizeof(struct conf_value)); if(v == NULL){ @@ -106,6 +105,7 @@ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ }else if( *val >='0' && *val <= '9'){ // begins with normal digit, so assume its dec. // is it float? bool is_float = false; + char *p; for(p = val; *p != '\0'; p++){ if(*p == '.'){ diff --git a/src/common/socket.c b/src/common/socket.c index 6977d4257..72633cf2b 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -1017,14 +1017,14 @@ int access_ipmask(const char* str, AccessControl* acc) { uint32 ip; uint32 mask; - unsigned int a[4]; - unsigned int m[4]; - int n; if( strcmp(str,"all") == 0 ) { ip = 0; mask = 0; } else { + unsigned int a[4]; + unsigned int m[4]; + int n; if( ((n=sscanf(str,"%u.%u.%u.%u/%u.%u.%u.%u",a,a+1,a+2,a+3,m,m+1,m+2,m+3)) != 8 && // not an ip + standard mask (n=sscanf(str,"%u.%u.%u.%u/%u",a,a+1,a+2,a+3,m)) != 5 && // not an ip + bit mask (n=sscanf(str,"%u.%u.%u.%u",a,a+1,a+2,a+3)) != 4 ) || // not an ip diff --git a/src/login/account_sql.c b/src/login/account_sql.c index ae80163af..f89147334 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -486,7 +486,6 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account AccountDBIterator_SQL* iter = (AccountDBIterator_SQL*)self; AccountDB_SQL* db = (AccountDB_SQL*)iter->db; Sql* sql_handle = db->accounts; - int account_id; char* data; // get next account ID @@ -501,6 +500,7 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account SQL_SUCCESS == Sql_GetData(sql_handle, 0, &data, NULL) && data != NULL ) {// get account data + int account_id; account_id = atoi(data); if( mmo_auth_fromsql(db, acc, account_id) ) { diff --git a/src/login/login.c b/src/login/login.c index 1ced8cb93..54f066b53 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1606,10 +1606,11 @@ int login_config_read(const char* cfgName) ShowInfo("Console Silent Setting: %d\n", atoi(w2)); } else if( !strcmpi(w1, "bind_ip") ) { - char ip_str[16]; login_config.login_ip = host2ip(w2); - if( login_config.login_ip ) + if( login_config.login_ip ) { + char ip_str[16]; ShowStatus("Login server binding IP address : %s -> %s\n", w2, ip2str(login_config.login_ip, ip_str)); + } } else if( !strcmpi(w1, "login_port") ) { login_config.login_port = (uint16)atoi(w2); @@ -1654,10 +1655,10 @@ int login_config_read(const char* cfgName) else if(!strcmpi(w1, "client_hash")) { int group = 0; char md5[33]; - int i; if (sscanf(w2, "%d, %32s", &group, md5) == 2) { struct client_hash_node *nnode; + int i; CREATE(nnode, struct client_hash_node, 1); for (i = 0; i < 32; i += 2) { diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 320ca83ff..ed42fdad4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -920,7 +920,7 @@ ACMD_FUNC(option) if (!message || !*message || sscanf(message, "%d %d %d", ¶m1, ¶m2, ¶m3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) {// failed to match the parameters so inform the user of the options - const char* text = NULL; + const char* text; // attempt to find the setting information for this command text = atcommand_help_string( command ); @@ -1230,8 +1230,6 @@ ACMD_FUNC(item2) int item_id, number = 0; int identify = 0, refine = 0, attr = 0; int c1 = 0, c2 = 0, c3 = 0, c4 = 0; - int flag = 0; - int loop, get_count, i; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); @@ -1254,6 +1252,8 @@ ACMD_FUNC(item2) item_id = item_data->nameid; if (item_id > 500) { + int flag = 0; + int loop, get_count, i; loop = 1; get_count = number; if (item_data->type == IT_WEAPON || item_data->type == IT_ARMOR || @@ -2161,7 +2161,6 @@ ACMD_FUNC(produce) { char item_name[100]; int item_id, attribute = 0, star = 0; - int flag = 0; struct item_data *item_data; struct item tmp_item; nullpo_retr(-1, sd); @@ -2186,6 +2185,7 @@ ACMD_FUNC(produce) item_id = item_data->nameid; if (itemdb_isequip2(item_data)) { + int flag = 0; if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE) attribute = ATTRIBUTE_NORMAL; if (star < MIN_STAR || star > MAX_STAR) @@ -2822,7 +2822,7 @@ ACMD_FUNC(char_ban) memset(atcmd_output, '\0', sizeof(atcmd_output)); memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); - if (!message || !*message || sscanf(message, "%s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { + if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { clif_displaymessage(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish