Bladeren bron

Added IG_PRIVATE_AIRSHIP (#3378)

* Item group for Private Airship tickets
Cydh Ramdh 6 jaren geleden
bovenliggende
commit
83c8183a2e
4 gewijzigde bestanden met toevoegingen van 7 en 14 verwijderingen
  1. 3 0
      db/re/item_misc.txt
  2. 2 12
      src/map/clif.cpp
  3. 1 2
      src/map/itemdb.hpp
  4. 1 0
      src/map/script_constants.hpp

+ 3 - 0
db/re/item_misc.txt

@@ -1400,3 +1400,6 @@ IG_PrizeOfHero,15098,1		// Hero_Taget_Suits
 IG_PrizeOfHero,22035,2		// Vet_Nepen_Heel
 IG_PrizeOfHero,22036,2		// Vet_SliverFox_Boots
 IG_PrizeOfHero,22037,2		// Vet_Ungo_Boots
+// Private Airship items
+IG_PRIVATE_AIRSHIP,6909,1 // Actinidia_Cat_Fruit
+IG_PRIVATE_AIRSHIP,25464,1 // World_Moving_Rights

+ 2 - 12
src/map/clif.cpp

@@ -20466,24 +20466,14 @@ void clif_parse_private_airship_request( int fd, struct map_session_data* sd ){
 		return;
 	}
 
-	// The UI only offers these two buttons(items) for now
-	uint16 item_ids[] = {
-		ITEMID_ACTINIDIA_CAT_FRUIT,
-		ITEMID_WORLD_MOVING_RIGHTS
-	};
-
 	uint16 item_id = RFIFOW( fd, 2 + MAP_NAME_LENGTH_EXT );
 
-	int i;
-
-	ARR_FIND( 0, ARRAYLENGTH( item_ids ), i, item_ids[i] == item_id );
-
 	// Check if the item sent by the client is known to us
-	if( i == ARRAYLENGTH( item_ids ) ){
+	if( !itemdb_group_item_exists(IG_PRIVATE_AIRSHIP, item_id) ){
 		clif_private_airship_response( sd, PRIVATEAIRSHIP_ITEM_UNAVAILABLE );
 		return;
 	}
-	
+
 	int idx = pc_search_inventory( sd, item_id );
 
 	// Check if the player has the item at all

+ 1 - 2
src/map/itemdb.hpp

@@ -80,7 +80,6 @@ enum item_itemid
 	ITEMID_PAINT_BRUSH					= 6122,
 	ITEMID_MAGIC_GEAR_FUEL				= 6146,
 	ITEMID_STRANGE_EMBRYO				= 6415,
-	ITEMID_ACTINIDIA_CAT_FRUIT			= 6909,
 	ITEMID_STONE						= 7049,
 	ITEMID_FIRE_BOTTLE					= 7135,
 	ITEMID_ACID_BOTTLE					= 7136,
@@ -121,7 +120,6 @@ enum item_itemid
 	ITEMID_WOB_RACHEL					= 14584,
 	ITEMID_WOB_LOCAL					= 14585,
 	ITEMID_SIEGE_TELEPORT_SCROLL		= 14591,
-	ITEMID_WORLD_MOVING_RIGHTS			= 25464,
 };
 
 ///Rune Knight
@@ -734,6 +732,7 @@ enum e_random_item_group {
 	IG_SPECIAL_CHRISTMAS_BOX,
 	IG_SANTA_GIFT,
 	IG_PRIZEOFHERO,
+	IG_PRIVATE_AIRSHIP,
 };
 
 /// Enum for bound/sell restricted selling

+ 1 - 0
src/map/script_constants.hpp

@@ -4977,6 +4977,7 @@
 	export_constant(IG_SPECIAL_CHRISTMAS_BOX);
 	export_constant(IG_SANTA_GIFT);
 	export_constant(IG_PRIZEOFHERO);
+	export_constant(IG_PRIVATE_AIRSHIP);
 
 	/* unit stop walking */
 	export_constant(USW_NONE);