summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 17:31:13 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 17:31:13 +0000
commitfaa7a02a489886461cd039cc306f1fc55d81daa5 (patch)
tree07ba43506b1c277d7033855c5495dd0e7444ae39 /src/map/guild.c
parentdde71c808130e2923b321561d3d772e0e734b725 (diff)
downloadhercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.gz
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.bz2
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.xz
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.zip
- 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
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c23
1 files changed, 10 insertions, 13 deletions
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;
}
// スキルポイント割り振り通知