diff options
author | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-02 20:37:54 +0530 |
---|---|---|
committer | hemagx <ibrahem.h.basyone@gmail.com> | 2016-10-22 02:21:48 +0200 |
commit | 473ba564829a6d0153e320d1f302754442648ec7 (patch) | |
tree | 17b2470fcff090af25e854a4df0160b1f89eaa38 /src/map/pc.c | |
parent | 7c72c942d52915cb7c5c9692bd927772ad34bcca (diff) | |
download | hercules-473ba564829a6d0153e320d1f302754442648ec7.tar.gz hercules-473ba564829a6d0153e320d1f302754442648ec7.tar.bz2 hercules-473ba564829a6d0153e320d1f302754442648ec7.tar.xz hercules-473ba564829a6d0153e320d1f302754442648ec7.zip |
Implemented SU_BASIC_SKILL Skill of Summoner
Added Function for Basic Skills check.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index b6f2d375d..a0d9d5812 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7428,7 +7428,9 @@ int pc_resetskill(struct map_session_data* sd, int flag) } // do not reset basic skill - if( skill_id == NV_BASIC && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) + if (skill_id == NV_BASIC && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE) + continue; + if (skill_id == SU_BASIC_SKILL && (sd->class_&MAPID_BASEMASK) != MAPID_SUMMONER) continue; if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED ) @@ -11669,6 +11671,18 @@ int pc_have_magnifier(struct map_session_data *sd) } /** + * Checks if player have basic skills learned. + * @param sd Player Data + * @param level Required Level of Novice Skill + * @return bool true, if requirement is satisfied + */ +bool pc_check_basicskill(struct map_session_data *sd, int level) { + if (pc->checkskill(sd, NV_BASIC) >= level || pc->checkskill(sd, SU_BASIC_SKILL)) + return true; + return false; +} + +/** * Verifies a chat message, searching for atcommands, checking if the sender * character can chat, and updating the idle timer. * @@ -12124,4 +12138,6 @@ void pc_defaults(void) { pc->update_idle_time = pc_update_idle_time; pc->have_magnifier = pc_have_magnifier; + + pc->check_basicskill = pc_check_basicskill; } |