| 337 | } |
| 338 | |
| 339 | S32 zNPCDuplotron::NPCMessage(NPCMsg* mail) |
| 340 | { |
| 341 | S32 handled; |
| 342 | |
| 343 | // From the dwarf but I can't find a way to use it that also matches: |
| 344 | //xPsyche* psy = this->psy_instinct; |
| 345 | |
| 346 | if (this->psy_instinct != NULL) |
| 347 | { |
| 348 | zNPCGoalCommon* curgoal = (zNPCGoalCommon*)(psy_instinct->GetCurGoal()); |
| 349 | if (curgoal != NULL) |
| 350 | { |
| 351 | handled = curgoal->NPCMessage(mail); |
| 352 | } |
| 353 | |
| 354 | if (!handled) |
| 355 | { |
| 356 | zNPCGoalCommon* recgoal = (zNPCGoalCommon*)(psy_instinct->GetPrevRecovery(0)); |
| 357 | if (recgoal && recgoal != curgoal) |
| 358 | { |
| 359 | handled = recgoal->NPCMessage(mail); |
| 360 | } |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | if (!handled) |
| 365 | { |
| 366 | handled = this->DupoHandleMail(mail); |
| 367 | } |
| 368 | |
| 369 | if (!handled) |
| 370 | { |
| 371 | handled = zNPCCommon::NPCMessage(mail); |
| 372 | } |
| 373 | |
| 374 | return handled; |
| 375 | } |
| 376 | |
| 377 | S32 zNPCDuplotron::DupoHandleMail(NPCMsg* mail) |
| 378 | { |
nothing calls this directly
no test coverage detected