diff options
author | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-02 09:40:01 +0000 |
---|---|---|
committer | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-02 09:40:01 +0000 |
commit | bdc1c715db65c2d9378dcff685c4b6b87d752da7 (patch) | |
tree | 8e61570a2c4e91eaa34c96e2967068e1e927ec07 /src/map/atcommand.c | |
parent | 063d2e1d4f802a4379bef408ce968a49d209f90f (diff) | |
download | hercules-bdc1c715db65c2d9378dcff685c4b6b87d752da7.tar.gz hercules-bdc1c715db65c2d9378dcff685c4b6b87d752da7.tar.bz2 hercules-bdc1c715db65c2d9378dcff685c4b6b87d752da7.tar.xz hercules-bdc1c715db65c2d9378dcff685c4b6b87d752da7.zip |
-Follow up r17065
--removing useless check on skill_id
--fix few broken atcommand due to failed sscanf
-Change skill_amotion_leniency as pointed out on tid:76492 so amotion delay wont be twice by default, (also increase intervall if you do want higher acd)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17072 54d463be-8e91-2dee-dedb-b68131a5f0ec
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; } |