diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-04 18:41:54 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-04 18:41:54 +0000 |
commit | b4a305c08f2e6aaf2f1179462958af0f0b184fd2 (patch) | |
tree | a121a74319c742f7b8cdb303192792fc71ab597a /src/map/skill.c | |
parent | b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897 (diff) | |
download | hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.gz hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.bz2 hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.xz hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.zip |
* Corrected Icewall skill to be closer to official behavior (part of bugreport:38)
- now works on occupied squares (previously it disappeared)
- now you can walk out of an icewall square (removed code that blocked pathfinding if the origin cell was of a nonwalkable type)
- added back the hack where mapcell changes are broadcast to whole map (prevents client from leaving the cells non-walkable if you warp away)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11354 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 47a591eed..3e2821464 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2957,7 +2957,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int //HACK: since knockback officially defaults to the left, the client also turns to the left... therefore, // make the caster look in the direction of the target unit_setdir(src, (dir+4)%8); - clif_changed_dir(src, AREA); } } @@ -7017,7 +7016,14 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, if(celltype==5 || celltype==1) alive=0; else - clif_changemapcell(0,src->m,ux,uy,5); + { + struct block_list bl; + bl.type = BL_NUL; + bl.m = src->m; + bl.x = ux; + bl.y = uy; + clif_changemapcell(0,&bl,5,AREA); + } } if(alive){ @@ -7187,11 +7193,12 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned sc_start4(bl,type,100,sg->skill_lv,0,BCT_ENEMY,sg->group_id,sg->limit); break; - 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 @@ -7839,7 +7846,9 @@ int skill_unit_onlimit (struct skill_unit *src, unsigned int tick, int flag) break; case UNT_ICEWALL: - clif_changemapcell(0,src->bl.m,src->bl.x,src->bl.y,src->val2); + // hack to prevent client from leaving cells unwalkable + //FIXME: this should be done individually in insight/outsight code instead [ultramage] + clif_changemapcell(0,&src->bl,src->val2,ALL_SAMEMAP); break; case UNT_CALLFAMILY: if (!flag) @@ -9922,21 +9931,19 @@ int skill_delunit (struct skill_unit *unit, int flag) struct skill_unit_group *group; nullpo_retr(0, unit); - if(!unit->alive) + if( !unit->alive ) return 0; nullpo_retr(0, group=unit->group); // invoke onlimit event - skill_unit_onlimit( unit,gettick(), flag); + skill_unit_onlimit(unit, gettick(), flag); - if (group->state.song_dance&0x1) //Restore dissonance effect. + if( group->state.song_dance&0x1 ) //Restore dissonance effect. skill_dance_overlap(unit, 0); // invoke onout event - if (!unit->range) { - map_foreachincell(skill_unit_effect,unit->bl.m, - unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),4); - } + if( !unit->range ) + map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),4); switch (group->skill_id) { case AL_PNEUMA: |