summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/skill.c36
2 files changed, 14 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index c77fdceba..0d9491339 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2009/05/07
+ * Fixed players can pull water from ME cell (follow up to r13730) [Inkfish]
2009/05/04
* Added the md5() script command. [brianluau]
* Now if a dead player is moved for whatever reason, he'll be alive with 1 HP. (bugreport:70) [Inkfish]
diff --git a/src/map/skill.c b/src/map/skill.c
index 098f6c327..a5600d74b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2826,41 +2826,29 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case WZ_WATERBALL:
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
{
- int range = skilllv/2;
- int size = 2*range + 1;
+ int range = skilllv / 2;
+ int maxlv = skill_get_max(skillid); // learnable level
int count = 0;
int x, y;
+ struct skill_unit* unit;
- if( src->type == BL_PC )
- {// count the number of water cells in range
- struct skill_unit* unit;
- int maxlv = skill_get_max(skillid);
+ if( src->type == BL_PC && skilllv > maxlv )
+ range = maxlv / 2;
- if( skilllv > maxlv )
- range = maxlv / 2;
-
- for( y = src->y - range; y <= src->y + range; ++y )
- for( x = src->x - range; x <= src->x + range; ++x )
+ for( y = src->y - range; y <= src->y + range; ++y )
+ for( x = src->x - range; x <= src->x + range; ++x )
+ {
+ if( !map_find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL) )
{
- if( map_getcell(src->m,x,y,CELL_CHKWATER) )
+ if( src->type != BL_PC || map_getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement
count++; // natural water cell
- else
- if( (unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL)) != NULL
- || (unit = map_find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL)) != NULL )
+ else if( (unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL)) != NULL || (unit = map_find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL)) != NULL )
{
count++; // skill-induced water cell
skill_delunit(unit); // consume cell
}
}
- }
- else
- { // non-players bypass the water requirement
- count = size*size;
- for( y = src->y - range; y <= src->y + range; ++y )
- for( x = src->x - range; x <= src->x + range; ++x )
- if( map_find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL) != NULL )
- count--;
- }
+ }
if( count > 1 ) // queue the remaining count - 1 timerskill Waterballs
skill_addtimerskill(src,tick+150,bl->id,0,0,skillid,skilllv,count-1,flag);