Added script method for barmen serving player

svn-id: r26463
This commit is contained in:
Paul Gilbert 2007-04-14 03:46:30 +00:00
parent ff31d88c92
commit 8be6153533
2 changed files with 17 additions and 0 deletions

View File

@ -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},

View File

@ -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);