summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-15 19:37:40 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-15 19:37:40 +0000
commit51ca6fafbdf5e9840aab1859d99be5738cfd7571 (patch)
tree5ab199ac5fce61d8c086fc15c345065363f0d493 /src/map/pc.c
parent4e003aea5ffaa764bf0e40a63ea314c56903fda0 (diff)
downloadhercules-51ca6fafbdf5e9840aab1859d99be5738cfd7571.tar.gz
hercules-51ca6fafbdf5e9840aab1859d99be5738cfd7571.tar.bz2
hercules-51ca6fafbdf5e9840aab1859d99be5738cfd7571.tar.xz
hercules-51ca6fafbdf5e9840aab1859d99be5738cfd7571.zip
* Updated Forging and Potion making formulas
* Modified guild skills * Initialise 'canregen' when logging into map - Updated Steel Body, Thunderstorm, Investigate and Magic Crasher - Removed elunium and oridecon from produce_db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@575 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c64
1 files changed, 35 insertions, 29 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 9c6e777ca..8e7f607ce 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -709,6 +709,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->inchealspiritsptick = 0;
sd->canact_tick = tick;
sd->canmove_tick = tick;
+ sd->canregen_tick = tick;
sd->attackabletime = tick;
sd->doridori_counter = 0;
@@ -1477,37 +1478,33 @@ int pc_calcstatus(struct map_session_data* sd,int first)
if (sd->status.guild_id > 0) {
struct guild *g;
if ((g = guild_search(sd->status.guild_id)) && strcmp(sd->status.name,g->master)==0) {
- if (!sd->sc_data[SC_LEADERSHIP].val4 && guild_checkskill(g, GD_LEADERSHIP)>0) {
- //skill_status_change_start(&sd->bl,SC_LEADERSHIP,1,0,0,0,0,0 );
+ if (!sd->state.leadership_flag && guild_checkskill(g, GD_LEADERSHIP)>0) {
skill_unitsetting(&sd->bl,GD_LEADERSHIP,1,sd->bl.x,sd->bl.y,0);
}
- if (!sd->sc_data[SC_GLORYWOUNDS].val4 && guild_checkskill(g, GD_GLORYWOUNDS)>0) {
- //skill_status_change_start(&sd->bl,SC_GLORYWOUNDS,1,0,0,0,0,0 );
+ if (!sd->state.glorywounds_flag && guild_checkskill(g, GD_GLORYWOUNDS)>0) {
skill_unitsetting(&sd->bl,GD_GLORYWOUNDS,1,sd->bl.x,sd->bl.y,0);
}
- if (!sd->sc_data[SC_SOULCOLD].val4 && guild_checkskill(g, GD_SOULCOLD)>0) {
- //skill_status_change_start(&sd->bl,SC_SOULCOLD,1,0,0,0,0,0 );
+ if (!sd->state.soulcold_flag && guild_checkskill(g, GD_SOULCOLD)>0) {
skill_unitsetting(&sd->bl,GD_SOULCOLD,1,sd->bl.x,sd->bl.y,0);
}
- if (!sd->sc_data[SC_HAWKEYES].val4 && guild_checkskill(g, GD_HAWKEYES)>0) {
- //skill_status_change_start(&sd->bl,SC_HAWKEYES,1,0,0,0,0,0 );
+ if (!sd->state.hawkeyes_flag && guild_checkskill(g, GD_HAWKEYES)>0) {
skill_unitsetting(&sd->bl,GD_HAWKEYES,1,sd->bl.x,sd->bl.y,0);
}
}
- else if (sd->sc_count) {
- if (sd->sc_data[SC_LEADERSHIP].timer != -1)
- sd->paramb[0] += 2;
- if (sd->sc_data[SC_GLORYWOUNDS].timer != -1)
- sd->paramb[2] += 2;
- if (sd->sc_data[SC_SOULCOLD].timer != -1)
- sd->paramb[1] += 2;
- if (sd->sc_data[SC_HAWKEYES].timer != -1)
- sd->paramb[4] += 2;
- if (sd->sc_data[SC_BATTLEORDERS].timer != -1) {
+ else if (g) {
+ if (sd->sc_count && sd->sc_data[SC_BATTLEORDERS].timer != -1) {
sd->paramb[0]+= 5;
sd->paramb[3]+= 5;
sd->paramb[4]+= 5;
}
+ if (sd->state.leadership_flag)
+ sd->paramb[0] += 2;
+ if (sd->state.glorywounds_flag)
+ sd->paramb[2] += 2;
+ if (sd->state.soulcold_flag)
+ sd->paramb[1] += 2;
+ if (sd->state.hawkeyes_flag)
+ sd->paramb[4] += 2;
}
}
@@ -4207,17 +4204,26 @@ int pc_walktoxy(struct map_session_data *sd,int x,int y)
if (sd->sc_data && sd->status.guild_id > 0) {
struct skill_unit *su;
- if (sd->sc_data[SC_LEADERSHIP].val4 && (su=(struct skill_unit *)sd->sc_data[SC_LEADERSHIP].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
- }
- if (sd->sc_data[SC_GLORYWOUNDS].val4 && (su=(struct skill_unit *)sd->sc_data[SC_GLORYWOUNDS].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
- }
- if (sd->sc_data[SC_SOULCOLD].val4 && (su=(struct skill_unit *)sd->sc_data[SC_SOULCOLD].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
- }
- if (sd->sc_data[SC_HAWKEYES].val4 && (su=(struct skill_unit *)sd->sc_data[SC_HAWKEYES].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
+ struct skill_unit_group *sg;
+ //if (sd->sc_data[SC_LEADERSHIP].val4 && (su=(struct skill_unit *)sd->sc_data[SC_LEADERSHIP].val4)) {
+ if (sd->state.leadership_flag && (su=(struct skill_unit *)sd->state.leadership_flag) &&
+ (sg=su->group) && sg->src_id == sd->bl.id) {
+ skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
+ }
+ //if (sd->sc_data[SC_GLORYWOUNDS].val4 && (su=(struct skill_unit *)sd->sc_data[SC_GLORYWOUNDS].val4)) {
+ if (sd->state.glorywounds_flag && (su=(struct skill_unit *)sd->state.glorywounds_flag) &&
+ (sg=su->group) && sg->src_id == sd->bl.id) {
+ skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
+ }
+ //if (sd->sc_data[SC_SOULCOLD].val4 && (su=(struct skill_unit *)sd->sc_data[SC_SOULCOLD].val4)) {
+ if (sd->state.soulcold_flag && (su=(struct skill_unit *)sd->state.soulcold_flag) &&
+ (sg=su->group) && sg->src_id == sd->bl.id) {
+ skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
+ }
+ //if (sd->sc_data[SC_HAWKEYES].val4 && (su=(struct skill_unit *)sd->sc_data[SC_HAWKEYES].val4)) {
+ if (sd->state.hawkeyes_flag && (su=(struct skill_unit *)sd->state.hawkeyes_flag) &&
+ (sg=su->group) && sg->src_id == sd->bl.id) {
+ skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y));
}
}