summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--db/Changelog.txt1
-rw-r--r--db/const.txt2
-rw-r--r--db/item_db.txt2
-rw-r--r--src/common/mmo.h3
-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
12 files changed, 55 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index dea26d1f6..8c1856089 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/09/28
+ * Rev. 11321 Implemented Summer Outfit care of Zephyrus_CR. [L0ne_W0lf]
+ - Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation
+ of the 12.1 Guild Castles.
* Fixed sql target not including the save target in the Makefile, needed
by the map server for save/mapreg.txt. (bugreport:131) [FlavioJS]
2007/09/27
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 03b0af0d8..b08c2c531 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -38,6 +38,7 @@
=======================
09/27
+ * Rev. 11321 Added constants for Summer Outfit and updated the Summer_Event_Suit item script. [L0ne_W0lf]
* Rev. 11319 Re-added an ETC item that got lost in the item update. (7062) [L0ne_W0lf]
* Removed Final Strike from skill_cast_db [Playtester]
- also updated sql files
diff --git a/db/const.txt b/db/const.txt
index 18e97f9b8..96096a480 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -166,6 +166,7 @@ EAJ_BABY_SOUL_LINKER 0x2207
Option_Wedding 0x1000
Option_Xmas 0x20000
+Option_Summer 0x40000
bc_all 0
bc_map 1
@@ -752,6 +753,7 @@ SC_INCDEXRATE 248
SC_JAILED 249
SC_ENCHANTARMS 250
SC_MAGICALATTACK 251
+SC_SUMMER 256
e_gasp 0
e_what 1
diff --git a/db/item_db.txt b/db/item_db.txt
index 5c766505f..2befb762b 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -3297,7 +3297,7 @@
12257,Cold_Medicine,Cold_Medicine,2,,10,100,,,,,0xFFFFFFFF,7,2,,,50,,,{ percentheal 25,25; },{},{}
12258,Bomb_Poring_Box,Bomb Poring Box,2,,10,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
//12259,ȯ»óÀÇ_ºñ¾à,ȯ»óÀÇ_ºñ¾à,2,,10,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12260,Summer_Event_Suit,Summer Event Suit,2,,10,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12260,Summer_Event_Suit,Summer Event Suit,2,,10,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Summer,600000,0; },{},{}
//12261,ȯ»óÀÇ_ºñ¾à,ȯ»óÀÇ_ºñ¾à,2,,10,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12262,Inspector_Certificate_,Authoritative Badge,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect 507; sc_start SC_SpeedUp0,180000,0; },{},{}
12701,Old_Blue_Box_F,Old Blue Box,2,,,200,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 8e757d81a..6e136c2ae 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -45,7 +45,7 @@
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
#define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan]
-#define MAX_GUILDCASTLE 24 // increased to include novice castles [Valaris]
+#define MAX_GUILDCASTLE 29 // increased to include novice castles [Valaris]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 //Local max per castle. [Skotlex]
@@ -443,6 +443,7 @@ enum {
JOB_GUNSLINGER,
JOB_NINJA,
JOB_XMAS,
+ JOB_SUMMER,
JOB_NOVICE_HIGH = 4001,
JOB_SWORDMAN_HIGH,
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)