Fix: 플레이어 프로필 DB 연동, 파티 초대/추방 프로토콜 구현
- 채널 입장 시 API 서버에서 플레이어 프로필 로드 (레벨/스탯/위치) - 채널 퇴장 시 위치/플레이타임 DB 저장 (SaveGameDataAsync) - Player.cs에 AttackPower/AttackRange/SprintMultiplier/Experience 필드 추가 - ToPlayerInfo에서 전투 스탯 매핑 추가 - Session에 ChannelJoinedAt 추가 (플레이타임 계산용) - PartyUpdateType에 INVITE/KICK 추가 - RequestPartyPacket에 TargetPlayerId 필드 추가 - GameServer에 INVITE/KICK 핸들러 구현 - Channel에 GetPeer() 메서드 추가 - RestApi에 GetPlayerProfileAsync/SaveGameDataAsync 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,13 @@ public class Channel
|
||||
return player;
|
||||
}
|
||||
|
||||
// 특정 유저의 NetPeer 반환
|
||||
public NetPeer? GetPeer(int userId)
|
||||
{
|
||||
connectPeers.TryGetValue(userId, out NetPeer? peer);
|
||||
return peer;
|
||||
}
|
||||
|
||||
public int HasUser(int userId)
|
||||
{
|
||||
if (connectUsers.ContainsKey(userId))
|
||||
|
||||
Reference in New Issue
Block a user