Forráskód Böngészése

* Fixed Fallen Angel behavior that consumes wrong ammo number
* Updated @iteminfo message, for ammo now show the ammo type instead "Arrow/Ammunition"
* Changed some clif_skill_fail messages
* Updated src documentaion for skill_check_castbegin and skill_check_castend

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>

Cydh Ramdh 11 éve
szülő
commit
8fff37eadc
7 módosított fájl, 209 hozzáadás és 150 törlés
  1. 1 1
      db/re/skill_require_db.txt
  2. 1 1
      src/map/atcommand.c
  3. 1 1
      src/map/clif.h
  4. 16 0
      src/map/itemdb.c
  5. 13 0
      src/map/itemdb.h
  6. 174 144
      src/map/skill.c
  7. 3 3
      src/map/skill.h

+ 1 - 1
db/re/skill_require_db.txt

@@ -903,7 +903,7 @@
 2561,0,0,10:15:20:25:30,0,0,0,17,3,5,none,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_FIREDANCE#Fire Dance#
 2562,0,0,45:50:55:60:65,0,0,0,21,0,0,none,0,0,7664,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_H_MINE#Howling Mine#
 2563,0,0,20:24:28:32:36,0,0,0,99,0,0,none,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13201	//RL_P_ALTER#Platinum Alter#
-2564,0,0,90,0,0,0,17,3,10,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_FALLEN_ANGEL#Fallen Angel#
+2564,0,0,90,0,0,0,17,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_FALLEN_ANGEL#Fallen Angel#
 2565,0,0,40:45:50:55:60,0,0,0,19,3,5,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_R_TRIP#Round Trip#
 2566,0,0,60:70:80:90:100,0,0,0,21,5,1,none,0,0,7665,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_D_TAIL#Dragon Tail#
 2567,0,0,70,0,0,0,19,3,10,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//RL_FIRE_RAIN#Fire Rain#

+ 1 - 1
src/map/atcommand.c

@@ -7371,7 +7371,7 @@ ACMD_FUNC(iteminfo)
 		item_data = item_array[i];
 		sprintf(atcmd_output, msg_txt(sd,1277), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s
 			item_data->name,item_data->jname,item_data->slot,item_data->nameid,
-			itemdb_typename(item_data->type),
+			(item_data->type != IT_AMMO) ? itemdb_typename(item_data->type) : itemdb_typename_ammo(item_data->look),
 			(item_data->script==NULL)? msg_txt(sd,1278) : msg_txt(sd,1279) // None / With script
 		);
 		clif_displaymessage(fd, atcmd_output);

+ 1 - 1
src/map/clif.h

@@ -340,7 +340,7 @@ enum useskill_fail_cause
 	USESKILL_FAIL_STYLE_CHANGE_FIGHTER = 81,
 	USESKILL_FAIL_STYLE_CHANGE_GRAPPLER = 82,
 	USESKILL_FAIL_THERE_ARE_NPC_AROUND = 83,
-	//USESKILL_FAIL_NEED_MORE_BULLET = 84,
+	USESKILL_FAIL_NEED_MORE_BULLET = 84,
 };
 
 enum clif_messages {

+ 16 - 0
src/map/itemdb.c

@@ -305,6 +305,22 @@ struct item_data* itemdb_exists(int nameid)
 	return item;
 }
 
+/// Returns name type of ammunition [Cydh]
+const char *itemdb_typename_ammo (enum e_item_ammo ammo) {
+	switch (ammo) {
+		case AMMO_ARROW:			return "Arrow";
+		case AMMO_THROWABLE_DAGGER:	return "Throwable Dagger";
+		case AMMO_BULLET:			return "Bullet";
+		case AMMO_SHELL:			return "Shell";
+		case AMMO_GRENADE:			return "Grenade";
+		case AMMO_SHURIKEN:			return "Shuriken";
+		case AMMO_KUNAI:			return "Kunai";
+		case AMMO_CANNONBALL:		return "Cannonball";
+		case AMMO_THROWABLE_ITEM:	return "Throwable Item/Sling Item";
+	}
+	return "Ammunition";
+}
+
 /// Returns human readable name for given item type.
 /// @param type Type id to retrieve name for ( IT_* ).
 const char* itemdb_typename(enum item_types type)

+ 13 - 0
src/map/itemdb.h

@@ -297,6 +297,18 @@ enum e_item_job {
 	ITEMJ_THIRD_BABY  = 0x20,
 };
 
+enum e_item_ammo {
+	AMMO_ARROW = 1,
+	AMMO_THROWABLE_DAGGER,
+	AMMO_BULLET,
+	AMMO_SHELL,
+	AMMO_GRENADE,
+	AMMO_SHURIKEN,
+	AMMO_KUNAI,
+	AMMO_CANNONBALL,
+	AMMO_THROWABLE_ITEM, ///Sling items
+};
+
 ///Item combo struct
 struct item_combo {
 	struct script_code *script;
@@ -424,6 +436,7 @@ struct item_data* itemdb_exists(int nameid);
 #define itemdb_is_GNbomb(n) (n >= ITEMID_APPLE_BOMB && n <= ITEMID_VERY_HARD_LUMP)
 #define itemdb_is_GNthrowable(n) (n >= ITEMID_MYSTERIOUS_POWDER && n <= ITEMID_BLACK_THING_TO_THROW)
 const char* itemdb_typename(enum item_types type);
+const char *itemdb_typename_ammo (enum e_item_ammo ammo);
 
 int itemdb_group_bonus(struct map_session_data* sd, int itemid);
 unsigned short itemdb_searchrandomid(uint16 group_id, uint8 sub_group);

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 174 - 144
src/map/skill.c


+ 3 - 3
src/map/skill.h

@@ -377,10 +377,10 @@ int skill_vfcastfix( struct block_list *bl, double time, uint16 skill_id, uint16
 int skill_delayfix( struct block_list *bl, uint16 skill_id, uint16 skill_lv);
 
 // Skill conditions check and remove [Inkfish]
-int skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
-int skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+bool skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+bool skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
 int skill_check_condition_char_sub (struct block_list *bl, va_list ap);
-int skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
+void skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
 struct skill_condition skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
 int skill_disable_check(struct status_change *sc, uint16 skill_id);
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott