From faa7a02a489886461cd039cc306f1fc55d81daa5 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Tue, 9 Jan 2007 17:31:13 +0000 Subject: - Changes to script buildin functions: * functions checking if a player is attached as soon as possible. * functions that required a player attached and would crash if none was there terminate the script now. (others keep the current behaviour to maintain full backward compatibility) * removed the unused flag argument in guildskill. * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same script-wise) * added an optional parameter to setcart,setfalcon,setriding so it's possible to remove the cart/falcon/mount or select a specific cart * other cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index 49d5dd0db..b71b6344b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1171,26 +1171,23 @@ int guild_getexp(struct map_session_data *sd,int exp) } // スキルポイント割り振り -int guild_skillup(struct map_session_data *sd,int skill_num,int flag) +int guild_skillup(TBL_PC* sd, int skill_num) { - struct guild *g; + struct guild* g; int idx = skill_num - GD_SKILLBASE; nullpo_retr(0, sd); - if(idx < 0 || idx >= MAX_GUILDSKILL) - - return 0; - if(sd->status.guild_id==0 || (g=guild_search(sd->status.guild_id))==NULL) - return 0; - if(strcmp(sd->status.name,g->master)) + if( idx < 0 || idx >= MAX_GUILDSKILL || // not a guild skill + sd->status.guild_id == 0 || (g=guild_search(sd->status.guild_id)) == NULL || // no guild + strcmp(sd->status.name, g->master) ) // not the guild master return 0; - if( (g->skill_point>0 || flag&1) && - g->skill[idx].id!=0 && - g->skill[idx].lv < guild_skill_get_max(skill_num) ){ - intif_guild_skillup(g->guild_id,skill_num,sd->status.account_id,flag); - } + if( g->skill_point > 0 && + g->skill[idx].id != 0 && + g->skill[idx].lv < guild_skill_get_max(skill_num) ) + intif_guild_skillup(g->guild_id, skill_num, sd->status.account_id); + return 0; } // スキルポイント割り振り通知 -- cgit v1.2.3-60-g2f50