diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/HPM.c | 2 | ||||
-rw-r--r-- | src/common/HPM.h | 2 | ||||
-rw-r--r-- | src/common/HPMi.h | 2 | ||||
-rw-r--r-- | src/map/chrif.c | 1 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/clif.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 1 | ||||
-rw-r--r-- | src/map/script.c | 14 |
8 files changed, 16 insertions, 9 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c index ec5ba888e..4802fbc61 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -345,4 +345,4 @@ void hpm_defaults(void) { HPM->config_read = hplugins_config_read; HPM->showmsg_pop = hplugin_showmsg_populate; HPM->symbol_defaults_sub = NULL; -}
\ No newline at end of file +} diff --git a/src/common/HPM.h b/src/common/HPM.h index ac2c4050f..87d7bdac6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -80,4 +80,4 @@ struct HPM_interface *HPM; void hpm_defaults(void); -#endif /* _HPM_H_ */
\ No newline at end of file +#endif /* _HPM_H_ */ diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 517d9125d..f7832d0ec 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -64,4 +64,4 @@ struct HPMi_interface { struct HPMi_interface *HPMi; #endif -#endif /* _HPMi_H_ */
\ No newline at end of file +#endif /* _HPMi_H_ */ diff --git a/src/map/chrif.c b/src/map/chrif.c index e2ce37e28..cf7886422 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1648,3 +1648,4 @@ int do_init_chrif(void) { return 0; } + diff --git a/src/map/clif.c b/src/map/clif.c index 0c323c6cd..2210c3072 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17000,7 +17000,7 @@ void clif_bc_ready(void) { * *------------------------------------------*/ int do_init_clif(void) { - const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00" }; + const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00", "0xffffff" }; int i; /** * Setup Color Table (saves unnecessary load of strtoul on every call) diff --git a/src/map/clif.h b/src/map/clif.h index 9dfa83e00..b981cc535 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -324,6 +324,7 @@ enum clif_messages { enum clif_colors { COLOR_RED, COLOR_DEFAULT, + COLOR_WHITE, COLOR_MAX }; diff --git a/src/map/pc.c b/src/map/pc.c index 892c27e87..59b1c7443 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4087,6 +4087,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) { + clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474)); return 0; // You cannot use this item while sitting. } diff --git a/src/map/script.c b/src/map/script.c index 3b1533f74..250ffeb93 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8245,10 +8245,9 @@ BUILDIN(guildopenstorage) /*========================================== * Make player use a skill trought item usage *------------------------------------------*/ -/// itemskill <skill id>,<level> -/// itemskill "<skill name>",<level> -BUILDIN(itemskill) -{ +/// itemskill <skill id>,<level>{,flag +/// itemskill "<skill name>",<level>{,flag +BUILDIN(itemskill) { int id; int lv; TBL_PC* sd; @@ -8260,6 +8259,11 @@ BUILDIN(itemskill) id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) ); lv = script_getnum(st,3); + if( !script_hasdata(st, 4) ) { + if( !skill->check_condition_castbegin(sd,id,lv) ) + return true; + } + sd->skillitem=id; sd->skillitemlv=lv; clif->item_skill(sd,id,lv); @@ -17155,7 +17159,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(gettimestr,"si"), BUILDIN_DEF(openstorage,""), BUILDIN_DEF(guildopenstorage,""), - BUILDIN_DEF(itemskill,"vi"), + BUILDIN_DEF(itemskill,"vi?"), BUILDIN_DEF(produce,"i"), BUILDIN_DEF(cooking,"i"), BUILDIN_DEF(monster,"siisii???"), |