diff options
author | Haru <haru@dotalux.com> | 2018-10-22 00:34:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-22 00:34:15 +0200 |
commit | fb5ed0bce2316853c903c4269aad1224cba6a623 (patch) | |
tree | b60f0aebd45e006afbca2010c037e163b6f1500b /src/map/script.c | |
parent | 9deff52b5b081307107e0eafdf1cc771c8cd63a6 (diff) | |
parent | 0e38fa59227ec3892fdeb0a9dfdd1037c9225e4d (diff) | |
download | hercules-fb5ed0bce2316853c903c4269aad1224cba6a623.tar.gz hercules-fb5ed0bce2316853c903c4269aad1224cba6a623.tar.bz2 hercules-fb5ed0bce2316853c903c4269aad1224cba6a623.tar.xz hercules-fb5ed0bce2316853c903c4269aad1224cba6a623.zip |
Merge pull request #2251 from Asheraf/pr3
Add new type for mercenary class to setquestinfo()
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index e89d36be4..212c11687 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -21177,6 +21177,17 @@ static BUILDIN(setquestinfo) VECTOR_PUSH(qi->quest_requirement, quest_req); break; } + case QINFO_MERCENARY_CLASS: + { + int mer_class = script_getnum(st, 3); + + if (!mercenary->class(mer_class)) { + ShowWarning("buildin_setquestinfo: invalid mercenary class given (%d).\n", mer_class); + return false; + } + qi->mercenary_class = mer_class; + break; + } default: ShowWarning("buildin_setquestinfo: invalid type given (%u).\n", type); return false; @@ -25938,6 +25949,7 @@ static void script_hardcoded_constants(void) script->set_constant("QINFO_HOMUN_LEVEL", QINFO_HOMUN_LEVEL, false, false); script->set_constant("QINFO_HOMUN_TYPE", QINFO_HOMUN_TYPE, false, false); script->set_constant("QINFO_QUEST", QINFO_QUEST, false, false); + script->set_constant("QINFO_MERCENARY_CLASS", QINFO_MERCENARY_CLASS, false, false); script->constdb_comment("function types"); script->set_constant("FUNCTION_IS_COMMAND", FUNCTION_IS_COMMAND, false, false); |