From 9fbf9932e874845247f285e5c1c4f6c15b4cea58 Mon Sep 17 00:00:00 2001 From: brianluau Date: Mon, 30 Jan 2012 20:17:55 +0000 Subject: - Removed more trailing tabs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 10 +++++----- src/map/battle.c | 16 ++++++++-------- src/map/battle.h | 2 +- src/map/chrif.c | 2 +- src/map/chrif.h | 2 +- src/map/clif.c | 8 ++++---- src/map/homunculus.c | 2 +- src/map/instance.c | 2 +- src/map/itemdb.c | 6 +++--- src/map/map.c | 4 ++-- src/map/map.h | 2 +- src/map/mob.c | 16 ++++++++-------- src/map/npc.c | 12 ++++++------ src/map/pc.c | 8 ++++---- src/map/pc.h | 2 +- src/map/pet.c | 6 +++--- src/map/quest.c | 2 +- src/map/script.c | 30 +++++++++++++++--------------- src/map/skill.c | 26 +++++++++++++------------- src/map/status.c | 26 +++++++++++++------------- src/map/status.h | 8 ++++---- src/map/storage.c | 2 +- src/map/unit.c | 6 +++--- 23 files changed, 100 insertions(+), 100 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3d60e06d0..c723d6d73 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4524,7 +4524,7 @@ ACMD_FUNC(mapinfo) strcat(atcmd_output, "Leaves | "); /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //if (map[m_id].flag.rain) // strcat(atcmd_output, "Rain | "); if (map[m_id].flag.nightenabled) @@ -6319,7 +6319,7 @@ ACMD_FUNC(autolootitem) } /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ /*========================================== * It is made to rain. *------------------------------------------*/ @@ -6477,7 +6477,7 @@ ACMD_FUNC(clearweather) nullpo_retr(-1, sd); /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //map[sd->bl.m].flag.rain=0; map[sd->bl.m].flag.snow=0; map[sd->bl.m].flag.sakura=0; @@ -9181,7 +9181,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message } while (*message == charcommand_symbol) - { + { //Checks to see if #command has a name or a name + parameters. x = sscanf(message, "%99s \"%23[^\"]\" %99[^\n]", command, charname, params); y = sscanf(message, "%99s %23s %99[^\n]", command, charname2, params2); @@ -9195,7 +9195,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message clif_displaymessage(fd, output); } else { sprintf(output, "Charcommand failed. Usage: # ."); - clif_displaymessage(fd, output); + clif_displaymessage(fd, output); } return true; } diff --git a/src/map/battle.c b/src/map/battle.c index 419e40ebf..11e9fb81f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1069,7 +1069,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo unsigned idef : 1; //Ignore defense unsigned idef2 : 1; //Ignore defense (left weapon) unsigned pdef : 2; //Pierces defense (Investigate/Ice Pick) - unsigned pdef2 : 2; //1: Use def+def2/100, 2: Use def+def2/50 + unsigned pdef2 : 2; //1: Use def+def2/100, 2: Use def+def2/50 unsigned infdef : 1; //Infinite defense (plants) unsigned arrow : 1; //Attack is arrow-based unsigned rh : 1; //Attack considers right hand (wd.damage) @@ -1326,7 +1326,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if(battle_config.agi_penalty_type && battle_config.agi_penalty_target&target->type) - { + { unsigned char attacker_count; //256 max targets should be a sane max attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv); if(attacker_count >= battle_config.agi_penalty_count) @@ -2224,7 +2224,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if(skill_num == AM_ACIDTERROR) def1 = 0; //Acid Terror ignores only armor defense. [Skotlex] if(def2 < 1) def2 = 1; } - //Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def + //Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def if (tsd) //Sd vit-eq { //[VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1)) vit_def = def2*(def2-15)/150; @@ -2402,7 +2402,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo { // Melee attack if( !battle_config.left_cardfix_to_right ) { - cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100; + cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100; if (!(nk&NK_NO_ELEFIX)) { int ele_fix = sd->right_weapon.addele[tstatus->def_ele]; for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) { @@ -2423,9 +2423,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if( flag.lh ) { - cardfix_=cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100; + cardfix_=cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100; if (!(nk&NK_NO_ELEFIX)) { - int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele]; + int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele]; for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++) { if (sd->left_weapon.addele2[i].ele != tstatus->def_ele) continue; if(!(sd->left_weapon.addele2[i].flag&wd.flag&BF_WEAPONMASK && @@ -3473,7 +3473,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * if(battle_config.agi_penalty_type && battle_config.agi_penalty_target&target->type) - { + { unsigned char attacker_count; //256 max targets should be a sane max attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv); if(attacker_count >= battle_config.agi_penalty_count) @@ -4121,7 +4121,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f case BL_HOM: break; //All else not specified is an invalid target. - default: + default: return 0; } diff --git a/src/map/battle.h b/src/map/battle.h index 2669af83d..de59f5717 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -123,7 +123,7 @@ extern struct Battle_Config int defnotenemy; int vs_traps_bctall; int traps_setting; - int summon_flora; //[Skotlex] + int summon_flora; //[Skotlex] int clear_unit_ondeath; //[Skotlex] int clear_unit_onwarp; //[Skotlex] int random_monster_checklv; diff --git a/src/map/chrif.c b/src/map/chrif.c index 03b4baeb0..10b7135b6 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1202,7 +1202,7 @@ int chrif_save_scdata(struct map_session_data *sd) //Retrieve and load sc_data for a player. [Skotlex] int chrif_load_scdata(int fd) -{ +{ #ifdef ENABLE_SC_SAVING struct map_session_data *sd; struct status_change_data *data; diff --git a/src/map/chrif.h b/src/map/chrif.h index 1d85ab7a2..dda80cec9 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -15,7 +15,7 @@ struct auth_node { struct map_session_data *sd; //Data from logged on char. struct mmo_charstatus *char_dat; //Data from char server. unsigned int node_created; //timestamp for node timeouts - enum sd_state state; //To track whether player was login in/out or changing maps. + enum sd_state state; //To track whether player was login in/out or changing maps. }; void chrif_setuserid(char* id); diff --git a/src/map/clif.c b/src/map/clif.c index 17cc24fd7..9df67ad70 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8750,13 +8750,13 @@ static bool clif_process_message(struct map_session_data* sd, int format, char** if( messagelen != strnlen(message, messagelen)+1 ) { // the declared length must match real length ShowWarning("clif_process_message: Received malformed packet from player '%s' (length is incorrect)!\n", sd->status.name); - return false; + return false; } // verify part of the packet if( message[messagelen-1] != '\0' ) { // message must be zero-terminated ShowWarning("clif_process_message: Player '%s' sent an unterminated message string!\n", sd->status.name); - return false; + return false; } if( messagelen > CHAT_SIZE_MAX-1 ) { // messages mustn't be too long @@ -9789,7 +9789,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) { char* str = target+4; //Skip the NPC: string part. struct npc_data* npc; - if ((npc = npc_name2id(str))) + if ((npc = npc_name2id(str))) { char split_data[NUM_WHISPER_VAR][CHAT_SIZE_MAX]; char *split; @@ -11493,7 +11493,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) /// Request to search for party booking advertisments (CZ_PARTY_BOOKING_REQ_SEARCH). /// 0804 .W .W .W .L .W void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) -{ +{ short level = RFIFOW(fd,2); short mapid = RFIFOW(fd,4); short job = RFIFOW(fd,6); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index d7f1c5f0c..d196ea566 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -469,7 +469,7 @@ int merc_hom_food(struct map_session_data *sd, struct homun_data *hd) clif_send_homdata(sd,SP_HUNGRY,hd->homunculus.hunger); clif_send_homdata(sd,SP_INTIMATE,hd->homunculus.intimacy / 100); clif_hom_food(sd,foodID,1); - + // Too much food :/ if(hd->homunculus.intimacy == 0) return merc_hom_delete(sd->hd, E_OMG); diff --git a/src/map/instance.c b/src/map/instance.c index d15b80a8a..52d0dfeef 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -140,7 +140,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename) map[im].name[0] = '\0'; ShowError("instance_add_map: no more free map indexes.\n"); return -3; // No free map index - } + } // Reallocate cells num_cell = map[im].xs * map[im].ys; diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 6ab88f872..6ea360e0c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -415,17 +415,17 @@ int itemdb_cansell_sub(struct item_data* item, int gmlv, int unused) } int itemdb_cancartstore_sub(struct item_data* item, int gmlv, int unused) -{ +{ return (item && (!(item->flag.trade_restriction&16) || gmlv >= item->gm_lv_trade_override)); } int itemdb_canstore_sub(struct item_data* item, int gmlv, int unused) -{ +{ return (item && (!(item->flag.trade_restriction&32) || gmlv >= item->gm_lv_trade_override)); } int itemdb_canguildstore_sub(struct item_data* item, int gmlv, int unused) -{ +{ return (item && (!(item->flag.trade_restriction&64) || gmlv >= item->gm_lv_trade_override)); } diff --git a/src/map/map.c b/src/map/map.c index ea6c58d2b..afe385e33 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1633,7 +1633,7 @@ int map_quit(struct map_session_data *sd) sd->bl.y = pt->y; sd->mapindex = pt->map; } - } + } party_booking_delete(sd); // Party Booking [Spiria] pc_makesavestatus(sd); @@ -1784,7 +1784,7 @@ struct mob_data * map_getmob_boss(int m) { if( md->bl.m == m ) { - found = true; + found = true; break; } } diff --git a/src/map/map.h b/src/map/map.h index 0829d93b3..06e955b6e 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -501,7 +501,7 @@ struct map_data { unsigned leaves : 1; // [Valaris] /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //unsigned rain : 1; // [Valaris] unsigned nogo : 1; // [Valaris] unsigned nobaseexp : 1; // [Lorky] added by Lupus diff --git a/src/map/mob.c b/src/map/mob.c index 7da208827..cc3c8e6e6 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -931,7 +931,7 @@ static int mob_can_changetarget(struct mob_data* md, struct block_list* target, { // if the monster was provoked ignore the above rule [celest] if(md->state.provoke_flag) - { + { if (md->state.provoke_flag == target->id) return 1; else if (!(battle_config.mob_ai&0x4)) @@ -1112,7 +1112,7 @@ static int mob_warpchase_sub(struct block_list *bl,va_list ap) *target_nd = nd; *min_distance = cur_distance; return 1; - } + } return 0; } /*========================================== @@ -1161,7 +1161,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) if(map_search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1) && unit_walktoxy(&md->bl, x, y, 0)) return 1; - } + } } else if (bl->m != md->bl.m && map_flag_gvg(md->bl.m)) { //Delete the summoned mob if it's in a gvg ground and the master is elsewhere. [Skotlex] status_kill(&md->bl); @@ -2147,7 +2147,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) job_exp = 0; 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 not given to party { int j; @@ -2954,7 +2954,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) //Pick a starting position and loop from that. i = battle_config.mob_ai&0x100?rnd()%md->db->maxskill:0; for (n = 0; n < md->db->maxskill; i++, n++) { - int c2, flag = 0; + int c2, flag = 0; if (i == md->db->maxskill) i = 0; @@ -3011,7 +3011,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) flag = ((fbl = mob_getfriendhprate(md, ms[i].cond2, ms[i].val[0])) != NULL); break; case MSC_FRIENDSTATUSON: // friend status[num] on case MSC_FRIENDSTATUSOFF: // friend status[num] off - flag = ((fmd = mob_getfriendstatus(md, ms[i].cond1, ms[i].cond2)) != NULL); break; + flag = ((fmd = mob_getfriendstatus(md, ms[i].cond1, ms[i].cond2)) != NULL); break; case MSC_SLAVELT: // slave < num flag = (mob_countslave(&md->bl) < c2 ); break; case MSC_ATTACKPCGT: // attack pc > num @@ -3049,7 +3049,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) clif_messagecolor(&md->bl, mc->color, temp); } - //Execute skill + //Execute skill if (skill_get_casttype(ms[i].skill_id) == CAST_GROUND) { //Ground skill. short x, y; @@ -3404,7 +3404,7 @@ static int mob_makedummymobdb(int class_) } return 0; } - //Initialize dummy data. + //Initialize dummy data. mob_dummy = (struct mob_db*)aCalloc(1, sizeof(struct mob_db)); //Initializing the dummy mob. sprintf(mob_dummy->sprite,"DUMMY"); sprintf(mob_dummy->name,"Dummy"); diff --git a/src/map/npc.c b/src/map/npc.c index 7802ac1f9..8a7a38b05 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -594,7 +594,7 @@ int npc_timerevent_start(struct npc_data* nd, int rid) else if( nd->u.scr.timerid != INVALID_TIMER ) return 0; - // Arrange for the next event + // Arrange for the next event ted = ers_alloc(timer_event_ers, struct timer_event_data); ted->next = j; // Set event index ted->time = nd->u.scr.timer_event[j].timer; @@ -696,8 +696,8 @@ void npc_timerevent_quit(struct map_session_data* sd) old_tick = nd->u.scr.timertick; old_timer = nd->u.scr.timer; - nd->u.scr.rid = sd->bl.id; - nd->u.scr.timertick = gettick(); + nd->u.scr.rid = sd->bl.id; + nd->u.scr.timertick = gettick(); nd->u.scr.timer = ted->time; //Execute label @@ -741,7 +741,7 @@ int npc_settimerevent_tick(struct npc_data* nd, int newtimer) nullpo_ret(nd); - // TODO: Set player attached timer's tick. + // TODO: Set player attached timer's tick. old_rid = nd->u.scr.rid; nd->u.scr.rid = 0; @@ -1738,7 +1738,7 @@ int npc_unload(struct npc_data* nd) if( nd->subtype == SCRIPT ) { struct s_mapiterator* iter; - struct block_list* bl; + struct block_list* bl; ev_db->foreach(ev_db,npc_unload_ev,nd->exname); //Clean up all events related @@ -3186,7 +3186,7 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con map[m].flag.leaves=state; /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //else if (!strcmpi(w3,"rain")) // map[m].flag.rain=state; else if (!strcmpi(w3,"nightenabled")) diff --git a/src/map/pc.c b/src/map/pc.c index fc0769b57..abdaf6671 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1254,7 +1254,7 @@ int pc_calc_skilltree(struct map_session_data *sd) for( i = 0; i < MAX_SKILL; i++ ) { if( sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) - { // Restore original level of skills after deleting earned skills. + { // 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; } @@ -5211,7 +5211,7 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi if (battle_config.pk_mode && (int)(status_get_lv(src) - sd->status.base_level) >= 20) - bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris] + bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris] if (sd->sc.data[SC_EXPBOOST]) bonus += sd->sc.data[SC_EXPBOOST]->val1; @@ -6641,7 +6641,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) break; } //This will automatically adjust bard/dancer classes to the correct gender - //That is, if you try to jobchange into dancer, it will turn you to bard. + //That is, if you try to jobchange into dancer, it will turn you to bard. job = pc_mapid2jobid(b_class, sd->status.sex); if (job == -1) return 1; @@ -8527,7 +8527,7 @@ int pc_readdb(void) stat=0; if (i > MAX_LEVEL) break; - statp[i]=stat; + statp[i]=stat; i++; } fclose(fp); diff --git a/src/map/pc.h b/src/map/pc.h index 05cdc9e73..af26ce8d2 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -487,7 +487,7 @@ enum weapon_type { W_2HMACE, //9 (unused) W_STAFF, //10 W_BOW, //11 - W_KNUCKLE, //12 + W_KNUCKLE, //12 W_MUSICAL, //13 W_WHIP, //14 W_BOOK, //15 diff --git a/src/map/pet.c b/src/map/pet.c index 248373edc..c3fa41219 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -173,7 +173,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type) * Pet SC Check [Skotlex] *------------------------------------------*/ int pet_sc_check(struct map_session_data *sd, int type) -{ +{ struct pet_data *pd; nullpo_ret(sd); @@ -1203,7 +1203,7 @@ int read_petdb() FILE *fp; int nameid,i,j,k; - // Remove any previous scripts in case reloaddb was invoked. + // Remove any previous scripts in case reloaddb was invoked. for( j = 0; j < MAX_PET_DB; j++ ) { if( pet_db[j].pet_script ) @@ -1238,7 +1238,7 @@ int read_petdb() lines = entries = 0; while( fgets(line, sizeof(line), fp) && j < MAX_PET_DB ) - { + { char *str[22], *p; lines++; diff --git a/src/map/quest.c b/src/map/quest.c index 6be181eac..c01557974 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -273,7 +273,7 @@ int quest_check(TBL_PC * sd, int quest_id, quest_check_type type) switch( type ) { - case HAVEQUEST: + case HAVEQUEST: return sd->quest_log[i].state; case PLAYTIME: return (sd->quest_log[i].time < (unsigned int)time(NULL) ? 2 : sd->quest_log[i].state == Q_COMPLETE ? 1 : 0); diff --git a/src/map/script.c b/src/map/script.c index 220583ff5..0e71a0c97 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -328,7 +328,7 @@ enum { MF_LEAVES, /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //MF_RAIN, //20 // 21 free MF_NOGO = 22, @@ -4591,7 +4591,7 @@ BUILDIN_FUNC(warpchar) else if(strcmp(str, "SavePoint") == 0) pc_setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); - else + else pc_setpos(sd, mapindex_name2id(str), x, y, CLR_TELEPORT); return 0; @@ -4883,7 +4883,7 @@ BUILDIN_FUNC(input) st->state = RERUNLINE; if( is_string_variable(name) ) clif_scriptinputstr(sd,st->oid); - else + else clif_scriptinput(sd,st->oid); } else @@ -7054,7 +7054,7 @@ BUILDIN_FUNC(bonus) case 1: pc_bonus(sd, type, val1); break; - case 2: + case 2: val2 = script_getnum(st,4); pc_bonus2(sd, type, val1, val2); break; @@ -9675,7 +9675,7 @@ BUILDIN_FUNC(getmapflag) case MF_LEAVES: script_pushint(st,map[m].flag.leaves); break; /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //case MF_RAIN: script_pushint(st,map[m].flag.rain); break; case MF_NOGO: script_pushint(st,map[m].flag.nogo); break; case MF_CLOUDS: script_pushint(st,map[m].flag.clouds); break; @@ -9750,7 +9750,7 @@ BUILDIN_FUNC(setmapflag) case MF_LEAVES: map[m].flag.leaves = 1; break; /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //case MF_RAIN: map[m].flag.rain = 1; break; case MF_NOGO: map[m].flag.nogo = 1; break; case MF_CLOUDS: map[m].flag.clouds = 1; break; @@ -9828,7 +9828,7 @@ BUILDIN_FUNC(removemapflag) case MF_LEAVES: map[m].flag.leaves = 0; break; /** * No longer available, keeping here just in case it's back someday. [Ind] - **/ + **/ //case MF_RAIN: map[m].flag.rain = 0; break; case MF_NOGO: map[m].flag.nogo = 0; break; case MF_CLOUDS: map[m].flag.clouds = 0; break; @@ -12313,7 +12313,7 @@ BUILDIN_FUNC(isequippedcnt) for(k=0; kinventory_data[index]->slot; k++) { if (sd->status.inventory[index].card[k] == id) ret++; //[Lupus] - } + } } } } @@ -12381,7 +12381,7 @@ BUILDIN_FUNC(isequipped) hash = 1<<((j<5?j:j-5)*4 + k); // check if card is already used by another set - if ((j<5?sd->setitem_hash:sd->setitem_hash2) & hash) + if ((j<5?sd->setitem_hash:sd->setitem_hash2) & hash) continue; // We have found a match @@ -12444,7 +12444,7 @@ BUILDIN_FUNC(cardscnt) for(k=0; kinventory_data[index]->slot; k++) { if (sd->status.inventory[index].card[k] == id) ret++; - } + } } } script_pushint(st,ret); @@ -15362,14 +15362,14 @@ BUILDIN_FUNC(instance_detachmap) else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id ) instance_id = p->instance_id; else return 0; - + if( (m = map_mapname2mapid(str)) < 0 || (m = instance_map2imap(m,instance_id)) < 0 ) - { + { ShowError("buildin_instance_detachmap: Trying to detach invalid map %s\n", str); - return 0; - } + return 0; + } - instance_del_map(m); + instance_del_map(m); return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index 74804ef84..cacb29e04 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1222,7 +1222,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int } if( rate ) skill_break_equip(src, EQP_WEAPON, rate, BCT_SELF); - } + } if( battle_config.equip_skill_break_rate && skillid != WS_CARTTERMINATION && skillid != ITM_TOMAHAWK ) { // Cart Termination/Tomahawk won't trigger breaking data. Why? No idea, go ask Gravity. // Target weapon breaking @@ -2377,7 +2377,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if( ssc && ssc->data[SC_POISONINGWEAPON] && rnd()%100 < 70 + 5*skilllv ) { sc_start(bl,ssc->data[SC_POISONINGWEAPON]->val2,100,ssc->data[SC_POISONINGWEAPON]->val1,skill_get_time2(GC_POISONINGWEAPON,ssc->data[SC_POISONINGWEAPON]->val1)); status_change_end(src,SC_POISONINGWEAPON,-1); - clif_skill_nodamage(src,bl,skillid,skilllv,1); + clif_skill_nodamage(src,bl,skillid,skilllv,1); } } } @@ -3953,7 +3953,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int } else { - struct skill_unit *su = BL_CAST(BL_SKILL,bl); + struct skill_unit *su = BL_CAST(BL_SKILL,bl); struct skill_unit_group* sg; if( su && (sg=su->group) && skill_get_inf2(sg->skill_id)&INF2_TRAP && sg->src_id != src->id && @@ -4559,7 +4559,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case PR_KYRIE: - case MER_KYRIE: + case MER_KYRIE: clif_skill_nodamage(bl,bl,skillid,skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); break; @@ -5138,7 +5138,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in map_freeblock_unlock(); return 0; } - clif_skill_nodamage(src,bl,skillid,-1,sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); + clif_skill_nodamage(src,bl,skillid,-1,sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); break; case TK_RUN: if (tsce) @@ -7096,7 +7096,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case WL_JACKFROST: clif_skill_nodamage(src,bl,skillid,skilllv,1); map_foreachinshootrange(skill_area_sub,bl,skill_get_splash(skillid,skilllv),BL_CHAR|BL_SKILL,src,skillid,skilllv,tick,flag|BCT_ENEMY|1,skill_castend_damage_id); - break; + break; case WL_MARSHOFABYSS: // Should marsh of abyss still apply half reduction to players after the 28/10 patch? [LimitLine] @@ -7321,7 +7321,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NC_DISJOINT: { - if( bl->type != BL_MOB ) break; + if( bl->type != BL_MOB ) break; md = map_id2md(bl->id); if( md && md->class_ >= 2042 && md->class_ <= 2046 ) status_kill(bl); @@ -8407,7 +8407,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk i = skill_get_splash(skillid,skilllv); map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,BL_CHAR, src,skillid,skilllv,tick,flag|BCT_ENEMY|1,skill_castend_damage_id); - break; + break; /** * Guilotine Cross **/ @@ -9803,7 +9803,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns break; case UNT_GRAVITATION: - case UNT_EARTHSTRAIN: + case UNT_EARTHSTRAIN: case UNT_FIREWALK: case UNT_ELECTRICWALK: case UNT_PSYCHIC_WAVE: @@ -10312,7 +10312,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh if (lv <= 0 || sd->chatID) return 0; if( battle_config.gm_skilluncond && pc_isGM(sd)>= battle_config.gm_skilluncond && sd->skillitem != skill ) - { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] + { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill_get_ammotype(skill)?1:0; //Need to do arrow state check. sd->spiritball_old = sd->spiritball; //Need to do Spiritball check. return 1; @@ -10972,7 +10972,7 @@ int skill_check_condition_castend(struct map_session_data* sd, short skill, shor return 0; if( battle_config.gm_skilluncond && pc_isGM(sd) >= battle_config.gm_skilluncond && sd->skillitem != skill ) - { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] + { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill_get_ammotype(skill)?1:0; //Need to do arrow state check. sd->spiritball_old = sd->spiritball; //Need to do Spiritball check. return 1; @@ -14435,14 +14435,14 @@ int skill_stasis_check(struct block_list *bl, int src_id, int skillid) { int inf = 0; if( !bl || skillid < 1 ) - return 0; // Can do it + return 0; // Can do it inf = skill_get_inf2(skillid); if( inf == INF2_SONG_DANCE || /*skill_get_inf2(skillid) == INF2_CHORUS_SKILL ||*/ inf == INF2_SPIRIT_SKILL ) return 1; // Can't do it. switch( skillid ) { - case NV_FIRSTAID: case TF_HIDING: case AS_CLOAKING: case WZ_SIGHTRASHER: + case NV_FIRSTAID: case TF_HIDING: case AS_CLOAKING: case WZ_SIGHTRASHER: case RG_STRIPWEAPON: case RG_STRIPSHIELD: case RG_STRIPARMOR: case WZ_METEOR: case RG_STRIPHELM: case SC_STRIPACCESSARY: case ST_FULLSTRIP: case WZ_SIGHTBLASTER: case ST_CHASEWALK: case SC_ENERVATION: case SC_GROOMY: case WZ_ICEWALL: diff --git a/src/map/status.c b/src/map/status.c index 275c6c8f2..2f36cd6f6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1244,7 +1244,7 @@ int status_percent_change(struct block_list *src,struct block_list *target,signe status_damage(src, target, 0, INT_MAX, 0, (!src||src==target?5:1)); else status_heal(target, 0, INT_MAX, 0); - } + } if (flag) return status_damage(src, target, hp, sp, 0, (!src||src==target?5:1)); return status_heal(target, hp, sp, 0); @@ -1442,7 +1442,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int tsc = status_get_sc(target); if(tsc && tsc->count) - { + { if( tsc->data[SC_INVINCIBLE] ) return 0; if(!skill_num && tsc->data[SC_TRICKDEAD]) @@ -1926,7 +1926,7 @@ int status_calc_pet_(struct pet_data *pd, bool first) pd->rate_fix = pd->rate_fix*battle_config.pet_support_rate/100; return 1; -} +} /// Helper function for status_base_pc_maxhp(), used to pre-calculate the hp_sigma_val[] array static void status_calc_sigma(void) @@ -3420,7 +3420,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) else if( bl->type&BL_HOM ) { - amotion = (1000 -4*status->agi -status->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000; + amotion = (1000 -4*status->agi -status->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000; status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate); if(status->aspd_rate != 1000) @@ -4698,7 +4698,7 @@ static unsigned char status_calc_element_lv(struct block_list *bl, struct status if(!sc || !sc->count) return lv; - if(sc->data[SC_FREEZE]) + if(sc->data[SC_FREEZE]) return 1; if(sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) return 1; @@ -5625,7 +5625,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC break; case SC_STRIPSHIELD: - if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off.. + if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off.. else if (sd && !(flag&4)) { int i; @@ -6379,7 +6379,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_DEFENDER: if (!(flag&1)) - { + { val2 = 5 + 15*val1; //Damage reduction val3 = 0; // unused, previously speed adjustment val4 = 250 - 50*val1; //Aspd adjustment @@ -6913,7 +6913,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_CLOAKINGEXCEED: val2 = ( val1 + 1 ) / 2; // Hits val3 = 90 + val1 * 10; // Walk speed - val_flag |= 1|2|4; + val_flag |= 1|2|4; if (bl->type == BL_PC) val4 |= battle_config.pc_cloak_check_type&7; else @@ -7066,7 +7066,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val2 = 6 * val1; val2 += val3; //Adding 1% * Lesson Bonus val2 += (int)(val4*2/10); //Adding 0.2% per JobLevel - break; + break; case SC_MOONLITSERENADE: val2 = 10 * val1; break; @@ -7958,7 +7958,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const clif_updatestatus(sd,SP_MANNER); } break; - case SC_SPLASHER: + case SC_SPLASHER: { struct block_list *src=map_id2bl(sce->val3); if(src && tid != INVALID_TIMER) @@ -8116,7 +8116,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_ADORAMUS: status_change_end(bl, SC_BLIND, -1); - break; + break; /* case SC__SHADOWFORM: { @@ -8214,10 +8214,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_SIGHT: sc->option &= ~OPTION_SIGHT; break; - case SC_WEDDING: + case SC_WEDDING: sc->option &= ~OPTION_WEDDING; break; - case SC_XMAS: + case SC_XMAS: sc->option &= ~OPTION_XMAS; break; case SC_SUMMER: diff --git a/src/map/status.h b/src/map/status.h index e11252f1d..03310c3e3 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -741,13 +741,13 @@ enum si_type { // SI_FRIEND = 162, // SI_FRIENDUP = 163, // SI_SG_WARM = 164, - SI_WARM = 165, -// 166 | The three show the exact same display: ultra red character (165, 166, 167) + SI_WARM = 165, +// 166 | The three show the exact same display: ultra red character (165, 166, 167) // 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM // SI_EMOTION = 168, SI_SUN_COMFORT = 169, - SI_MOON_COMFORT = 170, - SI_STAR_COMFORT = 171, + SI_MOON_COMFORT = 170, + SI_STAR_COMFORT = 171, // SI_EXPUP = 172, // SI_GDSKILL_BATTLEORDER = 173, // SI_GDSKILL_REGENERATION = 174, diff --git a/src/map/storage.c b/src/map/storage.c index f802dabe4..12d9a8107 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -339,7 +339,7 @@ struct guild_storage *guild2storage2(int guild_id) return (struct guild_storage*)idb_get(guild_storage_db,guild_id); } -int guild_storage_delete(int guild_id) +int guild_storage_delete(int guild_id) { idb_remove(guild_storage_db,guild_id); return 0; diff --git a/src/map/unit.c b/src/map/unit.c index c27bde544..9161c61d1 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -829,7 +829,7 @@ int unit_stop_walking(struct block_list *bl,int type) tick = gettick(); if( (type&0x02 && !ud->walkpath.path_pos) //Force moving at least one cell. || (type&0x04 && td && DIFF_TICK(td->tick, tick) <= td->data/2) //Enough time has passed to cover half-cell - ) { + ) { ud->walkpath.path_len = ud->walkpath.path_pos+1; unit_walktoxy_timer(INVALID_TIMER, tick, bl->id, ud->walkpath.path_pos); } @@ -1176,7 +1176,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh switch(skill_num){ case ALL_RESURRECTION: - if(battle_check_undead(tstatus->race,tstatus->def_ele)) { + if(battle_check_undead(tstatus->race,tstatus->def_ele)) { temp = 1; } else if (!status_isdead(target)) return 0; //Can't cast on non-dead characters. @@ -1220,7 +1220,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh casttime *= 2; break; } - + // moved here to prevent Suffragium from ending if skill fails if (!(skill_get_castnodex(skill_num, skill_lv)&2)) casttime = skill_castfix_sc(src, casttime, skill_num, skill_lv); -- cgit v1.2.3-60-g2f50