summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-10 13:43:00 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-10 13:43:00 +0000
commitb426bc18f4ffa1159f1680c6ecc5c460ff54ce76 (patch)
tree0f7a9c38bed31851a7c96d20d0c744dbb1666457
parent34dcd020f521100ae212a78d64685fffa9a7ada4 (diff)
downloadhercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.gz
hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.bz2
hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.xz
hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.zip
- Changed wedding costumes to use setoption rather than changebase.
- Modified setoption so that flag 1 or no flag adds an option, and flag 0 removes it. - Updated script_commands with the new behaviour. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6548 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--db/const.txt2
-rw-r--r--db/item_db.txt4
-rw-r--r--doc/script_commands.txt3
-rw-r--r--sql-files/item_db.sql4
-rw-r--r--src/map/script.c20
6 files changed, 20 insertions, 18 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a8696d3b8..db5560227 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ 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.
2006/05/10
+ * Changed wedding costumes to use setoption rather than changebase.
+ [Skotlex]
+ * Modified setoption so that flag 1 or no flag adds an option, and flag 0
+ removes it. [Skotlex]
+ * Updated script_commands with the new behaviour. [Skotlex]
* Updated mob_db2.txt and mob_db2.sql to have only 10 drop slots rather
than 15. [Skotlex]
* Users are now able to use their own dnsbl servers (login_athena) [Zido]
diff --git a/db/const.txt b/db/const.txt
index 5512ba56c..3b1e5bf2d 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -78,6 +78,8 @@ Job_Star_Gladiator 4047
Job_Star_Gladiator2 4048
Job_Soul_Linker 4049
+Option_Wedding 0x1000
+
bc_all 0
bc_map 1
bc_area 2
diff --git a/db/item_db.txt b/db/item_db.txt
index 36d4be814..d9b8d99c6 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -996,7 +996,7 @@
2335,Thief_Clothes,Thief Clothes,5,74000,,100,,6,,0,0x02021040,7,2,16,,0,1,0,{ bonus bAgi,1; },{},{}
2336,Thief_Clothes_,Thief Clothes,5,74000,,100,,6,,1,0x00021040,7,2,16,,0,1,0,{ bonus bAgi,1; },{},{}
2337,Ninja_Suit,Ninja Suit,5,,10,1500,,7,,0,0x00021040,7,2,16,,50,1,0,{ bonus bAgi,1; bonus bMdef,3; },{},{}
-2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{ bonus bMdef,15; },{ changebase Job_Wedding; },{ changebase Class; }
+2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{ bonus bMdef,15; },{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }
2339,Pantie,Pantie,5,1000,,100,,4,,0,0xFFFFFFFF,7,2,16,,0,1,0,{},{},{}
2340,Novice_Breastplate,Novice Breastplate,5,89000,,500,,4,,1,0x00000001,7,2,16,,10,1,0,{},{},{}
2341,Legion_Plate_Armor,Legion Plate Armor,5,94000,,5500,,11,,0,0x00004000,7,2,16,,70,1,0,{},{},{}
@@ -1789,7 +1789,7 @@
7167,Strange_Steel_Piece,Strange Steel Piece,3,,215,10,,,,,,,,,,,,,{},{},{}
7168,Giant_Butterfly_Wing,Giant Butterfly Wing,3,,307,10,,,,,,,,,,,,,{},{},{}
7169,Ba_Gua,Ba_Gua,3,,1400,10,,,,,,,,,,,,,{},{},{}
-7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{},{ changebase Job_Wedding; },{ changebase Class; }
+7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{},{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }
7171,Leopard_Skin,Leopard Skin,3,,141,10,,,,,,,,,,,,,{},{},{}
7172,Leopard_Claw,Leopard Claw,3,,145,10,,,,,,,,,,,,,{},{},{}
7173,Bun_Buster_Bag,Bun Buster Bag,3,,10,10,,,,,,,,,,,,,{},{},{}
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 9c87d2530..333565582 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2699,7 +2699,8 @@ Option numbers are bitmasks - add up option numbers to check for all of them
being present at the same time in one go.
'setoption' will set options on the invoking character. There are no second and
-third versions of this command, so you can only change the values in the last list (cloak, cart, ruwach, etc). if flag is 1, the option will be added to what the character currently has; if 2, the option is removed; otherwise (or if omitted) the option is set to what is passed (that is, all other set option values are removed).
+third versions of this command, so you can only change the values in the last
+list (cloak, cart, ruwach, etc). if flag is 1 (default when omitted), the option will be added to what the character currently has; if 0, the option is removed.
This is definitely not a complete list of available option flag numbers. Ask a
core developer for the full list.
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 635621302..df22dcd36 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -1024,7 +1024,7 @@ REPLACE INTO `item_db` VALUES (2334,'Mage_Coat','Mage Coat','5',NULL,'10','600',
REPLACE INTO `item_db` VALUES (2335,'Thief_Clothes','Thief Clothes','5','74000',NULL,'100',NULL,'6',NULL,'0',0x02021040,'7','2','16',NULL,'0','1','0',' bonus bAgi,1; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (2336,'Thief_Clothes_','Thief Clothes','5','74000',NULL,'100',NULL,'6',NULL,'1',0x00021040,'7','2','16',NULL,'0','1','0',' bonus bAgi,1; ',NULL,NULL);
REPLACE INTO `item_db` VALUES (2337,'Ninja_Suit','Ninja Suit','5',NULL,'10','1500',NULL,'7',NULL,'0',0x00021040,'7','2','16',NULL,'50','1','0',' bonus bAgi,1; bonus bMdef,3; ',NULL,NULL);
-REPLACE INTO `item_db` VALUES (2338,'Wedding_Dress','Wedding Dress','5','43000',NULL,'500',NULL,'0',NULL,'0',0xFFFFFFFE,'7','0','16',NULL,'0','1','0',' bonus bMdef,15; ',' changebase Job_Wedding; ','changebase Class;');
+REPLACE INTO `item_db` VALUES (2338,'Wedding_Dress','Wedding Dress','5','43000',NULL,'500',NULL,'0',NULL,'0',0xFFFFFFFE,'7','0','16',NULL,'0','1','0',' bonus bMdef,15; ',' setoption Option_Wedding,1; ',' setoption Option_Wedding,0; ');
REPLACE INTO `item_db` VALUES (2339,'Pantie','Pantie','5','1000',NULL,'100',NULL,'4',NULL,'0',0xFFFFFFFF,'7','2','16',NULL,'0','1','0',NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (2340,'Novice_Breastplate','Novice Breastplate','5','89000',NULL,'500',NULL,'4',NULL,'1',0x00000001,'7','2','16',NULL,'10','1','0',NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (2341,'Legion_Plate_Armor','Legion Plate Armor','5','94000',NULL,'5500',NULL,'11',NULL,'0',0x00004000,'7','2','16',NULL,'70','1','0',NULL,NULL,NULL);
@@ -1817,7 +1817,7 @@ REPLACE INTO `item_db` VALUES (7166,'Soft_Silk','Soft Silk','3',NULL,'600','10',
REPLACE INTO `item_db` VALUES (7167,'Strange_Steel_Piece','Strange Steel Piece','3',NULL,'215','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7168,'Giant_Butterfly_Wing','Giant Butterfly Wing','3',NULL,'307','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7169,'Ba_Gua','Ba_Gua','3',NULL,'1400','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `item_db` VALUES (7170,'Tuxedo','Tuxedo','5','43000',NULL,'10',NULL,'0',NULL,'0',0xFFFFFFFE,'7','1','16',NULL,'0','1','0',NULL,' changebase Job_Wedding; ','changebase Class;');
+REPLACE INTO `item_db` VALUES (7170,'Tuxedo','Tuxedo','5','43000',NULL,'10',NULL,'0',NULL,'0',0xFFFFFFFE,'7','1','16',NULL,'0','1','0',NULL,' setoption Option_Wedding,1; ',' setoption Option_Wedding,0; ');
REPLACE INTO `item_db` VALUES (7171,'Leopard_Skin','Leopard Skin','3',NULL,'141','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7172,'Leopard_Claw','Leopard Claw','3',NULL,'145','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7173,'Bun_Buster_Bag','Bun Buster Bag','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
diff --git a/src/map/script.c b/src/map/script.c
index 4cc2ab5b8..dc7fa0153 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5079,7 +5079,7 @@ int buildin_setoption(struct script_state *st)
{
int type;
struct map_session_data *sd;
- int flag=0;
+ int flag=1;
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
if(st->end>st->start+3 )
@@ -5087,19 +5087,13 @@ int buildin_setoption(struct script_state *st)
sd=script_rid2sd(st);
if (!sd) return 0;
-
- switch (flag) {
- case 1: //Add option
- pc_setoption(sd,sd->sc.option|type);
- break;
- case 2: //Remove option
- pc_setoption(sd,sd->sc.option&~type);
- break;
- default: //Set option
- pc_setoption(sd,type);
- break;
- }
+ if (flag) {//Add option
+ if (type&OPTION_WEDDING && !battle_config.wedding_modifydisplay)
+ type&=~OPTION_WEDDING; //Do not show the wedding sprites
+ pc_setoption(sd,sd->sc.option|type);
+ } else//Remove option
+ pc_setoption(sd,sd->sc.option&~type);
return 0;
}