This commit is contained in:
bumpsoo 2026-02-07 02:22:00 +00:00
parent a88b22b177
commit 263bb3e3af
10 changed files with 374 additions and 117 deletions

View file

@ -46,45 +46,3 @@ namespace GameConfig {
const uint32_t MAX_SWORD_LEVEL = 20;
const uint64_t INITIAL_GOLD = 10000;
} // namespace GameConfig
// 고정 크기 데이터 전송을 위한 구조체 정의
#pragma pack(push, 1)
struct PKT_CS_Login {
// 유저 닉네임 (최대 32자)
char nickname[32];
};
struct PKT_SC_LoginResult {
// 0: 이미 접속 중, 1: 성공
uint8_t result;
};
struct PKT_SC_UpgradeResult {
// 0: 파괴, 1: 성공, 2: 실패
uint8_t result;
// 현재 강화 레벨
uint32_t currentLevel;
// 현재 보유 골드
uint64_t currentGold;
};
struct PKT_SC_SellResult {
// 판매 후 획득 골드
uint64_t earnedGold;
// 현재 총 골드
uint64_t totalGold;
};
struct RankingEntry {
// 유저 이름 (최대 32자)
char username[32];
// 검 레벨
uint32_t swordLevel;
};
struct PKT_SC_RankingList {
// 랭킹 리스트 개수
uint32_t count;
// 이후 RankingEntry[count] 만큼 데이터가 따라옴
};
#pragma pack(pop)