Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
453
Server/ToolProject/SeverSetupDlg/SetupPage3.cpp
Normal file
453
Server/ToolProject/SeverSetupDlg/SetupPage3.cpp
Normal file
@@ -0,0 +1,453 @@
|
||||
// SetupPage3.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "SeverSetupDlg.h"
|
||||
#include "SetupPage3.h"
|
||||
#include "ServerGroup.h"
|
||||
|
||||
#include <Utility/Setup/ServerSetup.h>
|
||||
#include <Network/Packet/PacketStruct/ServerInfo.h>
|
||||
#include ".\setuppage3.h"
|
||||
|
||||
// CSetupPage3 <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
IMPLEMENT_DYNAMIC(CSetupPage3, CPropertyPage)
|
||||
|
||||
CSetupPage3::CSetupPage3()
|
||||
: CPropertyPage(CSetupPage3::IDD)
|
||||
, m_bPingCheck(FALSE)
|
||||
, m_bHackCheck(FALSE)
|
||||
, m_bLotteryEvent(FALSE)
|
||||
, m_bLevelUpEvent(FALSE)
|
||||
, m_bDeathPenaltyEvent(FALSE)
|
||||
, m_ExpRate(_T(""))
|
||||
, m_DropRate(_T(""))
|
||||
, m_EquipCorrRate(_T(""))
|
||||
, m_ServerID(_T(""))
|
||||
, m_ServerIDHex(_T(""))
|
||||
, m_bEnabled(FALSE)
|
||||
, m_DBAgentServerAddress(_T(""))
|
||||
, m_LogServerAddress(_T(""))
|
||||
, m_ChatServerAddress(_T(""))
|
||||
, m_BattleLimit(_T(""))
|
||||
, m_BattleLimitPer(_T("100"))
|
||||
, m_strZoneCount(_T("0"))
|
||||
, m_bBattleServer(FALSE)
|
||||
, m_Fame(_T(""))
|
||||
, m_Refine(_T(""))
|
||||
, m_Mileage(_T(""))
|
||||
, m_strTCPPort(_T(""))
|
||||
, m_strP1UDPListen(_T(""))
|
||||
{
|
||||
}
|
||||
|
||||
CSetupPage3::~CSetupPage3()
|
||||
{
|
||||
}
|
||||
|
||||
void CSetupPage3::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CPropertyPage::DoDataExchange(pDX);
|
||||
|
||||
DDX_Check(pDX, IDC_PINGCHECK, m_bPingCheck);
|
||||
DDX_Check(pDX, IDC_HACKCHECK, m_bHackCheck);
|
||||
DDX_Check(pDX, IDC_LOTTERY, m_bLotteryEvent);
|
||||
DDX_Check(pDX, IDC_LEVELUP, m_bLevelUpEvent);
|
||||
DDX_Check(pDX, IDC_DEATHPENALTY, m_bDeathPenaltyEvent);
|
||||
DDX_Text(pDX, IDC_AGENTADDR, m_DBAgentServerAddress);
|
||||
DDX_Text(pDX, IDC_EXP, m_ExpRate);
|
||||
DDX_Text(pDX, IDC_DROP, m_DropRate);
|
||||
DDX_Control(pDX, IDC_ZONE, m_Zone);
|
||||
DDX_Control(pDX, IDC_CHANNEL, m_Channel);
|
||||
DDX_Text(pDX, IDC_SERVERID, m_ServerID);
|
||||
DDX_Text(pDX, IDC_SERVERID_HEX, m_ServerIDHex);
|
||||
DDX_Control(pDX, IDC_GROUP, m_Group);
|
||||
DDX_Text(pDX, IDC_LOGSERVERADDR, m_LogServerAddress);
|
||||
DDX_Text(pDX, IDC_CHATSERVERADDR, m_ChatServerAddress);
|
||||
DDX_Text(pDX, IDC_BATTLELIMIT, m_BattleLimit);
|
||||
DDX_Text(pDX, IDC_BATTLELIMITPER, m_BattleLimitPer);
|
||||
DDX_Text(pDX, IDC_ZONE_TCPPORT, m_strTCPPort);
|
||||
DDX_Control(pDX, IDC_ZONE_SELECTION, m_ctrlZoneCountCb);
|
||||
DDX_Text(pDX, IDC_ZONE_COUNT, m_strZoneCount);
|
||||
DDX_Control(pDX, IDC_SAVE_ZONE_SETING, m_ctrlSaveZoneSetting);
|
||||
DDX_Check(pDX, IDC_GAMEBATTLESERVER, m_bBattleServer);
|
||||
DDX_Control(pDX, IDC_NATION_SELECTION, m_Nation);
|
||||
DDX_Text(pDX, IDC_FAME, m_Fame);
|
||||
DDX_Text(pDX, IDC_REFINE, m_Refine);
|
||||
DDX_Text(pDX, IDC_MILEAGE, m_Mileage);
|
||||
DDX_Text(pDX, IDC_ZONE_UDPPORT, m_strP1UDPListen);
|
||||
DDX_Text(pDX, IDC_EQUIPCORR, m_EquipCorrRate);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSetupPage3, CPropertyPage)
|
||||
ON_CBN_SELCHANGE(IDC_GROUP, OnCbnSelchangeGroup)
|
||||
ON_CBN_SELCHANGE(IDC_ZONE, OnCbnSelchangeZone)
|
||||
ON_CBN_SELCHANGE(IDC_CHANNEL, OnCbnSelchangeChannel)
|
||||
ON_BN_CLICKED(IDC_ZONE_ADD, OnBnClickedZoneAdd)
|
||||
ON_BN_CLICKED(IDC_ZONE_DEL, OnBnClickedZoneDel)
|
||||
ON_CBN_SELCHANGE(IDC_ZONE_SELECTION, OnCbnSelchangeZoneSelection)
|
||||
ON_BN_CLICKED(IDC_SAVE_ZONE_SETING, OnBnClickedSaveZoneSetting)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CSetupPage3 <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
BOOL CSetupPage3::OnInitDialog()
|
||||
{
|
||||
CPropertyPage::OnInitDialog();
|
||||
|
||||
const int MAX_BUFFER = 260;
|
||||
|
||||
char ZoneCount[MAX_BUFFER] = "";
|
||||
char strInputedZoneSetupNum[MAX_BUFFER] = "";
|
||||
char strGameServerNation[MAX_BUFFER] = "";
|
||||
char strBattleServer[MAX_BUFFER] = "";
|
||||
|
||||
ReadStringFromReg(g_szSetupFileName, "Zone_ETC", "ZoneCount", ZoneCount, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, "Zone_ETC", "InputedZoneSetupNum", strInputedZoneSetupNum, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, "Zone_ETC", "GameServerNation", strGameServerNation, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, "Zone_ETC", "BattleServerGroup", strBattleServer, MAX_BUFFER);
|
||||
|
||||
m_strZoneCount = ZoneCount;
|
||||
m_bBattleServer = (0 != atoi(strBattleServer));
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
SetGameServerNation(m_Nation);
|
||||
SetServerGroup(m_Group);
|
||||
SetServerZone(m_Zone);
|
||||
SetServerChannel(m_Channel);
|
||||
SetZoneCountCombo(m_ctrlZoneCountCb);
|
||||
|
||||
m_Nation.SetCurSel(atoi(strGameServerNation));
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִٸ<D6B4> ù<><C3B9>° <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
if (0 == atoi(ZoneCount))
|
||||
{
|
||||
m_ctrlZoneCountCb.EnableWindow(false);
|
||||
m_ctrlSaveZoneSetting.EnableWindow(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ctrlZoneCountCb.SetCurSel(0);
|
||||
SetGameServerPage(1);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CSetupPage3::SetGameServerPage(unsigned int nZoneCount)
|
||||
{
|
||||
const int MAX_BUFFER = 260;
|
||||
|
||||
char szSection[MAX_BUFFER], szSetCount[MAX_BUFFER] = "";
|
||||
|
||||
for(int nZone = 1; nZone < m_Zone.GetCount(); ++nZone)
|
||||
{
|
||||
for(int nCh = 0; nCh < m_Channel.GetCount(); ++nCh)
|
||||
{
|
||||
_snprintf(szSection, MAX_PATH, "Zone_%02d%02d", nZone, nCh);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "SetCount", szSetCount, MAX_BUFFER);
|
||||
|
||||
if ((nZoneCount != 0) && (nZoneCount == atoi(szSetCount)))
|
||||
{
|
||||
SetZoneSetupInfo(szSection);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
SetZoneSetupInfo("?????");
|
||||
}
|
||||
|
||||
void CSetupPage3::SetZoneSetupInfo(char* szSection)
|
||||
{
|
||||
// <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>б<EFBFBD>
|
||||
|
||||
const int MAX_BUFFER = 260;
|
||||
|
||||
char szServerID[MAX_BUFFER] = "";
|
||||
char szPingCheck[MAX_BUFFER] = "";
|
||||
char szSpeedHackCheck[MAX_BUFFER] = "";
|
||||
char szLotteryEvent[MAX_BUFFER] = "";
|
||||
char szLevelUpEvent[MAX_BUFFER] = "";
|
||||
char szDeathPenaltyEvent[MAX_BUFFER] = "";
|
||||
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "ServerID", szServerID, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "PingCheck", szPingCheck, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "SpeedHackCheck", szSpeedHackCheck, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "LotteryEvent", szLotteryEvent, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "LevelUpEvent", szLevelUpEvent, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "DeathPenaltyEvent", szDeathPenaltyEvent, MAX_BUFFER);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "DBAgentServerAddr", m_DBAgentServerAddress);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "LogServerAddr", m_LogServerAddress);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "ChatServerAddr", m_ChatServerAddress);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "ExpRate", m_ExpRate);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "DropRate", m_DropRate);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "EquipCorrRate", m_EquipCorrRate);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "Fame", m_Fame);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "Refine", m_Refine);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "Mileage", m_Mileage);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "BattleUserLimit", m_BattleLimit);
|
||||
ReadStringFromReg(g_szSetupFileName, szSection, "BattleUserLimitPer", m_BattleLimitPer);
|
||||
|
||||
// <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
m_ServerID = szServerID;
|
||||
m_bPingCheck = atoi(szPingCheck);
|
||||
m_bHackCheck = atoi(szSpeedHackCheck);
|
||||
m_bLotteryEvent = atoi(szLotteryEvent);
|
||||
m_bLevelUpEvent = atoi(szLevelUpEvent);
|
||||
m_bDeathPenaltyEvent= atoi(szDeathPenaltyEvent);
|
||||
|
||||
SERVER_ID serverID = {0,};
|
||||
serverID.dwID = atoi(szServerID);
|
||||
serverID.sID.Type = CServerSetup::GameServer;
|
||||
|
||||
m_ServerID.Format("%d", serverID.dwID);
|
||||
m_ServerIDHex.Format("0x%08X", serverID.dwID);
|
||||
|
||||
m_Group.SetCurSel(serverID.GetGroup());
|
||||
m_Zone.SetCurSel(serverID.GetZone());
|
||||
m_Channel.SetCurSel(serverID.GetChannel());
|
||||
|
||||
m_strTCPPort.Format("%d", GetZoneTCPPort(serverID.dwID));
|
||||
m_strP1UDPListen.Format("%d", CServerSetup::GetP1GameServerUDPPort(serverID.dwID));
|
||||
|
||||
switch(m_Zone.GetCurSel())
|
||||
{
|
||||
case SERVER_ID::ZONE1:
|
||||
case SERVER_ID::ZONE2:
|
||||
case SERVER_ID::ZONE4:
|
||||
case SERVER_ID::ZONE5:
|
||||
case SERVER_ID::ZONE12:
|
||||
case SERVER_ID::BATTLE_SERVER:
|
||||
m_Channel.SetCurSel(0);
|
||||
m_Channel.EnableWindow(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_Channel.SetCurSel(0);
|
||||
m_Channel.EnableWindow(false);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateData(false);
|
||||
}
|
||||
|
||||
// nSaveType : true - <20><> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// false - <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
void CSetupPage3::Save(bool bSaveType)
|
||||
{
|
||||
if (!m_bEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateData(true);
|
||||
|
||||
// <20><> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD> (<28><><EFBFBD><EFBFBD>: Zone_ETC) --------------------------------------------------------------
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
char szGameServerNation[MAX_PATH] = "";
|
||||
_snprintf(szGameServerNation, MAX_PATH, "%d", m_Nation.GetCurSel());
|
||||
WriteStringToReg(g_szSetupFileName, "Zone_ETC", "GameServerNation", szGameServerNation);
|
||||
// <20><>Ʋ <20><><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
WriteStringToReg(g_szSetupFileName, "Zone_ETC", "BattleServerGroup", BOOLToString(m_bBattleServer));
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
WriteStringToReg(g_szSetupFileName, "Zone_ETC", "ZoneCount", m_strZoneCount );
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD> (<28><><EFBFBD><EFBFBD>: Zone_%02d%02d) ------------------------------------------------------------
|
||||
if (!bSaveType)
|
||||
{
|
||||
if ((m_Zone.GetCurSel() == -1)
|
||||
|| (m_Channel.GetCurSel() == -1)
|
||||
|| (m_ctrlZoneCountCb.GetCurSel() == -1))
|
||||
{
|
||||
MessageBox("Invalid Selection;");
|
||||
return;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SetCount<6E><74> <20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>Ѵٸ<D1B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 'not use' <20><> <20><><EFBFBD><EFBFBD>
|
||||
const int MAX_BUFFER = 260;
|
||||
|
||||
char szTemp[MAX_BUFFER], szSetCount[MAX_BUFFER] = "";
|
||||
for(int nZone = 1; nZone < m_Zone.GetCount(); ++nZone)
|
||||
{
|
||||
for(int nCh = 0; nCh < m_Channel.GetCount(); ++nCh)
|
||||
{
|
||||
_snprintf(szTemp, MAX_PATH, "Zone_%02d%02d", nZone, nCh);
|
||||
ReadStringFromReg(g_szSetupFileName, szTemp, "SetCount", szSetCount, MAX_BUFFER);
|
||||
if (atoi(szSetCount) == (m_ctrlZoneCountCb.GetCurSel() + 1))
|
||||
{
|
||||
WriteStringToReg(g_szSetupFileName, szTemp, "SetCount", "not use");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char szSection[MAX_PATH] = "";
|
||||
_snprintf(szSection, MAX_PATH, "Zone_%02d%02d", m_Zone.GetCurSel(), m_Channel.GetCurSel());
|
||||
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "ServerID", m_ServerID);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "PingCheck", BOOLToString(m_bPingCheck));
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "SpeedHackCheck", BOOLToString(m_bHackCheck));
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "LotteryEvent", BOOLToString(m_bLotteryEvent));
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "LevelUpEvent", BOOLToString(m_bLevelUpEvent));
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "DeathPenaltyEvent", BOOLToString(m_bDeathPenaltyEvent));
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "DBAgentServerAddr", m_DBAgentServerAddress);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "LogServerAddr", m_LogServerAddress);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "ChatServerAddr", m_ChatServerAddress);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "ExpRate", m_ExpRate);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "DropRate", m_DropRate);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "EquipCorrRate", m_EquipCorrRate);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "Fame", m_Fame);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "Refine", m_Refine);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "Mileage", m_Mileage);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "BattleUserLimit", m_BattleLimit);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "BattleUserLimitPer", m_BattleLimitPer);
|
||||
|
||||
// SetCount: <20><><EFBFBD><EFBFBD>°<EFBFBD><C2B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
_snprintf(szSetCount, MAX_PATH, "%d", m_ctrlZoneCountCb.GetCurSel() + 1);
|
||||
WriteStringToReg(g_szSetupFileName, szSection, "SetCount", szSetCount);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CSetupPage3::OnSetActive()
|
||||
{
|
||||
UpdateData(FALSE);
|
||||
m_bEnabled = TRUE;
|
||||
return CPropertyPage::OnSetActive();
|
||||
}
|
||||
|
||||
void CSetupPage3::OnCbnSelchangeGroup()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
SERVER_ID serverID = {0,};
|
||||
|
||||
serverID.sID.Type = CServerSetup::GameServer;
|
||||
serverID.sID.Group = m_Group.GetCurSel();
|
||||
serverID.sID.ID = m_Zone.GetCurSel();
|
||||
serverID.sID.Channel = m_Channel.GetCurSel();
|
||||
|
||||
m_ServerID.Format("%d", serverID.dwID);
|
||||
m_ServerIDHex.Format("0x%08X", serverID.dwID);
|
||||
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
void CSetupPage3::OnCbnSelchangeZone()
|
||||
{
|
||||
SERVER_ID serverID = {0,};
|
||||
|
||||
serverID.sID.Type = CServerSetup::GameServer;
|
||||
serverID.sID.Group = m_Group.GetCurSel();
|
||||
serverID.sID.ID = m_Zone.GetCurSel();
|
||||
serverID.sID.Channel = m_Channel.GetCurSel();
|
||||
|
||||
m_ServerID.Format("%d", serverID.dwID);
|
||||
m_ServerIDHex.Format("0x%08X", serverID.dwID);
|
||||
|
||||
m_strTCPPort.Format("%d", GetZoneTCPPort(serverID.dwID));
|
||||
m_strP1UDPListen.Format("%d", CServerSetup::GetP1GameServerUDPPort(serverID.dwID));
|
||||
|
||||
switch(m_Zone.GetCurSel())
|
||||
{
|
||||
case SERVER_ID::ZONE1:
|
||||
case SERVER_ID::ZONE2:
|
||||
case SERVER_ID::ZONE4:
|
||||
case SERVER_ID::ZONE5:
|
||||
case SERVER_ID::ZONE12:
|
||||
case SERVER_ID::BATTLE_SERVER:
|
||||
m_Channel.SetCurSel(0);
|
||||
m_Channel.EnableWindow(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_Channel.SetCurSel(0);
|
||||
m_Channel.EnableWindow(false);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateData(false);
|
||||
}
|
||||
|
||||
void CSetupPage3::OnCbnSelchangeChannel()
|
||||
{
|
||||
UpdateData(true);
|
||||
|
||||
SERVER_ID serverID = {0,};
|
||||
|
||||
serverID.sID.Type = CServerSetup::GameServer;
|
||||
serverID.sID.Group = m_Group.GetCurSel();
|
||||
serverID.sID.ID = m_Zone.GetCurSel();
|
||||
serverID.sID.Channel = m_Channel.GetCurSel();
|
||||
|
||||
m_ServerID.Format ("%d", serverID.dwID);
|
||||
m_ServerIDHex.Format("0x%08X", serverID.dwID);
|
||||
|
||||
m_strTCPPort.Format( "%d", GetZoneTCPPort(serverID.dwID));
|
||||
m_strP1UDPListen.Format("%d", CServerSetup::GetP1GameServerUDPPort(serverID.dwID));
|
||||
|
||||
UpdateData(false);
|
||||
}
|
||||
|
||||
void CSetupPage3::OnBnClickedZoneAdd()
|
||||
{
|
||||
if (atoi(m_strZoneCount) == 0) // <09><> ī<><C4AB>Ʈ<EFBFBD><C6AE> 1<>̵Ǵ<CCB5> <20><><EFBFBD><EFBFBD> Ȱ<><C8B0>ȭ <20><> <20><EFBFBD>
|
||||
{
|
||||
m_ctrlZoneCountCb.EnableWindow(true);
|
||||
m_ctrlSaveZoneSetting.EnableWindow(true);
|
||||
}
|
||||
|
||||
// <09><> ī<><C4AB>Ʈ 1 <20><><EFBFBD><EFBFBD>
|
||||
int nCount = atoi(m_strZoneCount);
|
||||
nCount++;
|
||||
m_strZoneCount.Format("%d", nCount);
|
||||
|
||||
UpdateData(false);
|
||||
|
||||
SetZoneCountCombo(m_ctrlZoneCountCb);
|
||||
}
|
||||
|
||||
void CSetupPage3::OnBnClickedZoneDel()
|
||||
{
|
||||
if (atoi(m_strZoneCount) == 1) // <09><> ī<><C4AB>Ʈ<EFBFBD><C6AE> 0<>̵Ǵ<CCB5> <20><><EFBFBD><EFBFBD> <20><>Ȱ<EFBFBD><C8B0>ȭ <20><>ų <20><EFBFBD>
|
||||
{
|
||||
m_ctrlZoneCountCb.EnableWindow(false);
|
||||
m_ctrlSaveZoneSetting.EnableWindow(false);
|
||||
}
|
||||
|
||||
// <09><> ī<><C4AB>Ʈ 1 <20><><EFBFBD><EFBFBD>
|
||||
int nCount = atoi(m_strZoneCount);
|
||||
|
||||
if (nCount > 0) nCount--;
|
||||
|
||||
m_strZoneCount.Format("%d", nCount);
|
||||
|
||||
UpdateData(false);
|
||||
|
||||
SetZoneCountCombo(m_ctrlZoneCountCb);
|
||||
}
|
||||
|
||||
void CSetupPage3::SetZoneCountCombo(CComboBox& ZoneCountCb)
|
||||
{
|
||||
CString strComboString;
|
||||
int nDeleteCount = ZoneCountCb.GetCount();
|
||||
int nMaxZoneConut = atoi(m_strZoneCount);
|
||||
|
||||
ZoneCountCb.ResetContent();
|
||||
for(int count = 1; count <= nMaxZoneConut; count++) // <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
{
|
||||
strComboString.Format("zone count %d", count);
|
||||
ZoneCountCb.InsertString(count - 1 , strComboString);
|
||||
}
|
||||
}
|
||||
|
||||
void CSetupPage3::OnCbnSelchangeZoneSelection()
|
||||
{
|
||||
SetGameServerPage(m_ctrlZoneCountCb.GetCurSel() + 1);
|
||||
}
|
||||
|
||||
void CSetupPage3::OnBnClickedSaveZoneSetting()
|
||||
{
|
||||
Save(false);
|
||||
}
|
||||
Reference in New Issue
Block a user