250501 커밋
This commit is contained in:
@@ -17,13 +17,13 @@ public partial class InstanceRoom
|
||||
{
|
||||
public async Task<bool> battleInstanceInit()
|
||||
{
|
||||
var result = await BattleInstanceManager.It.battleInstanceInit(this, _roomId);
|
||||
if (result.isFail())
|
||||
{
|
||||
Log.getLogger().error(result.toBasicString());
|
||||
return false;
|
||||
}
|
||||
|
||||
// var result = await BattleInstanceManager.It.battleInstanceInit(this, _roomId);
|
||||
// if (result.isFail())
|
||||
// {
|
||||
// Log.getLogger().error(result.toBasicString());
|
||||
// return false;
|
||||
// }
|
||||
await Task.CompletedTask;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,47 +60,5 @@ public partial class InstanceRoom
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
public async Task LeaveBattleInstanceRoom(Player player, bool disconnected)
|
||||
{
|
||||
var user_guid = player.getUserGuid();
|
||||
|
||||
Log.getLogger().info($"BattleInstanceRoom.Leave() Start !!! - userGuid:{user_guid}, instanceRoomId:{_roomId}, sessionCount:{SessionCount}, addConnectedUser:{getMap().getCurrCountAsAddConnectedUser()}");
|
||||
|
||||
if (m_players.TryRemove(player.getUserGuid(), out _))
|
||||
{
|
||||
await BattleInstanceRoomHandler.leaveBattleInstanceRoom(user_guid, _roomId);
|
||||
}
|
||||
|
||||
var location_attribute = player.getEntityAttribute<LocationAttribute>();
|
||||
NullReferenceCheckHelper.throwIfNull(location_attribute, () => $"LocationAttribute is null !!! - player:{player.toBasicString()}");
|
||||
location_attribute.CurrentIndunLocation.clear();
|
||||
|
||||
var game_zone_action = player.getEntityAction<GameZoneAction>();
|
||||
await game_zone_action.tryLeaveGameZone();
|
||||
|
||||
if (SessionCount + getMap().getCurrCountAsAddConnectedUser() == 0)
|
||||
{
|
||||
if (!_isPartyInstance || _concertEnd)
|
||||
{
|
||||
await destroyRoom();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
ClientToGame clientToGame = new ClientToGame();
|
||||
clientToGame.Message = new ClientToGameMessage();
|
||||
clientToGame.Message.LeaveInstanceRoomMember = new ClientToGameMessage.Types.LeaveInstanceRoomMember();
|
||||
clientToGame.Message.LeaveInstanceRoomMember.MemberGuid = player.getUserGuid();
|
||||
|
||||
Broadcast(clientToGame);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Log.getLogger().info($"InstanceRoom.Leave() Finish !!! - userGuid:{user_guid}, instanceRoomId:{_roomId}, sessionCount:{SessionCount}, addConnectedUser:{getMap().getCurrCountAsAddConnectedUser()}");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user