bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { CPetControl *pet = getPetControl(); if (_flag) { _flag = false; setVisible(true); starFn(STAR_HIDE); playMovie(61, 120, MOVIE_NOTIFY_OBJECT); playSound("a#47.wav"); playSound("a#48.wav"); if (pet) { pet->decAreaLocks(); pet->setArea(PET_REMOTE); } decTransitions(); } else { incTransitions(); _flag = true; setVisible(true); playMovie(0, 60, MOVIE_NOTIFY_OBJECT); playSound("a#48.wav"); playSound("a#47.wav"); } return true; }
bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) { bool flag = false; if (_npcFlags & NPCFLAG_10000) { if (_classNum) { petSetArea(PET_ROOMS); decTransitions(); unlockMouse(); playSound("z#47.wav"); _classNum = NO_CLASS; } _npcFlags &= ~NPCFLAG_10000; flag = true; } if (_npcFlags & NPCFLAG_40000) { _deskbotActive = false; _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000); if (_npcFlags & NPCFLAG_80000) { CTurnOn turnOn; turnOn.execute("EmbBellbotTrigger"); unlockMouse(); changeView("EmbLobby.Node 4.N", ""); } else if (_npcFlags & NPCFLAG_100000) { CTurnOn turnOn; turnOn.execute("EmbDoorBotTrigger"); unlockMouse(); changeView("EmbLobby.Node 4.N", ""); } _npcFlags &= ~(NPCFLAG_80000 | NPCFLAG_100000); flag = true; } if (_npcFlags & NPCFLAG_20000) { _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000); setTalking(this, true, findView()); _npcFlags |= NPCFLAG_START_IDLING; flag = true; } if (!flag) CTrueTalkNPC::MovieEndMsg(msg); return true; }
bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); if (msg->_endFrame == _endFrame12) { if (_startFrame10 >= 0) playSound("z#27.wav"); } else if (msg->_endFrame == _endFrame10) { if (_startFrame11 >= 0) playSound("z#30.wav"); } else { if (_endFrame9 == _endFrame10 && pet) { if (_v2) { startTalking(this, getRandomNumber(1) ? 230062 : 230063); } else if (!findMail(pet->getRoomFlags())) { switch (getRandomNumber(4)) { case 0: startTalking(this, 230001); break; case 1: startTalking(this, 230002); break; case 2: startTalking(this, 230003); break; default: break; } } } if (msg->_endFrame == _endFrame3) { switch (_field158) { case 1: stopSound(_soundHandle); _soundHandle = playSound("z#3.wav"); break; case 2: stopSound(_soundHandle); _soundHandle = playSound("z#12.wav"); break; case 3: if (_isChicken) { startTalking(this, 230018); _isChicken = false; } else { startTalking(this, 230013); } break; case 4: startTalking(this, 230017); break; default: break; } CSUBTransition transMsg; transMsg.execute(this); } else if (msg->_endFrame == _bilgeEndFrame2) { playSound("z#25.wav", 70); playSound("z#24.wav", 70); } else if (msg->_endFrame == _endFrame4) { if (_mailP) { _mailP->petAddToInventory(); CVisibleMsg visibleMsg(true); visibleMsg.execute(_mailP); _mailP = nullptr; petSetArea(PET_INVENTORY); CSUBTransition transMsg; transMsg.execute(this); } } else if (msg->_endFrame == _bilgeEndFrame1) { changeView("BilgeRoomWith.Node 1.N", ""); _v2 = 0; resetMail(); if (_mailP) { _mailP->petAddToInventory(); CVisibleMsg visibleMsg(true); visibleMsg.execute(_mailP); _mailP = nullptr; petSetArea(PET_INVENTORY); } startTalking(this, 150); CBodyInBilgeRoomMsg bodyMsg; bodyMsg.execute("Service Elevator Entity"); decTransitions(); _field158 = 0; } else { _field158 = 0; } } return true; }
bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); uint petRoomFlags = pet ? pet->getRoomFlags() : 0; if (msg->_endFrame == _endFrame10) { if (_startFrame11 >= 0) playSound("z#30.wav", 100); if (_field15C) { _field15C = false; setVisible(false); CSignalObject signalMsg; signalMsg._numValue = 1; signalMsg.execute(_string2); } } if (msg->_endFrame == _endFrame9) { bool flag = false; if (pet && mailExists(petRoomFlags)) { CGameObject *mailObject = _v3 && compareRoomNameTo("Titania") ? findMailByFlags(3, petRoomFlags) : findMailByFlags(_field140, petRoomFlags); if (mailObject) { switch (getRandomNumber(4)) { case 0: startTalking(this, 70094, findView()); break; case 1: startTalking(this, 70095, findView()); break; case 2: startTalking(this, 70096, findView()); break; case 3: startTalking(this, 70098, findView()); break; case 4: startTalking(this, 70099, findView()); break; default: break; } flag = true; } } if (!_field188 && !flag) { stopSound(_soundHandle); _soundHandle = -1; switch (getRandomNumber(_v2 ? 7 : 5, &_field1B0)) { case 2: startTalking(this, 230001, findView()); break; case 3: startTalking(this, 230002, findView()); break; case 4: startTalking(this, 230003, findView()); break; case 5: startTalking(this, 230064, findView()); break; case 6: startTalking(this, 230062, findView()); break; case 7: startTalking(this, 230063, findView()); break; default: break; } } } if (msg->_endFrame == _endFrame3) { if (_field158 == 1) { startTalking(this, 230022, findView()); } else if (_field158 == 2) { startTalking(this, 230017, findView()); } else if (_field19C) { startTalking(this, 230019, findView()); _field19C = 0; } else if (_isChicken) { startTalking(this, 230018, findView()); _isChicken = false; } else { startTalking(this, 230013, findView()); } if (_field1D8) { _field1D8 = 0; decTransitions(); } CSUBTransition transMsg; transMsg.execute(this); } if (msg->_endFrame == _endFrame4) { if (pet && _mailP) { _mailP->setMailId(petRoomFlags); } _field188 = 1; _mailP = 0; if (_field1D8) { _field1D8 = 0; decTransitions(); } CSUBTransition transMsg; transMsg.execute(this); } return true; }
bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); uint petRoomFlags = pet ? pet->getRoomFlags() : 0; if (msg->_endFrame == _offEndFrame) { if (_endingStartFrame >= 0) playSound("z#30.wav", 100); if (_signalFlag) { _signalFlag = false; setVisible(false); CSignalObject signalMsg; signalMsg._numValue = 1; signalMsg.execute(_signalTarget); } } if (msg->_endFrame == _onEndFrame) { bool flag = false; if (pet && !mailExists(petRoomFlags)) { CGameObject *mailObject = _enabled && compareRoomNameTo("Titania") ? findMailByFlags(RFC_TITANIA, petRoomFlags) : findMailByFlags(_flagsComparison, petRoomFlags); if (mailObject) { switch (getRandomNumber(4)) { case 0: startTalking(this, 70094, findView()); break; case 1: startTalking(this, 70095, findView()); break; case 2: startTalking(this, 70096, findView()); break; case 3: startTalking(this, 70098, findView()); break; case 4: startTalking(this, 70099, findView()); break; default: break; } flag = true; } } if (!_field188 && !flag) { stopSound(_soundHandle); _soundHandle = -1; switch (getRandomNumber(_style ? 7 : 5, &_priorRandomVal2)) { case 2: startTalking(this, 230001, findView()); break; case 3: startTalking(this, 230002, findView()); break; case 4: startTalking(this, 230003, findView()); break; case 5: startTalking(this, 230064, findView()); break; case 6: startTalking(this, 230062, findView()); break; case 7: startTalking(this, 230063, findView()); break; default: break; } } } if (msg->_endFrame == _sendEndFrame) { if (_sendAction == SA_FEATHERS) { startTalking(this, 230022, findView()); } else if (_sendAction == SA_EATEN) { startTalking(this, 230017, findView()); } else if (_sendLost) { startTalking(this, 230019, findView()); _sendLost = false; } else if (_isChicken) { startTalking(this, 230018, findView()); _isChicken = false; } else { startTalking(this, 230013, findView()); } if (_inProgress) { _inProgress = false; decTransitions(); } CSUBTransition transMsg; transMsg.execute(this); } if (msg->_endFrame == _receiveEndFrame) { // SuccUBus disgorged mail if (pet && _mailP) { _mailP->setMailDest(petRoomFlags); } _field188 = 1; _mailP = nullptr; if (_inProgress) { _inProgress = false; decTransitions(); } CSUBTransition transMsg; transMsg.execute(this); } return true; }
bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); if (msg->_endFrame == _trayOutEndFrame) { if (_offStartFrame >= 0) playSound("z#27.wav"); } else if (msg->_endFrame == _offEndFrame) { if (_endingStartFrame >= 0) playSound("z#30.wav"); } else { if (msg->_endFrame == _onEndFrame && pet) { if (_style) { startTalking(this, getRandomNumber(1) ? 230062 : 230063); } else if (!findMail(pet->getRoomFlags())) { switch (getRandomNumber(4)) { case 0: startTalking(this, 230001); break; case 1: startTalking(this, 230002); break; case 2: startTalking(this, 230003); break; default: break; } } } else if (msg->_endFrame == _sendEndFrame) { switch (_sendAction) { case SA_EATEN: stopSound(_soundHandle, 1); _soundHandle = playSound("z#3.wav", 1); break; case SA_BILGE_FEATHERS: stopSound(_soundHandle); _soundHandle = playSound("z#12.wav"); break; case SA_BILGE_SENT: if (_isChicken) { startTalking(this, 230018); _isChicken = false; } else { startTalking(this, 230013); } break; case SA_BILGE_EATEN: startTalking(this, 230017); break; default: break; } CSUBTransition transMsg; transMsg.execute(this); } else if (msg->_endFrame == _receiveEndFrame) { if (_mailP) { _mailP->petAddToInventory(); CVisibleMsg visibleMsg(true); visibleMsg.execute(_mailP); _mailP = nullptr; petSetArea(PET_INVENTORY); CSUBTransition transMsg; transMsg.execute(this); } } else if (msg->_endFrame == _sneezing1EndFrame) { playSound("z#25.wav", 70); playSound("z#24.wav", 70); } else if (msg->_endFrame == _sneezing2EndFrame) { changeView("BilgeRoomWith.Node 1.N", ""); _style = false; resetMail(); if (_mailP) { _mailP->petAddToInventory(); CVisibleMsg visibleMsg(true); visibleMsg.execute(_mailP); _mailP = nullptr; petSetArea(PET_INVENTORY); } startTalking(this, 150); CBodyInBilgeRoomMsg bodyMsg; bodyMsg.execute("Service Elevator Entity"); decTransitions(); _sendAction = SA_SENT; } else { _sendAction = SA_SENT; } } return true; }