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 CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) { CPetControl *pet = getPetControl(); if (_inProgress || !pet) return true; if (!_isOn) { petDisplayMessage(2, SUCCUBUS_IS_IN_STANDBY); return true; } uint petRoomFlags = pet->getRoomFlags(); if (mailExists(petRoomFlags)) { // There's already something to send in the tray, so you can't receive switch (getRandomNumber(2)) { case 0: startTalking(this, 70080, findView()); break; case 1: startTalking(this, 70081, findView()); break; case 2: startTalking(this, 70082, findView()); break; default: break; } } else { CGameObject *mailObject = findMailByFlags( _enabled && compareRoomNameTo("Titania") ? RFC_TITANIA : _flagsComparison, petRoomFlags); if (!mailObject) { // No mail for this SuccUBus if (getRandomNumber(1) == 0) { startTalking(this, 70104, findView()); } else { startTalking(this, 70105, findView()); } playMovie(_emptyStartFrame, _emptyEndFrame, 0); playMovie(_smokeStartFrame, _smokeEndFrame, 0); petDisplayMessage(2, NOTHING_TO_DELIVER); } else { // Receive the mail addressed to this SuccUBus _mailP = mailObject; startTalking(this, 230004, findView()); if (_receiveStartFrame >= 0) { _sendAction = SA_FEATHERS; _inProgress = true; incTransitions(); playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT); } } } return true; }
bool CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) { CPetControl *pet = getPetControl(); if (_field1D8 || !pet) return true; if (!_enabled) { petDisplayMessage(2, SUCCUBUS_IS_IN_STANDBY); return true; } uint petRoomFlags = pet->getRoomFlags(); if (mailExists(petRoomFlags)) { switch (getRandomNumber(2)) { case 0: startTalking(this, 70080, findView()); break; case 1: startTalking(this, 70081, findView()); break; case 2: startTalking(this, 70082, findView()); break; default: break; } } else { CGameObject *mailObject = findMailByFlags(compareRoomNameTo("Titania") ? 3 : _field140, petRoomFlags); if (!mailObject) { if (getRandomNumber(1) == 0) { startTalking(this, 70104, findView()); } else { startTalking(this, 70105, findView()); } playMovie(_startFrame6, _endFrame6, 0); playMovie(_startFrame7, _endFrame7, 0); petDisplayMessage(2, NOTHING_TO_DELIVER); } else { startTalking(this, 230004, findView()); if (_startFrame4 >= 0) { _field158 = 1; _field1D8 = 1; incTransitions(); playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT); } } } return true; }
bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { CPetControl *pet = getPetControl(); if (!_enabled || !pet) return true; uint petRoomFlags = pet->getRoomFlags(); CGameObject *mailObject = findMail(petRoomFlags); if (!mailObject) { petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); return true; } _field19C = 0; _mailP = mailObject; uint roomFlags = _roomFlags; if (!pet->testRooms5(roomFlags) || getPassengerClass() > pet->getMailDest(roomFlags)) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); _field19C = 1; } _isChicken = mailObject->getName() == "Chicken"; _isFeathers = mailObject->getName() == "Feathers"; _field158 = 0; if (_v2) { if (_isFeathers) { startTalking(this, 230022); _field158 = 1; if (_startFrame3 >= 0) playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT); if (_bilgeStartFrame1 >= 0) { playMovie(_startFrame12, _endFrame12, MOVIE_GAMESTATE); playMovie(_bilgeStartFrame2, _bilgeEndFrame2, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); playMovie(_bilgeStartFrame1, _bilgeEndFrame1, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); incTransitions(); } } else { startTalking(this, 230012); _field158 = 2; if (_startFrame3 >= 0) playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); if (_startFrame4 >= 0) playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); if (_startFrame5 >= 0) playMovie(_startFrame5, _endFrame5, MOVIE_GAMESTATE); } } else { if (_isFeathers) { startTalking(this, 230022); _field158 = 3; if (_startFrame3 >= 0) playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); if (_startFrame4 >= 0) playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); if (_startFrame5 >= 0) playMovie(_startFrame5, _endFrame5, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); } else { removeMail(petRoomFlags, roomFlags); startTalking(this, 230012); if (_startFrame3 >= 0) { _field158 = 4; playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); } } } return true; }
bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { if (_field1D8) return true; if (!_enabled) { petDisplayMessage(2, SUCCUBUS_IS_IN_STANDBY); return true; } CPetControl *pet = getPetControl(); if (!pet) return true; CGameObject *mailObject = findMail(pet->getRoomFlags()); if (!mailObject) { switch (getRandomNumber(2)) { case 0: startTalking(this, 70111, findView()); break; case 1: startTalking(this, 70112, findView()); break; case 2: startTalking(this, 70113, findView()); break; default: break; } petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); } else { _field19C = 0; CRoomFlags roomFlags = _roomFlags; if (!pet->testRooms5(roomFlags) || getPassengerClass() > 0) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); _field19C = 1; } else { pet->getMailDest(roomFlags); } _isFeathers = mailObject->getName() == "Feathers"; _isChicken = mailObject->getName() == "Chicken"; _field158 = 0; _field188 = 0; _field1D8 = 1; incTransitions(); if (_isFeathers) { _field19C = 0; removeMail(roomFlags, roomFlags); pet->phonographAction(""); if (_startFrame2 >= 0) { playMovie(_startFrame2, _endFrame2, 0); startTalking(this, 230022, findView()); } _field158 = 1; if (_startFrame3 >= 0) playMovie(_startFrame3, _endFrame3, 0); if (_startFrame4 >= 0) { _mailP = mailObject; playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT); } if (_startFrame5 >= 0) { playMovie(_startFrame5, _endFrame5, 0); } } else { removeMail(pet->getRoomFlags(), roomFlags); pet->phonographAction(""); if (_startFrame2 >= 0) { playMovie(_startFrame2, _endFrame2, 0); startTalking(this, 230012, findView()); } if (_startFrame3 >= 0) playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT); } } return true; }
bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) { switch (msg->_action) { case 19: incTransitions(); lockMouse(); petSetArea(PET_CONVERSATION); playClip("ReprogramPETInHand", MOVIE_NOTIFY_OBJECT); _npcFlags |= NPCFLAG_10000; _classNum = (PassengerClass)msg->_param1; switch (_classNum) { case FIRST_CLASS: petDisplayMessage(UPGRADED_TO_FIRST_CLASS); setPassengerClass(_classNum); petReassignRoom(_classNum); break; case SECOND_CLASS: petDisplayMessage(UPGRADED_TO_SECOND_CLASS); setPassengerClass(_classNum); petReassignRoom(_classNum); break; case THIRD_CLASS: setPassengerClass(THIRD_CLASS); petReassignRoom(_classNum); break; default: break; } case 20: if (getPassengerClass() == 1) { CPetControl *petControl = getPetControl(); if (petControl) petControl->changeLocationClass(UNCHECKED); } break; case 21: if (getPassengerClass() == FIRST_CLASS) { CPetControl *petControl = getPetControl(); if (petControl) petControl->changeLocationClass(THIRD_CLASS); } break; case 22: if (getPassengerClass() == FIRST_CLASS) { CPetControl *petControl = getPetControl(); if (petControl) petControl->changeLocationClass(SECOND_CLASS); } break; case 23: if (getPassengerClass() == FIRST_CLASS) { CPetControl *petControl = getPetControl(); if (petControl) petControl->changeLocationClass(FIRST_CLASS); } break; case 26: _npcFlags |= NPCFLAG_80000; CTurnOff turnOff; turnOff.execute(this); lockMouse(); break; } return true; }
bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { if (_inProgress) return true; if (!_isOn) { petDisplayMessage(2, SUCCUBUS_IS_IN_STANDBY); return true; } CPetControl *pet = getPetControl(); if (!pet) return true; uint destRoomFlags = pet->getRoomFlags(); CGameObject *mailObject = findMail(destRoomFlags); if (!mailObject) { switch (getRandomNumber(2)) { case 0: startTalking(this, 70111, findView()); break; case 1: startTalking(this, 70112, findView()); break; case 2: startTalking(this, 70113, findView()); break; default: break; } petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); } else { _sendLost = false; CRoomFlags roomFlags = _destRoomFlags; if (!pet->isSuccUBusDest(roomFlags) || pet->getMailDestClass(roomFlags) < getPassengerClass()) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); _sendLost = true; } _isFeathers = mailObject->getName() == "Feathers"; _isChicken = mailObject->getName() == "Chicken"; _sendAction = SA_SENT; _field188 = 0; _inProgress = true; incTransitions(); if (_isFeathers) { // The feather has special handling to be rejected by the SuccUBus _sendLost = false; sendMail(destRoomFlags, roomFlags); pet->phonographAction(""); if (_okStartFrame >= 0) { playMovie(_okStartFrame, _okEndFrame, 0); startTalking(this, 230022, findView()); } _sendAction = SA_FEATHERS; if (_sendStartFrame >= 0) playMovie(_sendStartFrame, _sendEndFrame, 0); if (_receiveStartFrame >= 0) { _mailP = mailObject; playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT); } if (_afterReceiveStartFrame >= 0) { playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, 0); } } else { // Send the mail to the destination sendMail(pet->getRoomFlags(), roomFlags); pet->phonographAction(""); if (_okStartFrame >= 0) { playMovie(_okStartFrame, _okEndFrame, 0); startTalking(this, 230012, findView()); } if (_sendStartFrame >= 0) playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT); } } return true; }
bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { CPetControl *pet = getPetControl(); if (!_isOn || !pet) return true; uint petRoomFlags = pet->getRoomFlags(); CGameObject *mailObject = findMail(petRoomFlags); if (!mailObject) { petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); return true; } _sendLost = false; _mailP = mailObject; uint roomFlags = _destRoomFlags; if (!pet->isSuccUBusDest(roomFlags) || getPassengerClass() > pet->getMailDestClass(roomFlags)) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); _sendLost = true; } _isChicken = mailObject->getName() == "Chicken"; _isFeathers = mailObject->getName() == "Feathers"; _sendAction = SA_SENT; if (_style) { if (_isFeathers) { startTalking(this, 230022); _sendAction = SA_FEATHERS; if (_sendStartFrame >= 0) playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT); if (_sneezing2StartFrame >= 0) { playMovie(_trayOutStartFrame, _trayOutEndFrame, MOVIE_WAIT_FOR_FINISH); playMovie(_sneezing1StartFrame, _sneezing1EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); playMovie(_sneezing2StartFrame, _sneezing2EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); incTransitions(); } } else { startTalking(this, 230012); _sendAction = SA_EATEN; if (_sendStartFrame >= 0) playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); if (_receiveStartFrame >= 0) playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); if (_afterReceiveStartFrame >= 0) playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, MOVIE_WAIT_FOR_FINISH); } } else { if (_isFeathers) { startTalking(this, 230022); _sendAction = SA_BILGE_FEATHERS; if (_sendStartFrame >= 0) playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); if (_receiveStartFrame >= 0) playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); if (_afterReceiveStartFrame >= 0) playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); } else { sendMail(petRoomFlags, roomFlags); startTalking(this, 230012); if (_sendStartFrame >= 0) { _sendAction = SA_BILGE_SENT; playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); } } } return true; }