| 691 | } |
| 692 | |
| 693 | S32 zNPCVillager::NPCMessage(NPCMsg* mail) |
| 694 | { |
| 695 | S32 handled; |
| 696 | xPsyche* psy = this->psy_instinct; |
| 697 | zNPCGoalCommon* curgoal; |
| 698 | zNPCGoalCommon* recgoal; |
| 699 | |
| 700 | if (psy) |
| 701 | { |
| 702 | curgoal = (zNPCGoalCommon*)psy->GetCurGoal(); |
| 703 | if (curgoal) |
| 704 | { |
| 705 | handled = curgoal->NPCMessage(mail); |
| 706 | if (handled) |
| 707 | return handled; |
| 708 | } |
| 709 | |
| 710 | recgoal = (zNPCGoalCommon*)psy->GetPrevRecovery(0); |
| 711 | if (recgoal && recgoal != curgoal) |
| 712 | { |
| 713 | handled = recgoal->NPCMessage(mail); |
| 714 | if (handled) |
| 715 | return handled; |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | handled = this->FolkHandleMail(mail); |
| 720 | if (!handled) |
| 721 | { |
| 722 | handled = zNPCCommon::NPCMessage(mail); |
| 723 | } |
| 724 | |
| 725 | return handled; |
| 726 | } |
| 727 | |
| 728 | // non-matching: register shenanigans |
| 729 | S32 zNPCVillager::FolkHandleMail(NPCMsg* mail) |
nothing calls this directly
no test coverage detected