- Merged some splash changes from stable. Sharp-Shooting will now display a skill animation.

- The no_spawn_on_player setting will now also work for static mobs, but only if the setting is set to 100 or higher.
- Some small cleanups.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8887 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-09-27 15:07:55 +00:00
parent 5e1a7c1b24
commit 9eeaa9cb7e
5 changed files with 25 additions and 8 deletions

View File

@ -3,6 +3,10 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. 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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/27
* Sharp-Shooting will now display a skill animation. [Skotlex]
* The no_spawn_on_player setting will now also work for static mobs, but
only if the setting is set to 100 or higher. [Skotlex]
2006/09/26 2006/09/26
* Yet again messed with the packet sent during a splash attack, but this * Yet again messed with the packet sent during a splash attack, but this
time taking into account the packets that eA was using some many revisions time taking into account the packets that eA was using some many revisions

View File

@ -119,6 +119,8 @@ boss_spawn_delay: 100
// and spawning the mob within player-view anyway, unless the max (100) is used, // and spawning the mob within player-view anyway, unless the max (100) is used,
// in which case the mob will not be spawned, and it'll be retried again in // in which case the mob will not be spawned, and it'll be retried again in
// 5 seconds. // 5 seconds.
// NOTE: This has no effect on mobs that always spawn on the very same cell
// (like ant eggs) except if you set it to the max.
no_spawn_on_player: 0 no_spawn_on_player: 0
// Should spawn coordinates in the mob-spawn files be ignored? (Note 1) // Should spawn coordinates in the mob-spawn files be ignored? (Note 1)

View File

@ -1072,7 +1072,7 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
// S // S
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Methodology: // Methodology:
// My trigonometrics and math is a little rusty... so the approach I am writing // My trigonometrics and math are a little rusty... so the approach I am writing
// here is basicly do a double for to check for all targets in the square that // here is basicly do a double for to check for all targets in the square that
// contains the initial and final positions (area range increased to match the // contains the initial and final positions (area range increased to match the
// radius given), then for each object to test, calculate the distance to the // radius given), then for each object to test, calculate the distance to the
@ -1082,9 +1082,10 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
// http://astronomy.swin.edu.au/~pbourke/geometry/pointline/ // http://astronomy.swin.edu.au/~pbourke/geometry/pointline/
// (they have a link to a C implementation, too) // (they have a link to a C implementation, too)
// This approach is a lot like #2 commented on this function, which I have no // This approach is a lot like #2 commented on this function, which I have no
// idea why it was commented. I won't use doubles/floats, but pure int math for speed purposes // idea why it was commented. I won't use doubles/floats, but pure int math for
// The range considered is always the same no matter how close/far the target is because that's // speed purposes. The range considered is always the same no matter how
// how SharpShooting works currently in kRO. // close/far the target is because that's how SharpShooting works currently in
// kRO.
//Generic map_foreach* variables. //Generic map_foreach* variables.
va_list ap; va_list ap;
@ -1218,6 +1219,7 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
map_freeblock_lock(); map_freeblock_lock();
for(i=blockcount;i<bl_list_count;i++) for(i=blockcount;i<bl_list_count;i++)
if(bl_list[i]->prev) //This check is done in case some object gets killed due to further skill processing.
returnCount += func(bl_list[i],ap); returnCount += func(bl_list[i],ap);
map_freeblock_unlock(); map_freeblock_unlock();

View File

@ -619,6 +619,11 @@ int mob_setdelayspawn(struct mob_data *md)
return 0; return 0;
} }
static int mob_count_sub(struct block_list *bl,va_list ap)
{
return 1;
}
/*========================================== /*==========================================
* Mob spawning. Initialization is also variously here. * Mob spawning. Initialization is also variously here.
*------------------------------------------ *------------------------------------------
@ -655,6 +660,11 @@ int mob_spawn (struct mob_data *md)
add_timer(tick+5000,mob_delayspawn,md->bl.id,0); add_timer(tick+5000,mob_delayspawn,md->bl.id,0);
return 1; return 1;
} }
} else if (battle_config.no_spawn_on_player>99 &&
map_foreachinrange(mob_count_sub, &md->bl, AREA_SIZE, BL_PC))
{ //retry again later (players on sight)
add_timer(tick+5000,mob_delayspawn,md->bl.id,0);
return 1;
} }
} }
malloc_set(&md->state, 0, sizeof(md->state)); malloc_set(&md->state, 0, sizeof(md->state));

View File

@ -2031,7 +2031,6 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
case NPC_SPLASHATTACK: case NPC_SPLASHATTACK:
case TF_DOUBLE: case TF_DOUBLE:
case GS_CHAINACTION: case GS_CHAINACTION:
case SN_SHARPSHOOTING:
dmg.dmotion = clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2); dmg.dmotion = clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2);
break; break;
default: default:
@ -4038,8 +4037,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case NJ_HYOUSYOURAKU: case NJ_HYOUSYOURAKU:
case NJ_RAIGEKISAI: case NJ_RAIGEKISAI:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
case WZ_FROSTNOVA: case WZ_FROSTNOVA:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_area_temp[1] = 0; skill_area_temp[1] = 0;
map_foreachinrange(skill_attack_area, src, map_foreachinrange(skill_attack_area, src,
skill_get_splash(skillid, skilllv), BL_CHAR, skill_get_splash(skillid, skilllv), BL_CHAR,