| 458 | } |
| 459 | |
| 460 | void Game_Party::AddActor(int actor_id) { |
| 461 | auto* actor = Main_Data::game_actors->GetActor(actor_id); |
| 462 | if (!actor) { |
| 463 | return; |
| 464 | } |
| 465 | |
| 466 | if (IsActorInParty(actor_id)) |
| 467 | return; |
| 468 | if (data.party.size() >= 4) |
| 469 | return; |
| 470 | data.party.push_back((int16_t)actor_id); |
| 471 | Main_Data::game_player->ResetGraphic(); |
| 472 | |
| 473 | auto scene = Scene::Find(Scene::Battle); |
| 474 | if (scene) { |
| 475 | scene->OnPartyChanged(actor, true); |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | void Game_Party::RemoveActor(int actor_id) { |
| 480 | if (!IsActorInParty(actor_id)) |