Follow up to d13d6a6

Thanks to @RadianFord
This commit is contained in:
Lemongrass3110 2018-04-20 22:53:09 +02:00
parent aaffbaaa14
commit 55bf142ab8
6 changed files with 12 additions and 13 deletions

View File

@ -1746,7 +1746,7 @@ int chrif_bsdata_received(int fd) {
if (bs->script_str[0] == '\0' || !bs->tick)
continue;
if (!(entry = pc_bonus_script_add(sd, bs->script_str, bs->tick, (enum si_type)bs->icon, bs->flag, bs->type)))
if (!(entry = pc_bonus_script_add(sd, bs->script_str, bs->tick, (enum efst_types)bs->icon, bs->flag, bs->type)))
continue;
linkdb_insert(&sd->bonus_script.head, (void *)((intptr_t)entry), entry);

View File

@ -5957,7 +5957,7 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
/// 0983 <index>.W <id>.L <state>.B <total msec>.L <remain msec>.L { <val>.L }*3 (ZC_MSG_STATE_CHANGE3) (PACKETVER >= 20120618)
/// @param bl Sends packet to clients around this object
/// @param id ID of object that has this effect
/// @param type Status icon see enum si_type
/// @param type Status icon see enum efst_types
/// @param flag 1:Active, 0:Deactive
/// @param tick Duration in ms
/// @param val1
@ -6015,7 +6015,7 @@ void clif_status_change_sub(struct block_list *bl, int id, int type, int flag, i
/* Sends status effect to clients around the bl
* @param bl Object that has the effect
* @param type Status icon see enum si_type
* @param type Status icon see enum efst_types
* @param flag 1:Active, 0:Deactive
* @param tick Duration in ms
* @param val1

View File

@ -11913,13 +11913,13 @@ void pc_bonus_script(struct map_session_data *sd) {
* @param sd Player
* @param script_str Script string
* @param dur Duration in ms
* @param icon SI
* @param icon EFST
* @param flag Flags @see enum e_bonus_script_flags
* @param type 0 - None, 1 - Buff, 2 - Debuff
* @return New created entry pointer or NULL if failed or NULL if duplicate fail
* @author [Cydh]
**/
struct s_bonus_script_entry *pc_bonus_script_add(struct map_session_data *sd, const char *script_str, uint32 dur, enum si_type icon, uint16 flag, uint8 type) {
struct s_bonus_script_entry *pc_bonus_script_add(struct map_session_data *sd, const char *script_str, uint32 dur, enum efst_types icon, uint16 flag, uint8 type) {
struct script_code *script = NULL;
struct linkdb_node *node = NULL;
struct s_bonus_script_entry *entry = NULL;

View File

@ -24,7 +24,6 @@ enum AtCommandType : uint8;
//enum e_log_chat_type : uint8;
enum e_log_pick_type : uint32;
enum sc_type : int16;
enum si_type : short;
#define MAX_PC_BONUS 10 /// Max bonus, usually used by item bonus
#define MAX_PC_SKILL_REQUIRE 5 /// Max skill tree requirement
@ -195,7 +194,7 @@ struct s_bonus_script_entry {
StringBuf *script_buf; //Used for comparing and storing on table
uint32 tick;
uint16 flag;
enum si_type icon;
enum efst_types icon;
uint8 type; //0 - Ignore; 1 - Buff; 2 - Debuff
int tid;
};
@ -1305,7 +1304,7 @@ void pc_show_version(struct map_session_data *sd);
int pc_bonus_script_timer(int tid, unsigned int tick, int id, intptr_t data);
void pc_bonus_script(struct map_session_data *sd);
struct s_bonus_script_entry *pc_bonus_script_add(struct map_session_data *sd, const char *script_str, uint32 dur, enum si_type icon, uint16 flag, uint8 type);
struct s_bonus_script_entry *pc_bonus_script_add(struct map_session_data *sd, const char *script_str, uint32 dur, enum efst_types icon, uint16 flag, uint8 type);
void pc_bonus_script_clear(struct map_session_data *sd, uint16 flag);
void pc_cell_basilica(struct map_session_data *sd);

View File

@ -21754,7 +21754,7 @@ BUILDIN_FUNC(bonus_script) {
if (icon <= EFST_BLANK || icon >= EFST_MAX)
icon = EFST_BLANK;
if ((entry = pc_bonus_script_add(sd, script_str, dur, (enum si_type)icon, flag, type))) {
if ((entry = pc_bonus_script_add(sd, script_str, dur, (enum efst_types)icon, flag, type))) {
linkdb_insert(&sd->bonus_script.head, (void *)((intptr_t)entry), entry);
status_calc_pc(sd,SCO_NONE);
}

View File

@ -163,12 +163,12 @@ unsigned int status_sc2scb_flag(sc_type sc)
/**
* Returns the bl types which require a status change packet to be sent for a given client status identifier.
* @param type The client-side status identifier to look up (see enum si_type)
* @param type The client-side status identifier to look up (see enum efst_types)
* @return The bl types relevant to the type (see enum bl_type)
*/
int status_type2relevant_bl_types(int type)
{
if( type < 0 || type >= EFST_MAX ) {
if( type < EFST_BLANK || type >= EFST_MAX ) {
ShowError("status_type2relevant_bl_types: Unsupported type %d\n", type);
return EFST_BLANK;
}
@ -11313,7 +11313,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
break;
case SC_ITEMSCRIPT: // Shows Buff Icons
if (sd && val2 != EFST_BLANK)
clif_status_change(bl, (enum si_type)val2, 1, tick, 0, 0, 0);
clif_status_change(bl, (enum efst_types)val2, 1, tick, 0, 0, 0);
break;
}
@ -12373,7 +12373,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
break;
case SC_ITEMSCRIPT: // Removes Buff Icons
if (sd && sce->val2 != EFST_BLANK)
clif_status_load(bl, (enum si_type)sce->val2, 0);
clif_status_load(bl, (enum efst_types)sce->val2, 0);
break;
case SC_C_MARKER:
{