Changed NPC schedules to be loaded when an NPC is activated - this avoids an issue with the Castle Skorl's pre-activation room number being invalid room #99
svn-id: r34748
This commit is contained in:
parent
99f8add65c
commit
b9a0e32c3c
3 changed files with 10 additions and 7 deletions
|
@ -434,13 +434,8 @@ HotspotData::HotspotData(HotspotResource *rec) {
|
|||
talkGate = 0;
|
||||
scriptHotspotId = 0;
|
||||
|
||||
// Set up NPC schedule if any
|
||||
uint16 npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
|
||||
if (npcScheduleId != 0) {
|
||||
Resources &res = Resources::getReference();
|
||||
CharacterScheduleEntry *entry = res.charSchedules().getEntry(npcScheduleId);
|
||||
npcSchedule.addFront(DISPATCH_ACTION, entry, roomNumber);
|
||||
}
|
||||
// Get the NPC schedule, if any
|
||||
npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
|
||||
}
|
||||
|
||||
void HotspotData::saveToStream(WriteStream *stream) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue