diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-04 17:26:07 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-04 17:26:07 +0000 |
commit | 134bf364c8deffa192fb77a323b92b708a2e2276 (patch) | |
tree | 606cb191f9a0d4a3897866a0c8086fed6a3b7333 /src/map/clif.c | |
parent | 23d9eff296a39897242648b4e5f89aaa14f945ea (diff) | |
download | hercules-134bf364c8deffa192fb77a323b92b708a2e2276.tar.gz hercules-134bf364c8deffa192fb77a323b92b708a2e2276.tar.bz2 hercules-134bf364c8deffa192fb77a323b92b708a2e2276.tar.xz hercules-134bf364c8deffa192fb77a323b92b708a2e2276.zip |
Small edits to battleground code (bugreport:2816)
- removed bg_idle_announce setting (could be considered later)
- moved crystal protection code to battle_calc_bg_damage
- removed mob state 'inmunity' in favor of a script-based solution
- removed unneeded 'setmobdata' (fixes collision with mob controller)
- added svn:eol-style native for battleground code
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13565 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index b17e85aab..02d47ad0b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5639,6 +5639,7 @@ int clif_hpmeter(struct map_session_data *sd) WBUFW(buf,8) = sd->battle_status.max_hp; } + //TODO: replace with map_foreachinarea? for( i = 0; i < fd_max; i++ ) { if( session[i] && session[i]->func_parse == clif_parse && (sd2 = (struct map_session_data*)session[i]->session_data) && sd != sd2 && sd2->state.active ) @@ -7918,7 +7919,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_party_hp(sd); // Show hp after displacement [LuzZza] } - if( sd->state.bg_id ) clif_bg_hp(sd); // BattleGround System + if( sd->state.bg_id ) + clif_bg_hp(sd); // BattleGround System if(map[sd->bl.m].flag.pvp) { if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris] @@ -8202,7 +8204,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) y = ((RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]+1) & 0x3f) << 4) + (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 2) >> 4); //Set last idle time... [Skotlex] - pc_update_last_action(sd); + sd->idletime = last_tick; unit_walktoxy(&sd->bl, x, y, 4); } @@ -8494,7 +8496,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, } pc_delinvincibletimer(sd); - pc_update_last_action(sd); + sd->idletime = last_tick; unit_attack(&sd->bl, target_id, action_type != 0); break; case 0x02: // sitdown @@ -8854,7 +8856,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) pc_delinvincibletimer(sd); //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex] - pc_update_last_action(sd); + sd->idletime = last_tick; n = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2; if(n <0 || n >= MAX_INVENTORY) @@ -9367,7 +9369,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) } // Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] - pc_update_last_action(sd); + sd->idletime = last_tick; if( pc_cant_act(sd) ) return; @@ -9493,7 +9495,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, short skil } //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] - pc_update_last_action(sd); + sd->idletime = last_tick; if( skillnotok(skillnum, sd) ) return; |