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

Method Item

src/game_interpreter_control_variables.cpp:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44int ControlVariables::Item(int op, int item) {
45 switch (op) {
46 case 0:
47 // Number of items posessed
48 return Main_Data::game_party->GetItemCount(item);
49 break;
50 case 1:
51 // How often the item is equipped
52 return Main_Data::game_party->GetEquippedItemCount(item);
53 break;
54 }
55
56 Output::Warning("ControlVariables::Item: Unknown op {}", op);
57 return 0;
58}
59
60int ControlVariables::Actor(int op, int actor_id) {
61 auto actor = Main_Data::game_actors->GetActor(actor_id);

Callers

nothing calls this directly

Calls 2

GetEquippedItemCountMethod · 0.80
GetItemCountMethod · 0.45

Tested by

no test coverage detected