diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 8f6fa41ac..1c7e37392 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3171,7 +3171,7 @@ ACMD_FUNC(questskill) return -1; } - if (skill_id < 0 && skill_id >= MAX_SKILL_DB) { + if (skill_id >= MAX_SKILL_DB) { clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist. return -1; } @@ -3215,7 +3215,7 @@ ACMD_FUNC(lostskill) return -1; } - if (skill_id < 0 && skill_id >= MAX_SKILL) { + if (skill_id >= MAX_SKILL) { clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist. return -1; } @@ -5416,13 +5416,13 @@ ACMD_FUNC(useskill) char target[100]; nullpo_retr(-1, sd); - if(!message || !*message || sscanf(message, "%hui %hui %23[^\n]", &skill_id, &skill_lv, target) != 3) { + if(!message || !*message || sscanf(message, "%hu %hu %23[^\n]", &skill_id, &skill_lv, target) != 3) { clif_displaymessage(fd, msg_txt(1165)); // Usage: @useskill <skill ID> <skill level> <target> return -1; } - if ( (pl_sd = map_nick2sd(target)) == NULL ) - { + if(!strcmp(target,"self")) pl_sd = sd; //quick keyword + else if ( (pl_sd = map_nick2sd(target)) == NULL ){ clif_displaymessage(fd, msg_txt(3)); // Character not found. return -1; } @@ -5460,7 +5460,7 @@ ACMD_FUNC(displayskill) uint16 skill_lv = 1; nullpo_retr(-1, sd); - if (!message || !*message || sscanf(message, "%hui %hui", &skill_id, &skill_lv) < 1) + if (!message || !*message || sscanf(message, "%hu %hu", &skill_id, &skill_lv) < 1) { clif_displaymessage(fd, msg_txt(1166)); // Usage: @displayskill <skill ID> {<skill level>} return -1; @@ -5486,7 +5486,7 @@ ACMD_FUNC(skilltree) struct skill_tree_entry *ent; nullpo_retr(-1, sd); - if(!message || !*message || sscanf(message, "%hui %23[^\r\n]", &skill_id, target) != 2) { + if(!message || !*message || sscanf(message, "%hu %23[^\r\n]", &skill_id, target) != 2) { clif_displaymessage(fd, msg_txt(1167)); // Usage: @skilltree <skill ID> <target> return -1; } |