Greetings,
I am trying to stop Questor from sending people on quests in closed areas.
Has anyone implemented anything like this? I have tried adding a flag to
headers of my AREA files.
***merc.h***
/*
* AREA FLAGS
*/
#define AREAF_HOMETOWN (A)
#define AREAF_CLOSED (B)
***quest.c***
for ( i=0; i< MAX_KEY_HASH; i++)
{
if ((vsearch = mob_index_hash[i]) == NULL) continue;
level_diff = vsearch->level - ch->level;
if ( (ch->level < 51 && (level_diff > 4 || level_diff < -1))
|| (ch->level > 50 && (level_diff > 6 || level_diff < 0))
|| vsearch->pShop != NULL
|| IS_SET(vsearch->act,ACT_TRAIN)
|| IS_SET(vsearch->act,ACT_PRACTICE)
|| IS_SET(vsearch->act,ACT_IS_HEALER)
|| IS_SET(vsearch->act,ACT_NOTRACK)
|| IS_SET(vsearch->imm_flags, IMM_WEAPON)
|| IS_SET(vsearch->affected_by2,AFF2_NO_QUEST)
// || IS_SET(vsearch->in_room->area->area_flag, AREAF_CLOSED)
|| IS_SET(vsearch->imm_flags, IMM_SUMMON))
continue;
Problem is vsearch is MOB_INDEX_DATA and there is no in_room in this struct.
Can I simply add in_room to the struct and have it work (unlikely)
Or has someone come up with a better way to keep from assigning mobs in
unopened areas? (Short of flagging each mob NO_QUEST)
Cheers, and Thanks in Advance for the replies
Keith