diff --git a/src/game_interpreter_battle.cpp b/src/game_interpreter_battle.cpp index da2ec95d08..8bdb2fe100 100644 --- a/src/game_interpreter_battle.cpp +++ b/src/game_interpreter_battle.cpp @@ -183,13 +183,13 @@ bool Game_Interpreter_Battle::AreConditionsMet(const lcf::rpg::TroopPageConditio } int Game_Interpreter_Battle::ScheduleNextPage(Game_Battler* source) { - lcf::rpg::TroopPageCondition::Flags f; + lcf::rpg::TroopPageCondition::TroopPageCondition_Flags f; for (auto& ff: f.flags) ff = true; return ScheduleNextPage(f, source); } -static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::Flags page, lcf::rpg::TroopPageCondition::Flags required) { +static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags page, lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required) { for (size_t i = 0; i < page.flags.size(); ++i) { if (required.flags[i] && page.flags[i]) { return true; @@ -198,7 +198,7 @@ static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::Flags page, lcf:: return false; } -int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::Flags required_conditions, Game_Battler* source) { +int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required_conditions, Game_Battler* source) { if (IsRunning()) { return 0; } diff --git a/src/game_interpreter_battle.h b/src/game_interpreter_battle.h index 4b83790eca..9939bd5211 100644 --- a/src/game_interpreter_battle.h +++ b/src/game_interpreter_battle.h @@ -50,7 +50,7 @@ class Game_Interpreter_Battle : public Game_Interpreter static bool AreConditionsMet(const lcf::rpg::TroopPageCondition& condition, Game_Battler* source); int ScheduleNextPage(Game_Battler* source); - int ScheduleNextPage(lcf::rpg::TroopPageCondition::Flags required_conditions, Game_Battler* source); + int ScheduleNextPage(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required_conditions, Game_Battler* source); void ResetPagesExecuted(); void SetCurrentEnemyTargetIndex(int idx); diff --git a/src/game_map.cpp b/src/game_map.cpp index 5180fdd437..3547b92a56 100644 --- a/src/game_map.cpp +++ b/src/game_map.cpp @@ -446,10 +446,13 @@ bool Game_Map::CloneMapEvent(int src_map_id, int src_event_id, int target_x, int }), new_event); auto game_event = Game_Event(GetMapId(), &*insert_it); + game_event.data()->easyrpg_clone_event_id = source_event->ID; + game_event.data()->easyrpg_clone_map_id = src_map_id; + events.insert( std::upper_bound(events.begin(), events.end(), game_event, [](const auto& e, const auto& e2) { return e.GetId() < e2.GetId(); - }), Game_Event(GetMapId(), &*insert_it)); + }), std::move(game_event)); UpdateUnderlyingEventReferences(); diff --git a/src/scene_battle_rpg2k3.cpp b/src/scene_battle_rpg2k3.cpp index 0c51d4a9a2..7f948c3bba 100644 --- a/src/scene_battle_rpg2k3.cpp +++ b/src/scene_battle_rpg2k3.cpp @@ -1031,7 +1031,7 @@ bool Scene_Battle_Rpg2k3::CheckBattleEndAndScheduleEvents(EventTriggerType tt, G return false; } - lcf::rpg::TroopPageCondition::Flags flags; + lcf::rpg::TroopPageCondition::TroopPageCondition_Flags flags; switch (tt) { case EventTriggerType::eBeforeBattleAction: flags.turn = flags.turn_actor = flags.turn_enemy = flags.command_actor = true;