non-matching: register shenanigans
| 727 | |
| 728 | // non-matching: register shenanigans |
| 729 | S32 zNPCVillager::FolkHandleMail(NPCMsg* mail) |
| 730 | { |
| 731 | S32 handled = 1; |
| 732 | |
| 733 | xPsyche* psy = this->psy_instinct; // not in dwarf |
| 734 | |
| 735 | switch (mail->msgid) |
| 736 | { |
| 737 | case 3: |
| 738 | { |
| 739 | if (psy && !psy->GIDInStack(NPC_GOAL_CHEER)) |
| 740 | { |
| 741 | if (!psy->GIDInStack(NPC_GOAL_HURT)) |
| 742 | { |
| 743 | psy->GoalPush(NPC_GOAL_HURT, 0); |
| 744 | } |
| 745 | } |
| 746 | break; |
| 747 | } |
| 748 | |
| 749 | case 1: |
| 750 | if (mail->sysevent.toEvent == 0x20e) |
| 751 | { |
| 752 | psy->GoalSet(NPC_GOAL_TALK, 0); |
| 753 | } |
| 754 | else if (mail->sysevent.toEvent == 0x1d9) |
| 755 | { |
| 756 | handled = zNPCCommon::NPCMessage(mail); |
| 757 | } |
| 758 | else if (mail->sysevent.toEvent == 0x1d8) |
| 759 | { |
| 760 | handled = zNPCCommon::NPCMessage(mail); |
| 761 | } |
| 762 | else |
| 763 | { |
| 764 | handled = zNPCCommon::NPCMessage(mail); |
| 765 | } |
| 766 | break; |
| 767 | |
| 768 | default: |
| 769 | handled = 0; |
| 770 | break; |
| 771 | } |
| 772 | |
| 773 | return handled; |
| 774 | } |
| 775 | |
| 776 | void zNPCVillager::SpeakBegin() |
| 777 | { |
no test coverage detected