Skip to content
Permalink
Browse files
* 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>
  • Loading branch information
cydh committed Jan 28, 2014
1 parent 5adccc4 commit 8fff37eadc1bfdb8a42825f9f84ecdbaae16c3f4
Showing with 210 additions and 153 deletions.
  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. +175 −147 src/map/skill.c
  7. +3 −3 src/map/skill.h
@@ -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#
@@ -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);
@@ -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 {
@@ -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)
@@ -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);

0 comments on commit 8fff37e

Please sign in to comment.