diff options
-rw-r--r-- | engines/lure/scripts.cpp | 16 | ||||
-rw-r--r-- | engines/lure/scripts.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 75c02767d8..27c30a2364 100644 --- a/engines/lure/scripts.cpp +++ b/engines/lure/scripts.cpp @@ -439,6 +439,21 @@ void Script::setVillageSkorlTickProc(uint16 v1, uint16 v2, uint16 v3) { hotspot->tickProcOffset = 0x7efa; } +// Barman serving the player + +void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) { + Resources &res = Resources::getReference(); + Hotspot *player = res.getActiveHotspot(PLAYER_ID); + BarEntry &barEntry = res.barmanLists().getDetails(player->roomNumber()); + + for (int index = 0; index < NUM_SERVE_CUSTOMERS; ++index) { + if (barEntry.customers[index].hotspotId == PLAYER_ID) { + barEntry.customers[index].serveFlags |= 5; + break; + } + } +} + // Stores the current number of groats in the general field void Script::getNumGroats(uint16 v1, uint16 v2, uint16 v3) { @@ -534,6 +549,7 @@ SequenceMethodRecord scriptMethods[] = { {50, Script::givePlayerItem}, {51, Script::decreaseNumGroats}, {54, Script::setVillageSkorlTickProc}, + {56, Script::barmanServe}, {57, Script::getNumGroats}, {62, Script::animationLoad}, {63, Script::addActions}, diff --git a/engines/lure/scripts.h b/engines/lure/scripts.h index 5c1cc2b135..22bd74fa0b 100644 --- a/engines/lure/scripts.h +++ b/engines/lure/scripts.h @@ -116,6 +116,7 @@ public: static void givePlayerItem(uint16 hotspotId, uint16 v2, uint16 v3); static void decreaseNumGroats(uint16 characterId, uint16 numGroats, uint16 v3); static void setVillageSkorlTickProc(uint16 v1, uint16 v2, uint16 v3); + static void barmanServe(uint16 v1, uint16 v2, uint16 v3); static void getNumGroats(uint16 v1, uint16 v2, uint16 v3); static void animationLoad(uint16 hotspotId, uint16 v2, uint16 v3); static void addActions(uint16 hotspotId, uint16 actions, uint16 v3); |