Clean up
This commit is contained in:
parent
4f3f483bfa
commit
7fcd0f5b9d
@ -8206,7 +8206,7 @@ This command must be used after 'questinfo'.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*setquestinfo_req <quest_id>,<req_quest_id>,<state>;
|
||||
*setquestinfo_req <quest_id>,<req_quest_id>,<state>{,<req_quest_id>,<state>,...};
|
||||
|
||||
Add 'req_quest_id' as requirement for quest info with quest id 'quest_id'.
|
||||
|
||||
@ -8219,7 +8219,7 @@ This command must be used after 'questinfo'.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*setquestinfo_job <quest_id>,<job_id>;
|
||||
*setquestinfo_job <quest_id>,<job_id>{,<job_id>...};
|
||||
|
||||
Add job criteria for quest info with quest id 'quest_id'.
|
||||
The job criteria may more than one job_id.
|
||||
|
@ -21213,7 +21213,7 @@ BUILDIN_FUNC(setquestinfo_req) {
|
||||
int quest_id = script_getnum(st, 2);
|
||||
struct questinfo *qi = map_has_questinfo(nd->bl.m, nd, quest_id);
|
||||
uint8 i = 0;
|
||||
uint8 num = script_lastdata(st)+1;
|
||||
uint8 num = script_lastdata(st);
|
||||
|
||||
if (!qi) {
|
||||
ShowError("buildin_setquestinfo_req: Quest with ID '%d' is not defined yet.\n", quest_id);
|
||||
@ -21226,11 +21226,11 @@ BUILDIN_FUNC(setquestinfo_req) {
|
||||
}
|
||||
|
||||
if (num%2) {
|
||||
ShowError("buildin_setquestinfo_req: Odd number of parameters(%d) - pairs of requirements are expected.\n", num);
|
||||
ShowError("buildin_setquestinfo_req: Odd number of parameters(%d) - pairs of requirements are expected.\n", num-2);
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
for (i = 3; i < num; i += 2) {
|
||||
for (i = 3; i <= num; i += 2) {
|
||||
RECREATE(qi->req, struct questinfo_req, qi->req_count+1);
|
||||
qi->req[qi->req_count].quest_id = script_getnum(st, i);
|
||||
qi->req[qi->req_count].state = script_getnum(st, i+1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user