summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-02 21:21:37 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:21:56 +0200
commit408878cc59bf0ad0154f7b9c7f5367ea530a9362 (patch)
treef1eb265bbdf9d7ce38d8c7c57bfadac3ddc7c79f /src/map
parentaf8ecd8af6a33b598844decff9b021bd07c931ce (diff)
downloadhercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.gz
hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.bz2
hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.xz
hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.zip
Implemented SU_SPRITEMABLE Skill.
MaxHP + 1000, MaxSP + 100. Show's Spirit of Sea, Land and Life around the sprite when skill is learned.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c6
-rw-r--r--src/map/status.c17
2 files changed, 22 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 09f805d82..8f6d3bcb0 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7405,6 +7405,9 @@ int pc_resetskill(struct map_session_data* sd, int flag)
if( homun_alive(sd->hd) && pc->checkskill(sd, AM_CALLHOMUN) )
homun->vaporize(sd, HOM_ST_REST);
+
+ if ((sd->sc.data[SC_SPRITEMABLE] && pc->checkskill(sd, SU_SPRITEMABLE)))
+ status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER);
}
for( i = 1; i < MAX_SKILL; i++ ) {
@@ -8627,6 +8630,9 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if(homun_alive(sd->hd) && !pc->checkskill(sd, AM_CALLHOMUN))
homun->vaporize(sd, HOM_ST_REST);
+ if ((sd->sc.data[SC_SPRITEMABLE] && pc->checkskill(sd, SU_SPRITEMABLE)))
+ status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER);
+
if(sd->status.manner < 0)
clif->changestatus(sd,SP_MANNER,sd->status.manner);
diff --git a/src/map/status.c b/src/map/status.c
index 8a8cf123e..bb1107ee6 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1004,6 +1004,9 @@ void initChangeTables(void)
status->dbs->IconChangeTable[SC_MAGICAL_FEATHER] = SI_MAGICAL_FEATHER;
status->dbs->IconChangeTable[SC_BLOSSOM_FLUTTERING] = SI_BLOSSOM_FLUTTERING;
+ // Summoner
+ status->dbs->IconChangeTable[SC_SPRITEMABLE] = SI_SPRITEMABLE;
+
// Other SC which are not necessarily associated to skills.
status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] |= SCB_ASPD;
status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] |= SCB_ASPD;
@@ -2742,9 +2745,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
bstatus->max_hp = (unsigned int)cap_value(i64, 0, INT_MAX);
// Absolute modifiers from passive skills
- if((skill_lv=pc->checkskill(sd,CR_TRUST))>0)
+ if ((skill_lv=pc->checkskill(sd,CR_TRUST)) > 0)
bstatus->max_hp += skill_lv*200;
+ if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0)
+ bstatus->max_hp += 1000;
+
// Apply relative modifiers from equipment
if(sd->hprate < 0)
sd->hprate = 0;
@@ -2777,6 +2783,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
bstatus->max_sp += 200 + 20 * skill_lv;
if( (skill_lv = pc->checkskill(sd,WM_LESSON)) > 0 )
bstatus->max_sp += 30 * skill_lv;
+ if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0)
+ bstatus->max_sp += 100;
// Apply relative modifiers from equipment
if(sd->sprate < 0)
@@ -3184,6 +3192,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
clif->updatestatus(sd,SP_CARTINFO);
}
+ // Spirit Marble status activates automatically for a infinite
+ // amount of time when the skill is learned. Felt this was the
+ // best place to put this. [Rytech]
+ if (pc->checkskill(sd, SU_SPRITEMABLE))
+ sc_start(&sd->bl, &sd->bl, SC_SPRITEMABLE, 100, 1, INFINITE_DURATION);
+
calculating = 0;
return 0;
@@ -9753,6 +9767,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
if (!mob->db_checkid(val1))
val1 = MOBID_PORING;
break;
+ case SC_SPRITEMABLE:
case SC_ALL_RIDING:
tick = INFINITE_DURATION;
break;