diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 7 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 23 |
4 files changed, 18 insertions, 15 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 3f9e5e6c4..dd95009d8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5353,7 +5353,7 @@ int clif_skill_delunit(struct skill_unit *unit) * ワープ場所選択
*------------------------------------------
*/
-int clif_skill_warppoint(struct map_session_data *sd,int skill_num, int skill_lv,
+int clif_skill_warppoint(struct map_session_data *sd,int skill_num,int skill_lv,
const char *map1,const char *map2,const char *map3,const char *map4)
{
int fd;
@@ -5370,7 +5370,10 @@ int clif_skill_warppoint(struct map_session_data *sd,int skill_num, int skill_lv strncpy((char*)WFIFOP(fd,52),map4,MAP_NAME_LENGTH);
WFIFOSET(fd,packet_len_table[0x11c]);
sd->menuskill_id = skill_num;
- sd->menuskill_lv = skill_lv;
+ if (skill_num == AL_WARP)
+ sd->menuskill_lv = (sd->ud.skillx<<16)|sd->ud.skilly; //Store warp position here.
+ else
+ sd->menuskill_lv = skill_lv;
return 0;
}
/*==========================================
diff --git a/src/map/map.h b/src/map/map.h index b80f6f295..633c7d5da 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -507,7 +507,6 @@ struct map_session_data { int cart_weight,cart_max_weight,cart_num,cart_max_num;
int fd;
unsigned short mapindex;
- short to_x,to_y;
short speed,prev_speed;
unsigned char head_dir;
unsigned int client_tick,server_tick;
diff --git a/src/map/pc.c b/src/map/pc.c index 75ce05530..d76f83337 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3226,7 +3226,7 @@ int pc_walktodir(struct map_session_data *sd,int step) to_x += dir_x;
to_y += dir_y;
}
- unit_walktoxy(&sd->bl, sd->to_x, sd->to_y, 1);
+ unit_walktoxy(&sd->bl, to_x, to_y, 1);
return 1;
}
diff --git a/src/map/skill.c b/src/map/skill.c index dd30b56f5..4a6032d2b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6153,7 +6153,7 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma {
const struct point *p[4];
struct skill_unit_group *group;
- int i, lv;
+ int i, lv, wx, wy;
int maxcount=0;
unsigned short mapindex;
mapindex = mapindex_name2id((char*)map);
@@ -6178,7 +6178,11 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma return 0;
}
}
- lv = sd->menuskill_lv;
+
+ lv = sd->skillitem==skill_num?sd->menuskill_lv:pc_checkskill(sd,skill_num);
+ wx = sd->menuskill_lv>>16;
+ wy = sd->menuskill_lv&0xffff;
+
if(lv <= 0) return 0;
for(i=0;i<lv;i++){
if(mapindex == p[i]->map){
@@ -6191,28 +6195,25 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma skill_failed(sd);
return 0;
}
- //FIXME: What about when you use another ground skill? skillx
- //and skilly are messed up already... [Skotlex]
- if(!skill_check_condition(sd, sd->menuskill_id, sd->menuskill_lv,3)) //This checks versus skillid/skilllv...
+
+ if(!skill_check_condition(sd, sd->menuskill_id, lv,3)) //This checks versus skillid/skilllv...
{
skill_failed(sd);
return 0;
}
- if(skill_check_unit_range2(&sd->bl,sd->bl.m,sd->ud.skillx,sd->ud.skilly,skill_num,lv) > 0) {
+ if(skill_check_unit_range2(&sd->bl,sd->bl.m,wx,wy,skill_num,lv) > 0) {
clif_skill_fail(sd,0,0,0);
skill_failed(sd);
return 0;
}
- if((group=skill_unitsetting(&sd->bl,skill_num,lv,sd->ud.skillx,sd->ud.skilly,0))==NULL) {
+ if((group=skill_unitsetting(&sd->bl,skill_num,lv,wx,wy,0))==NULL) {
skill_failed(sd);
return 0;
}
//Now that there's a mapindex, use that in val3 rather than a string. [Skotlex]
- group->val3 = mapindex;
-// group->valstr=(char *)aCallocA(MAP_NAME_LENGTH,sizeof(char));
-// memcpy(group->valstr,map,MAP_NAME_LENGTH-1);
group->val2=(x<<16)|y;
+ group->val3 = mapindex;
}
break;
}
@@ -6572,7 +6573,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int if(bl->type==BL_PC){
struct map_session_data *sd = (struct map_session_data *)bl;
if((!sd->chatID || battle_config.chat_warpportal)
- && sd->to_x == src->bl.x && sd->to_y == src->bl.y) {
+ && sd->ud.to_x == src->bl.x && sd->ud.to_y == src->bl.y) {
if (pc_setpos(sd,sg->val3,sg->val2>>16,sg->val2&0xffff,3) == 0) {
if (--sg->val1<=0 || sg->src_id == bl->id)
skill_delunitgroup(sg);
|