Bugfix for followers doing an Ask action in another room
svn-id: r29869
This commit is contained in:
parent
3071db8f84
commit
a9ced688bc
1 changed files with 5 additions and 4 deletions
|
@ -1688,7 +1688,6 @@ void Hotspot::doAsk(HotspotData *hotspot) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
uint16 usedId = _currentActions.top().supportData().param(1);
|
uint16 usedId = _currentActions.top().supportData().param(1);
|
||||||
Hotspot *destCharacter = res.getActiveHotspot(hotspot->hotspotId);
|
Hotspot *destCharacter = res.getActiveHotspot(hotspot->hotspotId);
|
||||||
assert(destCharacter);
|
|
||||||
HotspotData *usedHotspot = res.getHotspot(usedId);
|
HotspotData *usedHotspot = res.getHotspot(usedId);
|
||||||
_data->useHotspotId = usedId;
|
_data->useHotspotId = usedId;
|
||||||
|
|
||||||
|
@ -1707,15 +1706,17 @@ void Hotspot::doAsk(HotspotData *hotspot) {
|
||||||
uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, ASK);
|
uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, ASK);
|
||||||
|
|
||||||
if (sequenceOffset >= 0x8000) {
|
if (sequenceOffset >= 0x8000) {
|
||||||
destCharacter->showMessage(sequenceOffset, hotspotId());
|
if (destCharacter != NULL)
|
||||||
|
destCharacter->showMessage(sequenceOffset, hotspotId());
|
||||||
} else if (sequenceOffset != 0) {
|
} else if (sequenceOffset != 0) {
|
||||||
sequenceOffset = Script::execute(sequenceOffset);
|
sequenceOffset = Script::execute(sequenceOffset);
|
||||||
|
|
||||||
if (sequenceOffset == 0) {
|
if (sequenceOffset == 0) {
|
||||||
// Give item to character
|
// Give item to character
|
||||||
usedHotspot->roomNumber = hotspotId();
|
usedHotspot->roomNumber = hotspotId();
|
||||||
destCharacter->showMessage(32, hotspotId());
|
if (destCharacter != NULL)
|
||||||
} else if (sequenceOffset != 1) {
|
destCharacter->showMessage(32, hotspotId());
|
||||||
|
} else if ((sequenceOffset != 1) && (destCharacter != NULL)) {
|
||||||
destCharacter->showMessage(sequenceOffset, hotspotId());
|
destCharacter->showMessage(sequenceOffset, hotspotId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue