초기커밋
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
|
||||
public class BattleInstanceJoinHandler : GameModeJoinHandlerBase
|
||||
{
|
||||
public BattleInstanceJoinHandler(InstanceRoom instanceRoom) : base(instanceRoom, EPlaceType.BattleRoom)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override Result gamedModeInstanceJoinValidate(EPlaceType placeType)
|
||||
{
|
||||
var result = BattleRoomHelper.checkBattleActive(m_place_type);
|
||||
return result;
|
||||
}
|
||||
|
||||
public override Result gamedModeInstanceJoin(Player player)
|
||||
{
|
||||
var result = new Result();
|
||||
string err_msg = string.Empty;
|
||||
|
||||
//instanceroom 정보는 남아있는데 battleinstance만 없어지는 케이스가 있어서 예외 처리를 위해 넣어놓음
|
||||
var room_id = m_instance_room.getMap().m_room_id;
|
||||
|
||||
var battle_instance_room = BattleInstanceManager.It.getBattleInstanceRoom(room_id); //리팩토링 대상
|
||||
if (battle_instance_room is null)
|
||||
{
|
||||
Log.getLogger().error($"Battle Room Instance is null.. so init start roomId : {room_id}");
|
||||
|
||||
result = Task.Run(() => BattleInstanceManager.It.battleInstanceInit(m_instance_room, room_id)).GetAwaiter().GetResult();
|
||||
if (result.isFail())
|
||||
{
|
||||
err_msg = $"BattleIntanceJoin init error, _roomId : {room_id}";
|
||||
Log.getLogger().error(err_msg);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user