MCPcopy Create free account
hub / github.com/EasyRPG/Player / AddActor

Method AddActor

src/game_party.cpp:460–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460void 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
479void Game_Party::RemoveActor(int actor_id) {
480 if (!IsActorInParty(actor_id))

Callers 5

OnMapFileReadyFunction · 0.80
ConfirmMethod · 0.80
enemyai.cppFile · 0.80
MockBattleMethod · 0.80

Calls 4

ResetGraphicMethod · 0.80
GetActorMethod · 0.45
sizeMethod · 0.45
OnPartyChangedMethod · 0.45

Tested by 1

MockBattleMethod · 0.64