| 2290 | } |
| 2291 | |
| 2292 | bool Game_Interpreter::CommandChangeEventLocation(lcf::rpg::EventCommand const& com) { // Code 10860 |
| 2293 | int event_id = com.parameters[0]; |
| 2294 | Game_Character *event = GetCharacter(event_id, "ChangeEventLocation"); |
| 2295 | if (event != nullptr) { |
| 2296 | const auto x = ValueOrVariable(com.parameters[1], com.parameters[2]); |
| 2297 | const auto y = ValueOrVariable(com.parameters[1], com.parameters[3]); |
| 2298 | event->MoveTo(event->GetMapId(), x, y); |
| 2299 | |
| 2300 | // RPG2k3 feature |
| 2301 | int direction = -1; |
| 2302 | if (Player::IsRPG2k3Commands() && com.parameters.size() > 4) { |
| 2303 | direction = com.parameters[4] - 1; |
| 2304 | } |
| 2305 | |
| 2306 | // Only for the constant case, not for variables |
| 2307 | if (com.parameters[1] == 0 && direction != -1) { |
| 2308 | event->SetDirection(direction); |
| 2309 | event->UpdateFacing(); |
| 2310 | } |
| 2311 | } |
| 2312 | return true; |
| 2313 | } |
| 2314 | |
| 2315 | bool Game_Interpreter::CommandTradeEventLocations(lcf::rpg::EventCommand const& com) { // Code 10870 |
| 2316 | int event1_id = com.parameters[0]; |
nothing calls this directly
no test coverage detected