feat : 채널 매니저(각 채널, 유저 관리) 구현 / 유저 정보 구현 / 패킷 이동 채널 접속 구현
This commit is contained in:
@@ -100,24 +100,6 @@ public class PlayerInfo
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public class ItemInfo
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 인증
|
||||
// ============================================================
|
||||
@@ -134,7 +116,7 @@ public class RecvTokenPacket
|
||||
}
|
||||
}
|
||||
|
||||
// LOAD_GAME
|
||||
// LOAD_GAME 내 정보
|
||||
[ProtoContract]
|
||||
public class LoadGamePacket
|
||||
{
|
||||
@@ -151,27 +133,96 @@ public class LoadGamePacket
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int MaplId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 로비
|
||||
// ============================================================
|
||||
|
||||
// INTO_LOBBY
|
||||
[ProtoContract]
|
||||
public class IntoLobbyPacket
|
||||
public class ChannelInfo
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int ChannelId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int ChannelUserConut
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int ChannelUserMax
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public class LoadChannelPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<ChannelInfo> Channels
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new List<ChannelInfo>();
|
||||
}
|
||||
|
||||
// INTO_CHANNEL 클라->서버: 입장할 채널 ID / 서버->클라: 채널 내 나 이외 플레이어 목록
|
||||
[ProtoContract]
|
||||
public class IntoChannelPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int ChannelId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // 클라->서버: 입장할 채널 ID
|
||||
|
||||
[ProtoMember(2)]
|
||||
public List<PlayerInfo> Players
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new List<PlayerInfo>(); // 서버->클라: 채널 내 플레이어 목록
|
||||
}
|
||||
|
||||
// UPDATE_CHANNEL_USER 유저 접속/나감
|
||||
[ProtoContract]
|
||||
public class UpdateChannelUserPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public PlayerInfo Players
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public bool IsAdd
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// EXIT_LOBBY
|
||||
// EXIT_CHANNEL 나가는 유저
|
||||
[ProtoContract]
|
||||
public class ExitLobbyPacket
|
||||
public class ExitChannelPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
@@ -181,174 +232,6 @@ public class ExitLobbyPacket
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 인스턴스 던전
|
||||
// ============================================================
|
||||
|
||||
public enum BossState
|
||||
{
|
||||
START,
|
||||
END,
|
||||
PHASE_CHANGE
|
||||
}
|
||||
|
||||
public enum BossResult
|
||||
{
|
||||
SUCCESS,
|
||||
FAIL
|
||||
}
|
||||
|
||||
// INTO_INSTANCE
|
||||
[ProtoContract]
|
||||
public class IntoInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int InstanceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int BossId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public List<int> PlayerIds
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE_BOSS
|
||||
[ProtoContract]
|
||||
public class UpdateBossPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public BossState State
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Phase
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public BossResult Result
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // END일 때만 유효
|
||||
}
|
||||
|
||||
// REWARD_INSTANCE
|
||||
[ProtoContract]
|
||||
public class RewardInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int Exp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public List<ItemInfo> Items
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// EXIT_INSTANCE
|
||||
[ProtoContract]
|
||||
public class ExitInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 파티
|
||||
// ============================================================
|
||||
|
||||
public enum PartyUpdateType
|
||||
{
|
||||
CREATE,
|
||||
DELETE
|
||||
}
|
||||
|
||||
public enum UserPartyUpdateType
|
||||
{
|
||||
JOIN,
|
||||
LEAVE
|
||||
}
|
||||
|
||||
// UPDATE_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdatePartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public PartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int LeaderId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE_USER_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdateUserPartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public UserPartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 플레이어
|
||||
// ============================================================
|
||||
@@ -604,3 +487,71 @@ public class DamagePacket
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 파티
|
||||
// ============================================================
|
||||
|
||||
public enum PartyUpdateType
|
||||
{
|
||||
CREATE,
|
||||
DELETE
|
||||
}
|
||||
|
||||
public enum UserPartyUpdateType
|
||||
{
|
||||
JOIN,
|
||||
LEAVE
|
||||
}
|
||||
|
||||
// UPDATE_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdatePartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public PartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int LeaderId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE_USER_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdateUserPartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public UserPartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user