summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-20 14:11:43 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-20 14:11:43 +0000
commitce070c5d8303a15fec032721e0163bdce4e84c33 (patch)
tree8fe5d38dec3a05af1c2e82571318d76e78d754fe /src/map/skill.c
parent3d791e7ca59391cab1fb2054fd97b221fce3bb99 (diff)
downloadhercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.gz
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.bz2
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.xz
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.zip
* Added skill requirements for the new guild skills
* Allow Emergency Recall to be cast in guild castles * Add 'minimum job level required' for skill_tree reading - Berserk now requires job level 50 * Added Spring Trap to be able to trigger ankle snare traps that aren't activated yet * Added a fix in guild.c by Mellowz * Some rewrites on the pet skill bonuses system * Check whether a monster is still alive before starting a status change git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1142 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 03704839f..1eb09a8b7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4239,6 +4239,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
struct skill_unit *su=NULL;
if((bl->type==BL_SKILL) && (su=(struct skill_unit *)bl) && (su->group) ){
switch(su->group->unit_id){
+ case 0x91: // ankle snare
+ if (su->group->val2 != 0)
+ // if it is already trapping something don't spring it,
+ // remove trap should be used instead
+ break;
+ // otherwise fallthrough to below
case 0x8f: /* ブラストマイン */
case 0x90: /* スキッドトラップ */
case 0x93: /* ランドマイン */
@@ -4490,7 +4496,9 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
int j = 0;
struct guild *g = NULL;
// Only usable during WoE
- if (!agit_flag) {
+ if (!agit_flag ||
+ (sd && map[sd->bl.m].flag.nowarpto && // if not allowed to warp to the map
+ guild_mapname2gc(sd->mapname) == NULL)) { // and it's not a castle...
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 0;
@@ -4500,8 +4508,10 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
strcmp(sd->status.name,g->master)==0) {
for(i = 0; i < g->max_member; i++, j++) {
if (j>8) j=0;
- if ((dstsd = g->member[i].sd) != NULL && sd != dstsd &&
- !map[sd->bl.m].flag.nowarpto && !map[dstsd->bl.m].flag.nowarp) {
+ if ((dstsd = g->member[i].sd) != NULL && sd != dstsd) {
+ if (map[dstsd->bl.m].flag.nowarp &&
+ guild_mapname2gc(sd->mapname) == NULL)
+ continue;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if(map_getcell(sd->bl.m,sd->bl.x+dx[j],sd->bl.y+dy[j],CELL_CHKNOPASS))
dx[j] = dy[j] = 0;
@@ -6325,7 +6335,7 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
{
struct map_session_data *sd = NULL;
struct map_session_data *p_sd = NULL;
- if((sd = (struct map_session_data *)(map_id2bl(sg->src_id))) == NULL)
+ if((sd = map_id2sd(sg->src_id)) == NULL)
return 0;
if((p_sd = pc_get_partner(sd)) == NULL)
return 0;