summaryrefslogtreecommitdiff
path: root/src/map/clif.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/clif.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/clif.c')
-rw-r--r--src/map/clif.c70
1 files changed, 41 insertions, 29 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 1d4a7a437..f649093db 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6680,35 +6680,47 @@ int clif_guild_skillinfo(struct map_session_data *sd)
memset(WFIFOP(fd,c*37+18),0,24);
if(g->skill[i].lv < guild_skill_get_max(id)) {
//Kafra and Guardian changed to require Approval [Sara]
- if (g->skill[i].id == GD_KAFRACONTACT && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_GUARDIANRESEARCH && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- //Glory skill requirements -- Pretty sure correct [Sara]
- else if (g->skill[i].id == GD_LEADERSHIP && guild_checkskill(g,GD_GLORYGUILD) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_GLORYWOUNDS && guild_checkskill(g,GD_GLORYGUILD) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_SOULCOLD && guild_checkskill(g,GD_GLORYWOUNDS) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_HAWKEYES && guild_checkskill(g,GD_LEADERSHIP) <= 0)
- up = 0;
- //Activated skill requirements -- Just guesses [Sara]
- else if (g->skill[i].id == GD_BATTLEORDER && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_REGENERATION && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_RESTORE && guild_checkskill(g,GD_REGENERATION) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_EMERGENCYCALL && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- if (g->skill[i].id == GD_GUARDUP && guild_checkskill(g,GD_GUARDIANRESEARCH) <= 0)
- up = 0;
- //Unadded yet? Has extension description in kRO tables
- else if (g->skill[i].id == GD_DEVELOPMENT)
- up = 0;
- else
- up = 1;
+ switch (g->skill[i].id)
+ {
+ case GD_KAFRACONTACT:
+ case GD_GUARDIANRESEARCH:
+ case GD_GUARDUP:
+ up = guild_checkskill(g,GD_APPROVAL) > 0;
+ break;
+ case GD_LEADERSHIP:
+ //Glory skill requirements -- Pretty sure correct [Sara]
+ up = guild_checkskill(g,GD_GLORYGUILD) > 0;
+ break;
+ case GD_GLORYWOUNDS:
+ up = guild_checkskill(g,GD_GLORYGUILD) > 0;
+ break;
+ case GD_SOULCOLD:
+ up = guild_checkskill(g,GD_GLORYWOUNDS) > 0;
+ break;
+ case GD_HAWKEYES:
+ up = guild_checkskill(g,GD_LEADERSHIP) > 0;
+ break;
+ case GD_BATTLEORDER:
+ up = guild_checkskill(g,GD_APPROVAL) > 0 &&
+ guild_checkskill(g,GD_EXTENSION) >= 2;
+ break;
+ case GD_REGENERATION:
+ up = guild_checkskill(g,GD_EXTENSION) >= 5 &&
+ guild_checkskill(g,GD_BATTLEORDER) > 0;
+ break;
+ case GD_RESTORE:
+ up = guild_checkskill(g,GD_REGENERATION) >= 2;
+ break;
+ case GD_EMERGENCYCALL:
+ up = guild_checkskill(g,GD_GUARDIANRESEARCH) > 0 &&
+ guild_checkskill(g,GD_REGENERATION) > 0;
+ break;
+ case GD_DEVELOPMENT:
+ up = 0;
+ break;
+ default:
+ up = 1;
+ }
}
else {
up = 0;