refactor: rename EnterMissionScene to EnterSceneByEntranceId

This commit is contained in:
Somebody
2025-04-19 18:59:49 +08:00
parent e834db9e02
commit 1398278245
9 changed files with 14 additions and 14 deletions

View File

@@ -416,7 +416,7 @@ public class ChessRogueInstance : BaseRogueInstance
CurCell = cell;
cell.CellStatus = ChessRogueBoardCellStatus.Finish;
await Player.EnterMissionScene(cell.GetEntryId(), cell.RoomConfig!.AnchorGroup, cell.RoomConfig!.AnchorId,
await Player.EnterSceneByEntranceId(cell.GetEntryId(), cell.RoomConfig!.AnchorGroup, cell.RoomConfig!.AnchorId,
false);
HistoryCell.Add(cell);

View File

@@ -12,6 +12,6 @@ public class MissionHandlerEnterEntryIfNotThere : MissionFinishActionHandler
var anchorGroup = Params[1];
var anchorId = Params[2];
await Player.EnterMissionScene(entryId, anchorGroup, anchorId, true);
await Player.EnterSceneByEntranceId(entryId, anchorGroup, anchorId, true);
}
}

View File

@@ -11,6 +11,6 @@ public class MissionHandlerMoveToAnchor : MissionFinishActionHandler
var entryId = Params[0];
var anchorGroup = Params[1];
var anchorId = Params[2];
await Player.EnterMissionScene(entryId, anchorGroup, anchorId, true);
await Player.EnterSceneByEntranceId(entryId, anchorGroup, anchorId, true);
}
}

View File

@@ -57,12 +57,12 @@ public class StoryLineManager : BasePlayerManager
await Player.SendPacket(new PacketSyncLineupNotify(Player.LineupManager!.GetCurLineup()!));
if (entryId > 0)
{
await Player.EnterMissionScene(entryId, anchorGroupId, anchorId, true);
await Player.EnterSceneByEntranceId(entryId, anchorGroupId, anchorId, true);
}
else
{
if (lineInfo == null)
await Player.EnterMissionScene(storyExcel.InitEntranceID, storyExcel.InitGroupID,
await Player.EnterSceneByEntranceId(storyExcel.InitEntranceID, storyExcel.InitGroupID,
storyExcel.InitAnchorID,
true);
else
@@ -219,7 +219,7 @@ public class StoryLineManager : BasePlayerManager
if (tp)
{
if (entryId > 0)
await Player.EnterMissionScene(entryId, anchorGroupId, anchorId, true);
await Player.EnterSceneByEntranceId(entryId, anchorGroupId, anchorId, true);
else
await Player.LoadScene(StoryLineData.OldPlaneId, StoryLineData.OldFloorId, StoryLineData.OldEntryId,
StoryLineData.OldPos, StoryLineData.OldRot, true);

View File

@@ -729,7 +729,7 @@ public class PlayerInstance(PlayerData data)
beforeStoryLineId != storyLineId; // return true if entryId changed or story line changed
}
public async ValueTask EnterMissionScene(int entranceId, int anchorGroupId, int anchorId, bool sendPacket)
public async ValueTask EnterSceneByEntranceId(int entranceId, int anchorGroupId, int anchorId, bool sendPacket)
{
GameData.MapEntranceData.TryGetValue(entranceId, out var entrance);
if (entrance == null) return;

View File

@@ -176,7 +176,7 @@ public class RogueMagicInstance : BaseRogueInstance
EventManager?.OnNextRoom();
foreach (var miracle in RogueMiracles.Values) miracle.OnEnterNextRoom();
await Player.EnterMissionScene(entrance, group, anchor, false);
await Player.EnterSceneByEntranceId(entrance, group, anchor, false);
// sync
await Player.SendPacket(new PacketRogueMagicLevelInfoUpdateScNotify(this, [CurLevel], [
@@ -193,7 +193,7 @@ public class RogueMagicInstance : BaseRogueInstance
await Player.SendPacket(new PacketSyncLineupNotify(currentLineup));
await Player.EnterMissionScene(801120102, 0, 0, false);
await Player.EnterSceneByEntranceId(801120102, 0, 0, false);
Player.RogueMagicManager!.RogueMagicInstance = null;
}

View File

@@ -122,7 +122,7 @@ public class RogueTournInstance : BaseRogueInstance
EventManager?.OnNextRoom();
foreach (var miracle in RogueMiracles.Values) miracle.OnEnterNextRoom();
await Player.EnterMissionScene(entrance, group, anchor, false);
await Player.EnterSceneByEntranceId(entrance, group, anchor, false);
// check if era flipper
if (Player.SceneInstance!.FloorInfo!.LevelFeatureModules.Contains(LevelFeatureTypeEnum.EraFlipper))
@@ -151,7 +151,7 @@ public class RogueTournInstance : BaseRogueInstance
await Player.SendPacket(new PacketSyncLineupNotify(currentLineup));
await Player.EnterMissionScene(1034102, 0, 0, false);
await Player.EnterSceneByEntranceId(1034102, 0, 0, false);
Player.RogueTournManager!.RogueTournInstance = null;
}

View File

@@ -96,13 +96,13 @@ public class LevelTask(PlayerInstance player)
public async ValueTask EnterMap(TaskConfigInfo act, SubMissionExcel subMission, GroupInfo? group = null)
{
if (act is EnterMap enterMap)
await Player.EnterMissionScene(enterMap.EntranceID, enterMap.GroupID, enterMap.AnchorID, true);
await Player.EnterSceneByEntranceId(enterMap.EntranceID, enterMap.GroupID, enterMap.AnchorID, true);
}
public async ValueTask EnterMapByCondition(TaskConfigInfo act, SubMissionExcel subMission, GroupInfo? group = null)
{
if (act is EnterMapByCondition enterMapByCondition)
await Player.EnterMissionScene(enterMapByCondition.EntranceID.GetValue(), 0, 0, true);
await Player.EnterSceneByEntranceId(enterMapByCondition.EntranceID.GetValue(), 0, 0, true);
}
public async ValueTask TriggerPerformance(TaskConfigInfo act, SubMissionExcel subMission, GroupInfo? group = null)

View File

@@ -172,7 +172,7 @@ public class EntryPoint
}
// check option
if (true || args.Contains("-generate-tourn"))
if (args.Contains("-generate-tourn"))
{
TournRoomGenerator.GenerateFile("RogueTournRoom.json");
return;