summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-28 02:52:04 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-28 02:52:04 +0000
commitd6ae72f50152bf2a7df68ea0936aab1243d73bf8 (patch)
treef3df918175d82854c98bfc57f76a119d62b9e456 /src/map
parent5f3c3eb78ea2995449f78709768976775ca7f3d6 (diff)
downloadhercules-d6ae72f50152bf2a7df68ea0936aab1243d73bf8.tar.gz
hercules-d6ae72f50152bf2a7df68ea0936aab1243d73bf8.tar.bz2
hercules-d6ae72f50152bf2a7df68ea0936aab1243d73bf8.tar.xz
hercules-d6ae72f50152bf2a7df68ea0936aab1243d73bf8.zip
* Implemented Summer Outfit care of Zephyrus_CR.
- Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation of the 12.1 Guild Castles. * Added constants for Summer Outfit and updated the Summer_Event_Suit item script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11321 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c16
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/pc.c16
-rw-r--r--src/map/status.c21
-rw-r--r--src/map/status.h2
7 files changed, 46 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 935bc52b9..4d71f951c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3447,6 +3447,7 @@ static const struct _battle_data {
{ "wedding_modifydisplay", &battle_config.wedding_modifydisplay, 0, 0, 1, },
{ "wedding_ignorepalette", &battle_config.wedding_ignorepalette, 0, 0, 1, },
{ "xmas_ignorepalette", &battle_config.xmas_ignorepalette, 0, 0, 1, },
+ { "summer_ignorepalette", &battle_config.summer_ignorepalette, 0, 0, 1, },
{ "natural_healhp_interval", &battle_config.natural_healhp_interval, 6000, NATURAL_HEAL_INTERVAL, INT_MAX, },
{ "natural_healsp_interval", &battle_config.natural_healsp_interval, 8000, NATURAL_HEAL_INTERVAL, INT_MAX, },
{ "natural_heal_skill_interval", &battle_config.natural_heal_skill_interval, 10000, NATURAL_HEAL_INTERVAL, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index e4704ce2f..855c92a6a 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -200,6 +200,7 @@ extern struct Battle_Config
int wedding_modifydisplay;
int wedding_ignorepalette; //[Skotlex]
int xmas_ignorepalette; // [Valaris]
+ int summer_ignorepalette; // [Zephyrus]
int natural_healhp_interval;
int natural_healsp_interval;
int natural_heal_skill_interval;
diff --git a/src/map/clif.c b/src/map/clif.c
index 97e452874..0792f59d5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -718,7 +718,7 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
struct item_data *id;
#endif
- if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
+ if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER))
{
*rhand = *lhand = 0;
return;
@@ -2672,11 +2672,12 @@ int clif_changelook(struct block_list *bl,int type,int val)
break;
case LOOK_BASE:
vd->class_ = val;
- if (vd->class_ == JOB_WEDDING || vd->class_ == JOB_XMAS)
+ if (vd->class_ == JOB_WEDDING || vd->class_ == JOB_XMAS || vd->class_ == JOB_SUMMER)
vd->weapon = vd->shield = 0;
if (vd->cloth_color && (
(vd->class_ == JOB_WEDDING && battle_config.wedding_ignorepalette) ||
- (vd->class_ == JOB_XMAS && battle_config.xmas_ignorepalette)
+ (vd->class_ == JOB_XMAS && battle_config.xmas_ignorepalette) ||
+ (vd->class_ == JOB_SUMMER && battle_config.summer_ignorepalette)
))
clif_changelook(bl,LOOK_CLOTHES_COLOR,0);
break;
@@ -2698,7 +2699,8 @@ int clif_changelook(struct block_list *bl,int type,int val)
case LOOK_CLOTHES_COLOR:
if (val && (
(vd->class_ == JOB_WEDDING && battle_config.wedding_ignorepalette) ||
- (vd->class_ == JOB_XMAS && battle_config.xmas_ignorepalette)
+ (vd->class_ == JOB_XMAS && battle_config.xmas_ignorepalette) ||
+ (vd->class_ == JOB_SUMMER && battle_config.summer_ignorepalette)
))
val = 0;
vd->cloth_color = val;
@@ -8651,7 +8653,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
if (clif_cant_act(sd) || sd->sc.option&OPTION_HIDE)
return;
- if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
+ if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER))
return;
if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) {
@@ -9522,7 +9524,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
return;
}
- if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
+ if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER))
return;
if(target_id<0 && -target_id == sd->bl.id) // for disguises [Valaris]
@@ -9628,7 +9630,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll
return;
}
- if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
+ if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER))
return;
if(sd->menuskill_id)
diff --git a/src/map/map.h b/src/map/map.h
index d894dffa9..558d7c4b1 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -95,6 +95,7 @@ enum {
MAPID_GUNSLINGER,
MAPID_NINJA,
MAPID_XMAS, // [Valaris]
+ MAPID_SUMMER, // [Zephyrs]
//2_1 classes
MAPID_SUPER_NOVICE = JOBL_2_1|0x0,
MAPID_KNIGHT,
diff --git a/src/map/pc.c b/src/map/pc.c
index aafc2260b..7a60b7232 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3777,6 +3777,9 @@ int pc_jobid2mapid(unsigned short b_class)
case JOB_XMAS:
class_ = MAPID_XMAS;
break;
+ case JOB_SUMMER:
+ class_ = MAPID_SUMMER;
+ break;
default:
return -1;
}
@@ -3799,6 +3802,7 @@ int pc_mapid2jobid(unsigned short class_, int sex)
case MAPID_GUNSLINGER: return JOB_GUNSLINGER;
case MAPID_NINJA: return JOB_NINJA;
case MAPID_XMAS: return JOB_XMAS;
+ case MAPID_SUMMER: return JOB_SUMMER;
//2_1 classes
case MAPID_SUPER_NOVICE: return JOB_SUPER_NOVICE;
case MAPID_KNIGHT: return JOB_KNIGHT;
@@ -3909,7 +3913,10 @@ char* job_name(int class_)
case JOB_XMAS:
return msg_txt(570 - JOB_WEDDING+class_);
-
+
+ case JOB_SUMMER:
+ return msg_txt(621);
+
case JOB_NOVICE_HIGH:
case JOB_SWORDMAN_HIGH:
case JOB_MAGE_HIGH:
@@ -5758,6 +5765,11 @@ int pc_setoption(struct map_session_data *sd,int type)
else if (!(type&OPTION_XMAS) && p_type&OPTION_XMAS)
new_look = -1;
+ if (type&OPTION_SUMMER && !(p_type&OPTION_SUMMER))
+ new_look = JOB_SUMMER;
+ else if (!(type&OPTION_SUMMER) && p_type&OPTION_SUMMER)
+ new_look = -1;
+
if (new_look < 0) { //Restore normal look.
status_set_viewdata(&sd->bl, sd->status.class_);
new_look = sd->vd.class_;
@@ -7349,7 +7361,7 @@ int pc_readdb(void)
fclose(fp);
for (i = 0; i < MAX_PC_CLASS; i++) {
if (!pcdb_checkid(i)) continue;
- if (i == JOB_WEDDING || i == JOB_XMAS)
+ if (i == JOB_WEDDING || i == JOB_XMAS || i == JOB_SUMMER)
continue; //Classes that do not need exp tables.
if (!max_level[i][0])
ShowWarning("Class %s (%d) does not has a base exp table.\n", job_name(i), i);
diff --git a/src/map/status.c b/src/map/status.c
index e2dcf58e0..442dcc968 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4261,6 +4261,9 @@ void status_set_viewdata(struct block_list *bl, int class_)
if (sd->sc.option&OPTION_WEDDING)
class_ = JOB_WEDDING;
else
+ if (sd->sc.option&OPTION_SUMMER)
+ class_ = JOB_SUMMER;
+ else
if (sd->sc.option&OPTION_XMAS)
class_ = JOB_XMAS;
else
@@ -4350,6 +4353,7 @@ void status_set_viewdata(struct block_list *bl, int class_)
if (vd && vd->cloth_color && (
(vd->class_==JOB_WEDDING && battle_config.wedding_ignorepalette)
|| (vd->class_==JOB_XMAS && battle_config.xmas_ignorepalette)
+ || (vd->class_==JOB_SUMMER && battle_config.summer_ignorepalette)
))
vd->cloth_color = 0;
}
@@ -5156,6 +5160,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_WEDDING:
case SC_XMAS:
+ case SC_SUMMER:
if (!vd) return 0;
//Store previous values as they could be removed.
val1 = vd->class_;
@@ -5165,7 +5170,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
unit_stop_attack(bl);
clif_changelook(bl,LOOK_WEAPON,0);
clif_changelook(bl,LOOK_SHIELD,0);
- clif_changelook(bl,LOOK_BASE,type==SC_WEDDING?JOB_WEDDING:JOB_XMAS);
+ clif_changelook(bl,LOOK_BASE,type==SC_WEDDING?JOB_WEDDING:type==SC_XMAS?JOB_XMAS:JOB_SUMMER);
clif_changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
break;
case SC_NOCHAT:
@@ -5812,9 +5817,10 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
switch (type) {
case SC_WEDDING:
case SC_XMAS:
+ case SC_SUMMER:
clif_changelook(bl,LOOK_WEAPON,0);
clif_changelook(bl,LOOK_SHIELD,0);
- clif_changelook(bl,LOOK_BASE,type==SC_WEDDING?JOB_WEDDING:JOB_XMAS);
+ clif_changelook(bl,LOOK_BASE,type==SC_WEDDING?JOB_WEDDING:type==SC_XMAS?JOB_XMAS:JOB_SUMMER);
clif_changelook(bl,LOOK_CLOTHES_COLOR,val4);
break;
case SC_KAAHI:
@@ -5977,6 +5983,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_XMAS:
sc->option |= OPTION_XMAS;
break;
+ case SC_SUMMER:
+ sc->option |= OPTION_SUMMER;
+ break;
case SC_ORCISH:
sc->option |= OPTION_ORCISH;
break;
@@ -6064,6 +6073,7 @@ int status_change_clear(struct block_list *bl,int type)
case SC_EDP:
case SC_MELTDOWN:
case SC_XMAS:
+ case SC_SUMMER:
case SC_NOCHAT:
case SC_FUSION:
case SC_TKREST:
@@ -6153,11 +6163,13 @@ int status_change_end( struct block_list* bl , int type,int tid )
switch(type){
case SC_WEDDING:
case SC_XMAS:
+ case SC_SUMMER:
if (!vd) return 0;
if (sd)
{ //Load data from sd->status.* as the stored values could have changed.
//Must remove OPTION to prevent class being rechanged.
- sc->option &= type==SC_WEDDING?~OPTION_WEDDING:~OPTION_XMAS;
+ sc->option &= type==SC_WEDDING?~OPTION_WEDDING:type==SC_XMAS?~OPTION_XMAS:~OPTION_SUMMER;
+ clif_changeoption(&sd->bl);
status_set_viewdata(bl, sd->status.class_);
} else {
vd->class_ = sc->data[type].val1;
@@ -6427,6 +6439,9 @@ int status_change_end( struct block_list* bl , int type,int tid )
case SC_XMAS:
sc->option &= ~OPTION_XMAS;
break;
+ case SC_SUMMER:
+ sc->option &= ~OPTION_SUMMER;
+ break;
case SC_ORCISH:
sc->option &= ~OPTION_ORCISH;
break;
diff --git a/src/map/status.h b/src/map/status.h
index 5381bf308..f5d45ba75 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -269,6 +269,7 @@ enum {
SC_CRITICALWOUND,
SC_MAGICMIRROR,
SC_SLOWCAST,
+ SC_SUMMER, // [Zephyrus Summer]
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
};
int SkillStatusChangeTable(int skill);
@@ -509,6 +510,7 @@ enum {
//Note that clientside Flying and Xmas are 0x8000 for clients prior to 2007.
#define OPTION_FLYING 0x0008000
#define OPTION_XMAS 0x00010000
+#define OPTION_SUMMER 0x00040000 // [Zephyrus Summer]
#define OPTION_CART (OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5)