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

Method CommandTradeEventLocations

src/game_interpreter.cpp:2315–2336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2313}
2314
2315bool Game_Interpreter::CommandTradeEventLocations(lcf::rpg::EventCommand const& com) { // Code 10870
2316 int event1_id = com.parameters[0];
2317 int event2_id = com.parameters[1];
2318
2319 Game_Character *event1 = GetCharacter(event1_id, "TradeEventLocations");
2320 Game_Character *event2 = GetCharacter(event2_id, "TradeEventLocations");
2321
2322 if (event1 != nullptr && event2 != nullptr) {
2323 auto m1 = event1->GetMapId();
2324 auto x1 = event1->GetX();
2325 auto y1 = event1->GetY();
2326
2327 auto m2 = event2->GetMapId();
2328 auto x2 = event2->GetX();
2329 auto y2 = event2->GetY();
2330
2331 event1->MoveTo(m2, x2, y2);
2332 event2->MoveTo(m1, x1, y1);
2333 }
2334
2335 return true;
2336}
2337
2338bool Game_Interpreter::CommandStoreTerrainID(lcf::rpg::EventCommand const& com) { // code 10820
2339 int x = ValueOrVariable(com.parameters[0], com.parameters[1]);

Callers

nothing calls this directly

Calls 4

GetMapIdMethod · 0.45
GetXMethod · 0.45
GetYMethod · 0.45
MoveToMethod · 0.45

Tested by

no test coverage detected