Exemple #1
0
void Script::setNewSupportData(uint16 index, uint16 hotspotId, uint16 v3) {
	Resources &res = Resources::getReference();
	uint16 dataId = res.getCharOffset(index);
	CharacterScheduleEntry *entry = res.charSchedules().getEntry(dataId);

	Hotspot *h = res.getActiveHotspot(hotspotId);
	h->setBlockedFlag(false);
	h->currentActions().addFront(DISPATCH_ACTION, entry, h->roomNumber());
	h->setActionCtr(0);
}
Exemple #2
0
void Script::makeGoewinFollow(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *hotspot = res.getActiveHotspot(GOEWIN_ID);
	hotspot->setTickProc(FOLLOWER_TICK_PROC_2);
	hotspot->currentActions().clear();
	CharacterScheduleEntry *entry = res.charSchedules().getEntry(GOEWIN_CAVE_SUPPORT_ID);
	hotspot->currentActions().addFront(DISPATCH_ACTION, entry, ROOMNUM_CAVE);

	hotspot->setActions(hotspot->resource()->actions | (1 << (TELL - 1)));
	hotspot->setActionCtr(0);
	hotspot->setDelayCtr(0);
	hotspot->setCharacterMode(CHARMODE_NONE);
}
Exemple #3
0
void Script::transformPlayer(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	HotspotData *hotspot = res.getHotspot(TRANSFORM_ID);
	HotspotData *player = res.getHotspot(PLAYER_ID);

	hotspot->roomNumber = player->roomNumber;
	hotspot->startX = player->startX - 14;
	hotspot->startY = player->startY - 10;

	Hotspot *activeHotspot = res.activateHotspot(TRANSFORM_ID);
	activeHotspot->setActionCtr(0);
	activeHotspot->setHotspotScript(0x630);
}
Exemple #4
0
void Script::fixGoewin(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *hotspot = res.getActiveHotspot(GOEWIN_ID);
	assert(hotspot);
	hotspot->setTickProc(STANDARD_CHARACTER_TICK_PROC);

	CharacterScheduleEntry *entry = res.charSchedules().getEntry(GOEWIN_STANDARD_SUPPORT_ID);
	assert(entry);
	hotspot->currentActions().clear();
	hotspot->currentActions().addFront(DISPATCH_ACTION, entry, hotspot->roomNumber());

	hotspot->setActions(hotspot->resource()->actions & ~(1 << (TELL - 1)));
	hotspot->setActionCtr(0);
	hotspot->setDelayCtr(0);
	hotspot->setCharacterMode(CHARMODE_NONE);
}