summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 18:47:04 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 18:47:04 +0000
commita028a5fa44a6eb6b0ed87781eb18b8555eb08837 (patch)
tree47a3c8144bf0c11ece28b41767f0c7d6d993869e /src/map/skill.c
parent48f2ec3f27a57a7fe3c60f5475174c075eec890d (diff)
downloadhercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.gz
hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.bz2
hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.xz
hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.zip
* Added Bitmap File system
* Added --run_once flag git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@789 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 3ede9313d..794059e82 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2069,13 +2069,13 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
break;
case RG_INTIMIDATE:
if(sd && !map[src->m].flag.noteleport) {
- int x,y,i,j,c;
+ int x,y,i,j;
pc_randomwarp(sd,3);
for(i=0;i<16;i++) {
j = rand()%8;
x = sd->bl.x + dirx[j];
y = sd->bl.y + diry[j];
- if((c=map_getcell(sd->bl.m,x,y)) != 1 && c != 5)
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKPASS))
break;
}
if(i >= 16) {
@@ -2090,13 +2090,13 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
}
}
else if(md && !map[src->m].flag.monster_noteleport) {
- int x,y,i,j,c;
+ int x,y,i,j;
mob_warp(md,-1,-1,-1,3);
for(i=0;i<16;i++) {
j = rand()%8;
x = md->bl.x + dirx[j];
y = md->bl.y + diry[j];
- if((c=map_getcell(md->bl.m,x,y)) != 1 && c != 5)
+ if(map_getcell(md->bl.m,x,y,CELL_CHKPASS))
break;
}
if(i >= 16) {
@@ -5002,7 +5002,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
{
int flag=0;
for(i=0;i<2+(skilllv>>1);i++) {
- int j=0, c;
+ int j=0;
do {
tmpx = x + (rand()%7 - 3);
tmpy = y + (rand()%7 - 3);
@@ -5015,7 +5015,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
else if(tmpy >= map[src->m].ys)
tmpy = map[src->m].ys - 1;
j++;
- } while(((c=map_getcell(src->m,tmpx,tmpy))==1 || c==5) && j<100);
+ } while((map_getcell(src->m,tmpx,tmpy,CELL_CHKNOPASS)) && j<100);
if(j >= 100)
continue;
if(flag==0){
@@ -5810,11 +5810,11 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
map_foreachinarea(skill_landprotector,src->m,ux,uy,ux,uy,BL_SKILL,skillid,&alive);
if(skillid==WZ_ICEWALL && alive){
- val2=map_getcell(src->m,ux,uy);
+ val2=map_getcell(src->m,ux,uy,CELL_CHKTYPE);
if(val2==5 || val2==1)
alive=0;
else {
- map_setcell(src->m,ux,uy,5);
+ map_setcell(src->m,ux,uy,CELL_SETNOPASS);
clif_changemapcell(src->m,ux,uy,5,0);
}
}
@@ -6558,6 +6558,8 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
break;
case 0x8d: /* アイスウォ?ル */
+ if(map_read_flag == READ_FROM_BITMAP)
+ map_setcell(src->bl.m,src->bl.x,src->bl.y,CELL_SETPASS);
map_setcell(src->bl.m,src->bl.x,src->bl.y,src->val2);
clif_changemapcell(src->bl.m,src->bl.x,src->bl.y,src->val2,1);
break;
@@ -7290,7 +7292,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
case ST_WATER:
- if(map_getcell(sd->bl.m,sd->bl.x,sd->bl.y) != 3 && (sd->sc_data[SC_DELUGE].timer==-1)){ //水場判定
+ if((!map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER))&& (sd->sc_data[SC_DELUGE].timer==-1)){ //水場判定
clif_skill_fail(sd,skill,0,0);
return 0;
}
@@ -10422,8 +10424,7 @@ int skill_check_cloaking(struct block_list *bl)
else if(bl->type == BL_MOB && !battle_config.monster_cloak_check_type)
return 0;
for(i=0;i<sizeof(dx)/sizeof(dx[0]);i++){
- int c=map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i]);
- if(c==1 || c==5) {
+ if(map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i],CELL_CHKNOPASS)) {
end=0;
break;
}
@@ -10460,8 +10461,7 @@ int skill_type_cloaking(struct block_list *bl)
return 0;
for(i=0; i<sizeof(dx)/sizeof(dx[0]); i++)
{
- int c=map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i]);
- if(c==1 || c==5)
+ if(map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i],CELL_CHKNOPASS))
return 0;
}
return 1;