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:
2025-11-29 20:17:20 +09:00
parent 5d3cd64a25
commit dd97ddec92
11602 changed files with 1446576 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
#include "stdafx.h"
#include <Creature/CreatureManager.h>
#include "RylGameServer.h"
#include "Commands.h"
CConsoleCommand* CCMDAutoBalance::Clone(const char* szCommand, size_t nCommandLength)
{
const int MAX_BUFFER = 256;
char szBuffer[MAX_BUFFER + 1];
const char* szDelimiter = " \t\r\n";
_snprintf(szBuffer, MAX_BUFFER, "%s", szCommand);
szBuffer[MAX_BUFFER] = '\0';
char* token = strtok(szBuffer, szDelimiter);
CCMDAutoBalance* lpCMD = new CCMDAutoBalance;
if (NULL != lpCMD)
{
token = strtok(NULL, szDelimiter);
if (NULL == token)
{
lpCMD->m_cCmd = NOW_STATE;
}
else if (0 == strcmp("on", token))
{
lpCMD->m_cCmd = AUTO_BALANCE_ON;
}
else if (0 == strcmp("off", token))
{
lpCMD->m_cCmd = AUTO_BALANCE_OFF;
}
else
{
lpCMD->m_cCmd = ERROR_CMD;
}
}
return lpCMD;
}
bool CCMDAutoBalance::DoProcess()
{
const TCHAR* szMessage = 0;
switch (m_cCmd)
{
case NOW_STATE:
if (CCreatureManager::GetInstance().GetAutoBalance())
{
szMessage = _T("AutoBalance is now On");
}
else
{
szMessage = _T("AutoBalance is now Off");
}
break;
case AUTO_BALANCE_ON:
CCreatureManager::GetInstance().SetAutoBalance(true);
szMessage = _T("Turn On AutoBalance");
break;
case AUTO_BALANCE_OFF:
CCreatureManager::GetInstance().SetAutoBalance(false);
szMessage = _T("Turn Off AutoBalance");
break;
case ERROR_CMD:
default:
szMessage = _T("Invalid autobalance command");
break;
}
if(0 != szMessage)
{
CRylGameServer::GetInstance().PrintOutput(szMessage);
}
return true;
}

View File

@@ -0,0 +1,105 @@
#ifndef _RYL_GAME_CCOMMANDS_H_
#define _RYL_GAME_CCOMMANDS_H_
#include <RylServerLibrary/Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
// 아이템을 떨어뜨린다.
class CCMDDropItem : public CConsoleCommand
{
protected:
enum { MAX_NAME = 16 };
virtual CConsoleCommand* Clone(const char* szCommand, size_t nCommandLength);
virtual bool Destroy() { delete this; return true; }
virtual bool DoProcess();
char m_szName[MAX_NAME + 1];
unsigned short m_usItemProtoTypeID;
};
// 아이템리스트를 떨어뜨린다.
class CCMDDropItemList : public CConsoleCommand
{
protected:
enum { MAX_NAME = 16 };
enum { MAX_DROP_NUM = 64 };
virtual CConsoleCommand* Clone(const char* szCommand, size_t nCommandLength);
virtual bool Destroy() { delete this; return true; }
virtual bool DoProcess();
unsigned short m_nItemNum;
char m_szName[MAX_NAME + 1];
unsigned short m_usItemProtoTypeID[MAX_DROP_NUM];
};
// 접속 유저들에게 공지를 날릴 때 사용
class CCMDNotify : public CConsoleCommand
{
public:
CCMDNotify() : m_nLength(0) { m_szBuffer[0] = 0; }
virtual CConsoleCommand* Clone(const char* szCommand, size_t nCommandLength);
protected:
virtual bool DoProcess();
virtual bool Destroy() { delete this; return true; }
enum { MAX_NOTIFY = 2000 };
private:
char m_szBuffer[MAX_NOTIFY];
int m_nLength;
};
// 오토밸런스 on/off
class CCMDAutoBalance : public CConsoleCommand
{
protected:
virtual CConsoleCommand* Clone(const char* szCommand, size_t nCommandLength);
virtual bool Destroy() { delete this; return true; }
virtual bool DoProcess();
private:
enum AutoBalanceCmd
{
ERROR_CMD = 0,
NOW_STATE = 1,
AUTO_BALANCE_ON = 2,
AUTO_BALANCE_OFF = 3
};
unsigned char m_cCmd;
};
// 복권 이벤트 on/off
class CCMDLotteryEvent : public CConsoleCommand
{
protected:
virtual CConsoleCommand* Clone(const char* szCommand, size_t nCommandLength);
virtual bool Destroy() { delete this; return true; }
virtual bool DoProcess();
private:
enum LotteryEventCmd
{
ERROR_CMD = 0,
NOW_STATE = 1,
LOTTERY_EVENT_ON = 2,
LOTTERY_EVENT_OFF = 3
};
unsigned char m_cCmd;
};
#endif

View File

@@ -0,0 +1,63 @@
#include "stdafx.h"
#include "Commands.h"
#include <Creature/CreatureManager.h>
#include <Creature/Character/Character.h>
#include <Map/FieldMap/Cell.h>
#include <Item/ItemFactory.h>
CConsoleCommand* CCMDDropItem::Clone(const char* szCommand, size_t nCommandLength)
{
const int MAX_BUFFER = 256;
char szBuffer[MAX_BUFFER + 1];
const char* szDelimiter = " \t\r\n";
_snprintf(szBuffer, MAX_BUFFER, "%s", szCommand);
szBuffer[MAX_BUFFER] = '\0';
char* token = strtok(szBuffer, szDelimiter);
CCMDDropItem* lpCMD = new CCMDDropItem;
if (NULL != lpCMD)
{
token = strtok(NULL, szDelimiter);
_snprintf(lpCMD->m_szName, MAX_NAME, "%s", token);
lpCMD->m_szName[MAX_NAME] = '\0';
token = strtok(NULL, szDelimiter);
lpCMD->m_usItemProtoTypeID = (NULL == token) ? 0 : atoi(token);
}
return lpCMD;
}
bool CCMDDropItem::DoProcess()
{
CCharacter* lpCharacter = CCreatureManager::GetInstance().GetCharacter(m_szName);
if (NULL != lpCharacter)
{
Item::CItem* lpItem = Item::CItemFactory::GetInstance().CreateItem(m_usItemProtoTypeID);
if (NULL != lpItem)
{
if (false == lpCharacter->GiveItem(lpItem))
{
DELETE_ITEM(lpItem);
}
// GievItem À¸·Î ½ºÅÃµÈ °æ¿ì
if (NULL != lpItem)
{
if (lpItem->IsSet(Item::DetailData::STACKABLE) && 0 == lpItem->GetNumOrDurability())
{
DELETE_ITEM(lpItem);
}
}
}
}
return true;
}

View File

@@ -0,0 +1,87 @@
#include "stdafx.h"
#include "Commands.h"
#include <Creature/CreatureManager.h>
#include <Creature/Character/Character.h>
#include <Map/FieldMap/Cell.h>
#include <Item/ItemFactory.h>
CConsoleCommand* CCMDDropItemList::Clone(const char* szCommand, size_t nCommandLength)
{
const int MAX_BUFFER = 256;
char szBuffer[MAX_BUFFER + 1];
char szFileBuffer[MAX_BUFFER + 1];
const char* szDelimiter = " \t\r\n";
_snprintf(szBuffer, MAX_BUFFER, "%s", szCommand);
szBuffer[MAX_BUFFER] = '\0';
char* token = strtok(szBuffer, szDelimiter);
char FileName[MAX_NAME + 1] = "";
CCMDDropItemList* lpCMD = new CCMDDropItemList;
if (NULL != lpCMD)
{
token = strtok(NULL, szDelimiter);
_snprintf(lpCMD->m_szName, MAX_NAME, "%s", token);
lpCMD->m_szName[MAX_NAME] = '\0';
token = strtok(NULL, szDelimiter);
_snprintf(FileName, MAX_NAME, "%s", token);
FileName[MAX_NAME] = '\0';
lpCMD->m_nItemNum = 0;
FILE *pFile = fopen(FileName, "rt");
if (pFile != NULL)
{
while (true)
{
if (NULL == fgets(szFileBuffer, MAX_BUFFER, pFile) || lpCMD->m_nItemNum >= MAX_DROP_NUM)
{
break;
}
lpCMD->m_usItemProtoTypeID[lpCMD->m_nItemNum++] = atoi(szFileBuffer);
}
fclose(pFile);
}
}
return lpCMD;
}
bool CCMDDropItemList::DoProcess()
{
CCharacter* lpCharacter = CCreatureManager::GetInstance().GetCharacter(m_szName);
if (NULL != lpCharacter)
{
for (unsigned short nCount = 0; nCount < m_nItemNum; ++nCount)
{
Item::CItem* lpItem = Item::CItemFactory::GetInstance().CreateItem(m_usItemProtoTypeID[nCount]);
if (NULL != lpItem)
{
if (false == lpCharacter->GiveItem(lpItem))
{
DELETE_ITEM(lpItem);
break;
}
// GievItem À¸·Î ½ºÅÃµÈ °æ¿ì
if (NULL != lpItem)
{
if (lpItem->IsSet(Item::DetailData::STACKABLE) && 0 == lpItem->GetNumOrDurability())
{
DELETE_ITEM(lpItem);
}
}
}
}
}
return true;
}

View File

@@ -0,0 +1,398 @@
#include "stdafx.h"
#include "DummyCharacters.h"
#include <Map/FieldMap/CellManager.h>
#include <Map/FieldMap/Cell.h>
#include <Creature/Character/Character.h>
#include <Creature/Character/CharacterClass.h>
#include <Item/Item.h>
#include <Item/ItemFactory.h>
struct DummyData
{
unsigned long m_dwDressChangeFreq;
unsigned long m_dwAttackFreq;
unsigned long m_dwSkillFreq;
DummyData() : m_dwDressChangeFreq(0), m_dwAttackFreq(0), m_dwSkillFreq(0) { }
};
class CModifyDummyCharacter : public CCharacter
{
public:
CModifyDummyCharacter(unsigned long dwCID) : CCharacter(dwCID, 0) { }
virtual ~CModifyDummyCharacter() { };
void ModifyCharacterData(CharacterDBData& DBData, DummyData& dummyData)
{
m_bLogout = false;
m_DBData = DBData;
m_DummyData = dummyData;
}
void ModifyEquipmentData(CDummyCharacterList::EquipmentData& EquipmentData);
void SetLogout() { m_bLogout = true; }
private:
DummyData m_DummyData;
};
void CModifyDummyCharacter::ModifyEquipmentData(CDummyCharacterList::EquipmentData& equipmentData)
{
Item::CEquipmentsContainer& Equipments = GetEquipments();
Equipments.ClearItems();
for(int nCount = 0; nCount < Item::EquipmentPos::MAX_EQUPMENT_POS; ++nCount)
{
if(0 != equipmentData.m_usEquipments[nCount])
{
// UID없는 임시 아이템을 생성한다.
Item::CItem* lpItem = Item::CItemFactory::GetInstance().CreateTempItem(
equipmentData.m_usEquipments[nCount]);
if(0 != lpItem)
{
// 아이템을 스탯에 관계없이 강제로 삽입한다.
Equipments.CListContainer::SetItem(
Item::ItemPos(TakeType::TS_EQUIP, nCount), lpItem);
}
}
};
}
CDummyCharacterList& CDummyCharacterList::GetInstance()
{
static CDummyCharacterList dummyCharacterList;
return dummyCharacterList;
}
CDummyCharacterList::CDummyCharacterList()
{
}
CDummyCharacterList::~CDummyCharacterList()
{
Destroy();
}
bool CDummyCharacterList::Initialize(unsigned long dwLoadCharNum)
{
EquipmentVector emptyVector;
std::pair<EquipmentClassSet::iterator, bool> insertResult;
#define INSERT_CLASS_SET(fileName, Class) \
insertResult = m_EquipmentClassSet.insert(std::make_pair(Class, emptyVector)); \
if(insertResult.second) \
{ if(!LoadEquipments(fileName, insertResult.first->second)) { return false; } }
INSERT_CLASS_SET("./Dummies/CON디펜더.txt", CClass::Defender);
INSERT_CLASS_SET("./Dummies/스탠다드워리어.txt", CClass::Warrior);
INSERT_CLASS_SET("./Dummies/스탠다드어쌔신.txt", CClass::Assassin);
INSERT_CLASS_SET("./Dummies/스탠다드아처.txt", CClass::Archer);
INSERT_CLASS_SET("./Dummies/스탠다드소서러.txt", CClass::Sorcerer);
INSERT_CLASS_SET("./Dummies/스탠다드인챈터.txt", CClass::Enchanter);
INSERT_CLASS_SET("./Dummies/스탠다드프리스트.txt", CClass::Priest);
INSERT_CLASS_SET("./Dummies/스탠다드클레릭.txt", CClass::Cleric);
INSERT_CLASS_SET("./Dummies/스탠다드템플러.txt", CClass::Templar);
INSERT_CLASS_SET("./Dummies/스탠다드어태커.txt", CClass::Attacker);
INSERT_CLASS_SET("./Dummies/스탠다드거너.txt", CClass::Gunner);
INSERT_CLASS_SET("./Dummies/스탠다드룬오프.txt", CClass::RuneOff);
INSERT_CLASS_SET("./Dummies/스탠다드라이프오프.txt", CClass::LifeOff);
INSERT_CLASS_SET("./Dummies/스탠다드쉐도우오프.txt", CClass::ShadowOff);
// 더미 캐릭터들을 로드해서 세팅한다.
return LoadDummyChars("./Dummies/캐릭터데이터.txt",
m_EquipmentClassSet, m_DummyCharacterList, dwLoadCharNum);
}
bool CDummyCharacterList::Destroy()
{
DummyCharList::iterator pos = m_DummyCharacterList.begin();
DummyCharList::iterator end = m_DummyCharacterList.end();
for(;pos != end; ++pos)
{
CModifyDummyCharacter* lpDummyChar = *pos;
CCell* lpCell = lpDummyChar->GetCellPos().m_lpCell;
if(0 != lpCell)
{
lpCell->DeleteCreature(lpDummyChar->GetCID());
}
lpDummyChar->SetLogout();
delete lpDummyChar;
}
m_DummyCharacterList.clear();
m_EquipmentClassSet.clear();
return true;
}
bool CDummyCharacterList::LoadEquipments(const char* szFileName, EquipmentVector& equipmentVector)
{
FILE* lpFile = fopen(szFileName, "rt");
if(0 != lpFile)
{
const int MAX_BUFFER = 1024;
char szBuffer[MAX_BUFFER];
const char* szDelimiter = " \t\r\n";
char* szToken = 0;
EquipmentData equipmentData;
EquipmentData oldEquipmentData;
while(fgets(szBuffer, MAX_BUFFER, lpFile))
{
memset(equipmentData.m_usEquipments, 0, sizeof(unsigned short)
* Item::EquipmentPos::MAX_EQUPMENT_POS);
szToken = strtok(szBuffer, szDelimiter);
if(0 != szToken)
{ // 무기
equipmentData.m_usEquipments[Item::EquipmentPos::WEAPON_HAND1] =
static_cast<unsigned short>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{ // 방패
equipmentData.m_usEquipments[Item::EquipmentPos::SHIELD_HAND1] =
static_cast<unsigned short>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{ // 투구
equipmentData.m_usEquipments[Item::EquipmentPos::HELM] =
static_cast<unsigned short>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{ // 갑옷
equipmentData.m_usEquipments[Item::EquipmentPos::ARMOUR] =
static_cast<unsigned short>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{ // 장갑
equipmentData.m_usEquipments[Item::EquipmentPos::GLOVE] =
static_cast<unsigned short>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{ // 신발
equipmentData.m_usEquipments[Item::EquipmentPos::BOOTS] =
static_cast<unsigned short>(atoi(szToken));
}
if(0 != memcmp(oldEquipmentData.m_usEquipments, equipmentData.m_usEquipments,
sizeof(unsigned short) * Item::EquipmentPos::MAX_EQUPMENT_POS))
{
// 이전 장비 데이터와 겹치지 않으면 추가.
equipmentVector.push_back(equipmentData);
}
oldEquipmentData = equipmentData;
}
fclose(lpFile);
return true;
}
return false;
}
bool CDummyCharacterList::LoadDummyChars(const char* szFileName,
EquipmentClassSet& equipmentSet,
DummyCharList& dummyCharList,
unsigned long dwLoadCharNum)
{
FILE* lpFile = fopen(szFileName, "rt");
if(lpFile)
{
const int MAX_BUFFER = 8192;
char szBuffer[MAX_BUFFER];
const char* szDelimiter = " \t\r\n";
char* szToken = 0;
CharacterDBData charDBData;
DummyData dummyData;
unsigned long dwCharCount = 0;
while(fgets(szBuffer, MAX_BUFFER - 1, lpFile) && dwCharCount < dwLoadCharNum)
{
memset(&charDBData, 0, sizeof(charDBData));
memset(&dummyData, 0, sizeof(dummyData));
szBuffer[MAX_BUFFER - 1] = 0;
szToken = strtok(szBuffer, szDelimiter);
if(0 != szToken)
{
// CID
charDBData.m_Info.CID = atol(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 이름
strncpy(charDBData.m_Info.Name, szToken, CHAR_INFOST::MAX_NAME_LEN);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 레벨
charDBData.m_Info.Level = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 클래스, 종족
charDBData.m_Info.Class = atoi(szToken);
charDBData.m_Info.Race = CClass::GetRace(static_cast<unsigned char>(charDBData.m_Info.Class));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 머리칼
charDBData.m_Info.Hair = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 얼굴
charDBData.m_Info.Face = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 성별
charDBData.m_Info.Sex = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// X좌표
charDBData.m_Pos.LastPoint.fPointX = static_cast<float>(atoi(szToken));
// charDBData.m_Pos.SavePoint.fPointX = static_cast<float>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// Y좌표
charDBData.m_Pos.LastPoint.fPointY = static_cast<float>(atoi(szToken));
// charDBData.m_Pos.SavePoint.fPointY = static_cast<float>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// Z좌표
charDBData.m_Pos.LastPoint.fPointZ = static_cast<float>(atoi(szToken));
// charDBData.m_Pos.SavePoint.fPointZ = static_cast<float>(atoi(szToken));
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 옷갈아입기 빈도 (n초당 한번 정도 랜덤으로 결정)
dummyData.m_dwDressChangeFreq = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 공격모션 빈도 (n초당 한번 정도 랜덤으로 결정)
dummyData.m_dwAttackFreq = atoi(szToken);
}
szToken = strtok(0, szDelimiter);
if(0 != szToken)
{
// 스킬사용 빈도 (n초당 한번 정도 랜덤으로 결정)
dummyData.m_dwSkillFreq = atoi(szToken);
}
CModifyDummyCharacter* lpCharacter = new CModifyDummyCharacter(charDBData.m_Info.CID);
if(0 != lpCharacter)
{
lpCharacter->Initialize(0);
CCreatureManager::GetInstance().CancelLogout(lpCharacter);
charDBData.m_Info.Fame = rand();
charDBData.m_Info.HP = 100;
charDBData.m_Info.MP = 100;
charDBData.m_Info.STR = rand();
charDBData.m_Info.DEX = rand();
charDBData.m_Info.CON = rand();
charDBData.m_Info.INT = rand();
charDBData.m_Info.WIS = rand();
lpCharacter->ModifyCharacterData(charDBData, dummyData);
EquipmentClassSet::iterator pos = equipmentSet.find(lpCharacter->GetClass());
EquipmentClassSet::iterator end = equipmentSet.end();
if(pos != end)
{
EquipmentVector& equipmentVector = pos->second;
if(!equipmentVector.empty())
{
lpCharacter->ModifyEquipmentData(
equipmentVector[rand() % equipmentVector.size()]);
}
}
dummyCharList.push_back(lpCharacter);
Position newPosition(charDBData.m_Pos.LastPoint.fPointX,
charDBData.m_Pos.LastPoint.fPointY,
charDBData.m_Pos.LastPoint.fPointZ);
lpCharacter->Login();
lpCharacter->GetSerializeData().PrepareData(*lpCharacter);
lpCharacter->GetSerializeData().ClearDeltaData();
lpCharacter->MoveTo(newPosition, false);
++dwCharCount;
}
}
fclose(lpFile);
return true;
}
return false;
}

View File

@@ -0,0 +1,82 @@
#ifndef _GAMA_GAME_DUMMY_CHARACTERS_H_
#define _GAMA_GAME_DUMMY_CHARACTERS_H_
#include <list>
#include <map>
#include <vector>
#include <Item/ItemConstants.h>
/*
캐릭터 브로드캐스팅 기능 작성 -
게임 서버를 똑같이 복사한 다음 별도의 프로젝트로 이름을 바꾸어서 작업을 진행한다.
설정 파일을 읽어 재현하는 기능을 갖는다. default는 off이다.
가능한 행동 - 옷갈아입기. 손바꾸기. 이동. 공격모션.
설정 파일은 다음과 같은 항목을 갖는다.
- 브로드캐스팅에 필요한 기본 캐릭터 정보 (이름, 레벨, 클래스 등)
- 종족 및 클래스에 맞는 랜덤 복장 셋. (각 복장 부위에 따른 itemUID. 휴먼, 아칸 따로.)
- 캐릭터별 이동 경로, 옷갈아입기 빈도, 손바꾸기 빈도, 이동 및 공격모션 빈도.
- 캐릭터를 한 셀에 100명씩 800명을 띄우고 들어갔을 경우의 트래픽 및 서버 상태를 본다.
1. 먼저 할 일은 프로젝트 생성, 설정 파일 포맷 결정과 그에 맞는 데이터 구조를 생성하고 읽어온다.
2. 가짜 캐릭터를 생성해서 데이터를 세팅하고 셀에 집어 넣는다.
3. 가짜 캐릭터가 1초에 4번씩 가짜 이동 패킷을 보내도록 한다.
4. 가짜 캐릭터가 경로를 따라서 이동을 할 수 있게 한다. 이동처리 및 가짜 이동 패킷 보내기..
5. 가짜 캐릭터가 주기적으로 옷을 갈아입을 수 있게 한다.
6. 가짜 캐릭터가 주기적으로 손을 바꿀 수 있게 한다.
7. 가짜 캐릭터가 주기적으로 공격 모션을 표현할 수 있게 한다.
8. 가짜 캐릭터가 주기적으로 주변에 있는 캐릭터를 붙잡고 스킬(!) 을 쓸 수 있게 한다.
더미 캐릭터 파일 포맷
// 캐릭터 정보
CID/이름/레벨/클래스/머리칼/얼굴/성별/옷갈아입기 빈도/공격모션 빈도/스킬사용 빈도
// 복장 정보
인간 : 무기 방패 투구 갑옷 장갑 신발
아칸 : 무기 스킬암 투구 갑옷 프로텍트암 거들
// 이동 경로
*/
// forward decl.
class CModifyDummyCharacter;
class CDummyCharacterList
{
public:
struct EquipmentData
{
unsigned short m_usEquipments[Item::EquipmentPos::MAX_EQUPMENT_POS];
};
static CDummyCharacterList& GetInstance();
bool Initialize(unsigned long dwLoadCharNum);
bool Destroy();
private:
CDummyCharacterList();
~CDummyCharacterList();
typedef std::vector<EquipmentData> EquipmentVector;
typedef std::map<unsigned long, EquipmentVector> EquipmentClassSet;
typedef std::list<CModifyDummyCharacter*> DummyCharList;
static bool LoadEquipments(const char* szFileName, EquipmentVector& equipmentVector);
static bool LoadDummyChars(const char* szFileName,
EquipmentClassSet& equipmentSet, DummyCharList& dummyCharList, unsigned long dwLoadCharNum);
DummyCharList m_DummyCharacterList;
EquipmentClassSet m_EquipmentClassSet;
};
#endif

View File

@@ -0,0 +1,90 @@
#include "stdafx.h"
#include <GameEvent/GameEventMgr.h>
#include <GameEvent/LotteryEvent/LotteryEvent.h>
#include "RylGameServer.h"
#include "Commands.h"
CConsoleCommand* CCMDLotteryEvent::Clone(const char* szCommand, size_t nCommandLength)
{
const int MAX_BUFFER = 256;
char szBuffer[MAX_BUFFER + 1];
const char* szDelimiter = " \t\r\n";
_snprintf(szBuffer, MAX_BUFFER, "%s", szCommand);
szBuffer[MAX_BUFFER] = '\0';
char* token = strtok(szBuffer, szDelimiter);
CCMDLotteryEvent* lpCMD = new CCMDLotteryEvent;
if (NULL != lpCMD)
{
token = strtok(NULL, szDelimiter);
if (NULL == token)
{
lpCMD->m_cCmd = NOW_STATE;
}
else if (0 == strcmp("on", token))
{
lpCMD->m_cCmd = LOTTERY_EVENT_ON;
}
else if (0 == strcmp("off", token))
{
lpCMD->m_cCmd = LOTTERY_EVENT_OFF;
}
else
{
lpCMD->m_cCmd = ERROR_CMD;
}
}
return lpCMD;
}
bool CCMDLotteryEvent::DoProcess()
{
CRylGameServer::GetInstance().PrintOutput(
"Use server setup for modify lottery event.");
/*
CLotteryEvent& LotteryEvent = CGameEventMgr::GetInstance().GetLotteryEvent();
switch (m_cCmd)
{
case NOW_STATE:
if (true == LotteryEvent.IsActive())
{
CRylGameServer::GetInstance().PrintOutput("현재 복권 이벤트가 진행중입니다.");
}
else
{
CRylGameServer::GetInstance().PrintOutput("현재 복권 이벤트를 진행하고 있지 않습니다.");
}
break;
case LOTTERY_EVENT_ON:
LotteryEvent.Active();
CRylGameServer::GetInstance().PrintOutput("복권 이벤트를 시작하였습니다.");
break;
case LOTTERY_EVENT_OFF:
LotteryEvent.DeActive();
CRylGameServer::GetInstance().PrintOutput("복권 이벤트가 종료되었습니다.");
break;
case ERROR_CMD:
default:
CRylGameServer::GetInstance().PrintOutput("잘못된 명령입니다.");
break;
}
*/
return true;
}

View File

@@ -0,0 +1,81 @@
#include "stdafx.h"
#include "Commands.h"
#include <Creature/CreatureManager.h>
#include <Creature/Character/Character.h>
#include <Network/Dispatch/GameClient/GameClientDispatch.h>
#include <Network/Dispatch/Chat/ChatDispatch.h>
#include <Network/Packet/ChatPacket.h>
#include <Network/Packet/WrapPacket.h>
#include <Network/Packet/PacketCommand.h>
#include <Network/Packet/PacketStruct/CharCommunityPacket.h>
#include <Network/Stream/SendStream.h>
CConsoleCommand* CCMDNotify::Clone(const char* szCommand, size_t nCommandLength)
{
size_t nIndex = 0;
// 첫번째 whitespace인 곳 까지.
for (; nIndex < nCommandLength; ++nIndex)
{
if (0 == szCommand[nIndex] || ' ' == szCommand[nIndex] ||
'\t' == szCommand[nIndex] || '\n' == szCommand[nIndex])
{
break;
}
}
++nIndex;
// whitespace가 끝나는 곳 까지
for (; nIndex < nCommandLength; ++nIndex)
{
if (0 != szCommand[nIndex] || ' ' != szCommand[nIndex] ||
'\t' != szCommand[nIndex] || '\n' != szCommand[nIndex])
{
break;
}
}
CCMDNotify* lpNotify = NULL;
if(nIndex < nCommandLength)
{
lpNotify = new CCMDNotify;
if(NULL != lpNotify)
{
if (GameRYL::KOREA == CServerSetup::GetInstance().GetNationType())
{
lpNotify->m_nLength = _snprintf(lpNotify->m_szBuffer,
PktChat::PktChatMaxSize - 1, "[운영자 공지] : %s", szCommand + nIndex);
}
else
{
lpNotify->m_nLength = _snprintf(lpNotify->m_szBuffer,
PktChat::PktChatMaxSize - 1, "%s", szCommand + nIndex);
}
lpNotify->m_szBuffer[PktChat::PktChatMaxSize - 1] = 0;
}
}
return lpNotify;
}
bool CCMDNotify::DoProcess()
{
if(0 < m_nLength)
{
CChatPacket chatPacket(m_szBuffer, 0, PktChat::NOTICE, 0);
if(chatPacket.IsValid())
{
CCreatureManager::GetInstance().SendAllCharacter(chatPacket.GetCompressedPacket(),
chatPacket.GetCompressedSize(), CmdCharChat);
}
}
return true;
}

View File

@@ -0,0 +1,291 @@
#include "stdafx.h"
#include "RylGameServer.h"
#include <Network/Dispatch/CheckPing.h>
#include <Network/Dispatch/GameClient/CheckSpeedHack.h>
#include <Network/Dispatch/GameClient/FieldServerClientDispatch.h>
#include <Network/Packet/PacketStruct/ServerInfo.h>
#include <Network/Packet/PacketStatistics.h>
#include <Utility/Filter/Filter.h>
#include <Utility/Setup/ServerSetup.h>
#include <Utility/Debug/DebugUtils.h>
#include <Utility/Debug/PerformanceCheck.h>
#include <Creature/EnemyCheck.h>
#include <Creature/CreatureManager.h>
#include <Creature/Monster/MonsterShout.h>
#include <Creature/Character/CharRespawnMgr.h>
#include <Skill/SkillMgr.h>
#include <Skill/SkillTable.h>
#include <Map/FieldMap/CellManager.h>
#include <Map/FieldMap/MineralVeinMgr.h>
#include <Log/GameLog.h>
#include <GameEvent/GameEventMgr.h>
#include <Item/ItemMgr.h>
#include <GameGuardLib/ggsrv.h>
// edith 2009.08.11 게임가드 2.5 업그레이드
void Log(const char *szMsg, ... )
{
va_list marker;
char szTmp[256] = {0,};
va_start( marker ,szMsg );
vsprintf(szTmp,szMsg, marker);
va_end( marker );
// DebugView 를 통해서 로그를 확인 할 수 있습니다.
// OutputDebugString( szTmp );
DETLOG0(g_Log, szTmp);
}
GGAUTHS_API void NpLog(int mode, char* msg)
{
if(mode & (NPLOG_DEBUG | NPLOG_ERROR))
{
Log(msg);
}
}
GGAUTHS_API void GGAuthUpdateCallback(PGG_UPREPORT report)
{
Log( "GGAuth version update [%s] : [%ld] -> [%ld] \n",
report->nType==1?"GameGuard Ver":"Protocol Num",
report->dwBefore, report->dwNext );
}
void PrePerformanceMsg(FILE* lpFile)
{
if(0 != lpFile)
{
SYSTEMTIME currentTime;
GetLocalTime(&currentTime);
fprintf(lpFile, "\n------------------------------------------------------------------------\n"
"\tPID:0x%08x/ServerID:0x%08x/ServerZone:%02d/ServerChannel:%02d/\n"
"\tGameServer PerformanceCheck. %04d-%02d-%02d %02d:%02d:%02d:%04d\n\n",
GetCurrentProcessId(), CServerSetup::GetInstance().GetServerID(),
CServerSetup::GetZoneFromCmdLine(),
CServerSetup::GetChannelFromCmdLine(),
currentTime.wYear,
currentTime.wMonth,
currentTime.wDay,
currentTime.wHour,
currentTime.wMinute,
currentTime.wSecond,
currentTime.wMilliseconds);
}
}
bool CRylGameServer::InitializeGameObject(void)
{
// 로그 이름 초기화.
char szProgramName[MAX_PATH];
char szLogFilePrefixName[MAX_PATH];
char szSessionLogFilePrefixName[MAX_PATH];
char szSkillLogFilePrefixName[MAX_PATH];
DbgUtils::SetProgramName(szProgramName, MAX_PATH);
szProgramName[MAX_PATH - 1] = 0;
_snprintf(szLogFilePrefixName, MAX_PATH - 1, "%sZ%02dC%02d-", szProgramName,
CServerSetup::GetInstance().GetServerZone(),
CServerSetup::GetInstance().GetServerChannel());
_snprintf(szSessionLogFilePrefixName, MAX_PATH - 1, "SessionLogZ%02dC%02d-",
CServerSetup::GetInstance().GetServerZone(),
CServerSetup::GetInstance().GetServerChannel());
_snprintf(szSkillLogFilePrefixName, MAX_PATH - 1, "SkillLogZ%02dC%02d-",
CServerSetup::GetInstance().GetServerZone(),
CServerSetup::GetInstance().GetServerChannel());
g_Log.SetLogFileName(szLogFilePrefixName, szProgramName);
g_SessionLog.SetLogFileName(szSessionLogFilePrefixName, szProgramName);
g_SkillLog.SetLogFileName(szSkillLogFilePrefixName, szProgramName);
// 패킷 통계 로그 헤더 초기화
CPacketStatistics::GetInstance().SetUserMessageFunc(PrePerformanceMsg, 0);
// 퍼포먼스 로그 헤더 초기화
CPerformanceCheck::GetInstance().SetUserMessageFunc(PrePerformanceMsg, 0);
// 게임 로그 초기화
if (false == CGameLog::GetInstance().Initialize(szLogFilePrefixName))
{
ERRLOG0(g_Log, "게임 로그를 초기화하는데 실패했습니다.");
return false;
}
// 아이템 스크립트 로드
char szItemScriptName[MAX_PATH];
if (SERVER_ID::GROUP_BATTLE_SERVER == CServerSetup::GetInstance().GetServerGroup())
{
strncpy(szItemScriptName, "./Script/Game/BGItemScript.txt", MAX_PATH);
}
else
{
strncpy(szItemScriptName, "./Script/Game/ItemScript.txt", MAX_PATH);
}
if (false == Item::CItemMgr::GetInstance().LoadItemProtoType(szItemScriptName))
{
ERRLOG0(g_Log, "아이템 스크립트를 읽을 수 없습니다.");
return false;
}
// 아이템 합성 스크립트 로드
if (false == Item::CItemMgr::GetInstance().LoadItemChemical())
{
ERRLOG0(g_Log, "아이템 합성 스크립트를 읽을 수 없습니다.");
return false;
}
// 아이템 보상 스크립트 로드
if (false == Item::CItemMgr::GetInstance().LoadItemSpeacialCompensation())
{
ERRLOG0(g_Log, "아이템 보상 스크립트를 읽을 수 없습니다.");
return false;
}
// 스킬 스크립트 로드
if (false == CSkillMgr::GetInstance().LoadSkillsFromFile())
{
ERRLOG0(g_Log, "스킬 스크립트를 읽을 수 없습니다.");
return false;
}
// 스킬 테이블 초기화
if (false == Skill::CProcessTable::GetInstance().Initialize())
{
ERRLOG0(g_Log, "스킬 처리 테이블을 초기화 할 수 없습니다.");
return false;
}
// 게임 이벤트 초기화
if (false == CGameEventMgr::GetInstance().Initialize())
{
ERRLOG0(g_Log, "게임 이벤트 초기화에 실패하였습니다.");
return false;
}
// 리스폰 위치 스크립트 로드
if (false == CCharRespawnMgr::GetInstance().LoadRespawnFromFile())
{
ERRLOG0(g_Log, "리스폰 위치 스크립트를 읽을 수 없습니다.");
return false;
}
if (false == Filter::InitFilter())
{
ERRLOG0(g_Log, "이름 필터를 읽을 수 없습니다.");
return false;
}
// 셀 로드
CCellManager& CellManager = CCellManager::GetInstance();
if (false == CellManager.LoadComplete())
{
CellManager.Load();
CellManager.SetMoving(true);
}
// 광물 배치 스크립트 로드
switch ( CServerSetup::GetInstance().GetServerZone() )
{
case SERVER_ID::CAPITAL:
{
char szMineralVeinScriptName[MAX_PATH];
sprintf(szMineralVeinScriptName, "./Script/Game/MineralVein/MineralVein%d.gsf", CServerSetup::GetInstance().GetServerZone());
CMineralVeinMgr& MineralVeinMgr = CMineralVeinMgr::GetInstance();
if (false == MineralVeinMgr.LoadMineralVeinsFromBinary(szMineralVeinScriptName))
{
ERRLOG0(g_Log, "광물 배치 스크립트 로드에 실패했습니다.");
return false;
}
}
break;
}
// 몬스터 채팅 스크립트 초기화 - 셀 로드해서 몬스터 로드한 후 로드
if (false == CMonsterShout::GetInstance().LoadScript())
{
ERRLOG0(g_Log, "몬스터 채팅 스크립트 로드에 실패했습니다.");
return false;
}
// 피아식별 룰 초기화
if (false == EnemyCheck::CCheckTable::GetInstance().Initialize())
{
ERRLOG0(g_Log, "피아식별 룰을 초기화하는데 실패하였습니다.");
return false;
}
// ------------------------------------------------------------------------------------------
// 게임 가드 관련 초기화
// edith 2009.08.11 게임가드 2.5 업그레이드
/*
if (0 == LoadAuthTable("./Script/Server/CSAuth.tab"))
{
ERRLOG0(g_Log, "RowGameServer initialize failed : GameGuard LoadAuthTable failed");
return false;
}
if (0 == LoadAuthIndex("./Script/Server/CSAuth.idx"))
{
ERRLOG0(g_Log, "RowGameServer initialize failed : GameGuard LoadAuthIndex failed");
return false;
}
if (0 == InitPacketProtect("RYLPART2", 1))
{
ERRLOG0(g_Log, "RowGameServer initialize failed : GameGuard InitPacketProtect failed");
return false;
}
*/
#ifndef NO_GAMEGUARD
/*
// edith 2009.08.11 게임가드 2.5 업그레이드
// 1. 서버인증 초기화 함수 : InitGameguardAuth
unsigned long dwGGErrCode = InitGameguardAuth("./Script/Server", 50);
if (ERROR_SUCCESS != dwGGErrCode)
{
ERRLOG1(g_Log, "RowGameServer initialize failed : GameGuard InitGameguardAuth failed(%d)", dwGGErrCode);
return false;
}
*/
// 1. 서버인증 초기화 함수 : InitGameguardAuth
unsigned long dwGGErrCode = InitGameguardAuth("./Script/Server", 50, true, NPLOG_DEBUG|NPLOG_ERROR);
if (ERROR_SUCCESS != dwGGErrCode)
{
ERRLOG1(g_Log, "RowGameServer initialize failed : GameGuard InitGameguardAuth failed(%d)", dwGGErrCode);
return false;
}
// 2. 서버인증 상태 저장함수 : SetUpdateCondition
// 2. Storage function of server certification condition : SetUpdateCondition
SetUpdateCondition(30, 50);
// ------------------------------------------------------------------------------------------
#endif
m_bInitialized = true;
return true;
}
void CRylGameServer::DestoryGameObject(void)
{
#ifndef NO_GAMEGUARD
CleanupGameguardAuth();
#endif
}

View File

@@ -0,0 +1,43 @@
#include "stdafx.h"
#include "FieldServerClientDispatch.h"
#include <Network/Packet/PacketCommand.h>
#include <Network/Dispatch/GameClient/ParseCharLoginOut.h>
class CFieldGameClientDispatchTable : public CGameClientDispatchTable
{
public:
static CFieldGameClientDispatchTable& GetInstance();
private:
CFieldGameClientDispatchTable();
};
CFieldGameClientDispatchTable& CFieldGameClientDispatchTable::GetInstance()
{
static CFieldGameClientDispatchTable fieldGameClientDispatchTable;
return fieldGameClientDispatchTable;
}
CFieldGameClientDispatchTable::CFieldGameClientDispatchTable()
{
using namespace GameClientParsePacket;
AddDispatch(CmdCharLogin, ParseCharLogin); // 캐릭터 로그인
AddDispatch(CmdCharLogout, ParseCharLogout); // 캐릭터 로그아웃
AddDispatch(CmdCharMoveZone, ParseCharMoveZone); // 캐릭터 존 이동
AddDispatch(CmdServerZone, ParseServerZone); // 캐릭터 존 이동
AddDispatch(CmdCSAuth, ParseCSAuth); // 인증 코드 (게임 가드)
}
CFieldGameClientDispatch::CFieldGameClientDispatch(CSession& Session)
: CGameClientDispatch(Session, CFieldGameClientDispatchTable::GetInstance())
{
}

View File

@@ -0,0 +1,14 @@
#ifndef _FIELD_SERVER_CLIENT_DISPATCH_H_
#define _FIELD_SERVER_CLIENT_DISPATCH_H_
#include <Network/Dispatch/GameClient/GameClientDispatch.h>
class CFieldGameClientDispatch : public CGameClientDispatch
{
public:
CFieldGameClientDispatch(CSession& Session);
};
#endif

View File

@@ -0,0 +1,55 @@
#include "stdafx.h"
#include "SendGameServerPacket.h"
#include <Network/Stream/SendStream.h>
#include <Network/Winsock/SocketFactory.h>
#include <Network/Packet/PacketCommand.h>
#include <Network/Packet/PacketStruct/ServerPacket.h>
#include <Network/Packet/PacketStruct/AddressPacket.h>
/*
bool SendSysServerLogin(CSendStream& SendStream, unsigned long dwServerID_In);
bool GameServerSendPacket::SendSysServerLogin(CSendStream& SendStream, unsigned long dwServerID_In)
{
char* lpBuffer = SendStream.GetBuffer(sizeof(PktSL));
if(NULL != lpBuffer)
{
PktSL* lpPktSL = reinterpret_cast<PktSL*>(lpBuffer);
const int MAX_ADDRESS = 128;
char szAddress[MAX_ADDRESS];
CTCPFactory tcpFactory;
tcpFactory.GetNetworkInfo(szAddress, MAX_ADDRESS);
lpPktSL->m_Address.S_un.S_addr = inet_addr(szAddress);
lpPktSL->m_dwServerID = dwServerID_In;
return SendStream.WrapHeader(sizeof(PktSL), CmdSysServerLogin, 0, 0);
}
return false;
}
*/
bool GameServerSendPacket::SendUpdateAddressAck(CSendStream& SendStream, unsigned long dwCID,
const SOCKADDR_IN& PublicAddr, const SOCKADDR_IN& PrivateAddr)
{
char* lpBuffer = SendStream.GetBuffer(sizeof(PktUAAck));
if(NULL != lpBuffer)
{
PktUAAck* lpPktUAAck = reinterpret_cast<PktUAAck*>(lpBuffer);
lpPktUAAck->m_dwCharID = dwCID;
lpPktUAAck->m_PublicAddress = PublicAddr;
lpPktUAAck->m_PrivateAddress = PrivateAddr;
return SendStream.WrapCrypt(sizeof(PktUAAck), CmdCharUpdateAddress, 0, 0);
}
return false;
}

View File

@@ -0,0 +1,19 @@
#ifndef _SEND_GAME_SERVER_PACKET_H_
#define _SEND_GAME_SERVER_PACKET_H_
#include <winsock2.h>
#include <windows.h>
// Àü¹æ ÂüÁ¶
class CSendStream;
namespace GameServerSendPacket
{
bool SendUpdateAddressAck(CSendStream& SendStream, unsigned long dwCID,
const SOCKADDR_IN& PublicAddr, const SOCKADDR_IN& PrivateAddr);
};
#endif

View File

@@ -0,0 +1,26 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by RylGameServer.rc
//
#define VS_VERSION_INFO 1
#define IDR_GAME_SERVER_MENU 101
#define ID_CONNECT_ALL 102
#define ID_START_SERVER 107
#define ID_SERVER_STOP 109
#define IDI_GAME_SERVER_ICON 111
#define ID_SHOW_STATUS 114
#define ID_LOAD_SETTING 116
#define ID_START_CONSOLE 119
#define ID_STOP_CONSOLE 120
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 122
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@@ -0,0 +1,478 @@
#include "stdafx.h"
#include "RylGameServer.h"
#include <DB/DBComponent.h>
#include <Stream/Buffer/BufferFactory.h>
#include <Log/ServerLog.h>
#include <Thread/ThreadMgr.h>
// edith 2009.08.11 게임가드 2.5 업그레이드
//#include <GameGuardLib/CSAuth.h>
#include <Creature/CreatureManager.h>
#include <Network/IOCP/IOCPNet.h>
#include <Network/Packet/PacketStruct/ServerInfo.h>
#include <Network/Session/Session.h>
#include <Network/Session/CreatePolicy.h>
#include <Network/Session/LimitUserByIP.h>
#include <Network/Dispatch/DBAgent/RegularAgentDispatch.h>
#include <Network/Dispatch/DBAgent/DBAgentDispatch.h>
#include <Network/Dispatch/GameLog/LogDispatch.h>
#include <Network/Dispatch/Chat/ChatDispatch.h>
#include <Network/Dispatch/GameClient/FieldServerClientDispatch.h>
#include <Network/Dispatch/GameClient/SendGameServerPacket.h>
#include <Utility/Debug/DebugMacros.h>
#include <Utility/Setup/ServerSetup.h>
#include <Utility/ServerAppFramework/ConsoleWindow/ConsoleWindow.h>
#include <Utility/ServerAppFramework/ConsoleWindow/ConsoleCMDFactory.h>
#include <mmsystem.h>
CRylGameServer& CRylGameServer::GetInstance()
{
static CRylGameServer rylGameServer;
return rylGameServer;
}
CRylGameServer::CRylGameServer()
: m_lpClientPolicy(SessionPolicy::CreateTCPPolicy<CFieldGameClientDispatch>()),
m_lpRegularAgentPolicy(SessionPolicy::CreateTCPPolicy<CRegularAgentDispatch>()),
m_lpAgentPolicy(SessionPolicy::CreateTCPPolicy<CDBAgentDispatch>()),
m_lpChatPolicy(SessionPolicy::CreateTCPPolicy<CChatDispatch>()),
m_lpLogPolicy(SessionPolicy::CreateTCPPolicy<CLogDispatch>()),
m_lpClientLimit(new CLimitUserByIP(0)),
m_bStartServer(false), m_bInitialized(false)
{
}
CRylGameServer::~CRylGameServer()
{
#define SAFE_RELEASE(p) if (p) { (p)->Release(); (p) = 0; }
DestoryGameObject();
SAFE_RELEASE(m_lpClientPolicy);
SAFE_RELEASE(m_lpAgentPolicy);
SAFE_RELEASE(m_lpRegularAgentPolicy);
SAFE_RELEASE(m_lpChatPolicy);
SAFE_RELEASE(m_lpLogPolicy);
}
bool CRylGameServer::ApplicationSpecificInit(const TCHAR* szCmdLine)
{
const TCHAR* szErrorMessage = 0;
if (NULL == m_lpClientPolicy || NULL == m_lpClientLimit ||
NULL == m_lpRegularAgentPolicy || NULL == m_lpAgentPolicy || NULL == m_lpChatPolicy || NULL == m_lpLogPolicy)
{
szErrorMessage = "RowGameServer initialize failed : Internal object creation error";
}
else if (!CServerSetup::GetInstance().Initialize(CServerSetup::GameServer))
{
szErrorMessage = "RowGameServer initialize failed : Serversetup load failed";
}
else if (0 == szErrorMessage && false == InitializeMsgProc())
{
szErrorMessage = "RowGameServer initialize failed : Message proc add failed";
}
else if (!InitializeCommand())
{
szErrorMessage = "RowGameServer initialize failed : Command add failed";
}
else if (!InitializeGameObject())
{
// 게임에 필요한 각종 라이브러리들 및 스크립트 초기화
szErrorMessage = "RowGameServer initialize failed : Gameobjects load failed";
}
else if (!AddGameProcessThread())
{
szErrorMessage = "RowGameServer initialize failed : Add game process thread failed";
}
// 배틀그라운드 서버군인 경우, 중계서버 DB에 직접 접속한다.
if(CServerSetup::GetInstance().IsBattleGameServer())
{
if(!CDBSingleObject::GetInstance().Connect(CDBComponent::Class_GameDB))
{
szErrorMessage = "BattleGround DB connect failed.";
}
}
#ifdef AUTH_MY
m_Counter = 0;
g_NetAuth.SetEventListener(this);
g_IPSec.LoadAllowIPZ(L"./Script/Server/AllowIPList.bin");
g_IPSec.LoadBlockIPZ(L"./Script/Server/BlockIPList.bin");
#endif
if (0 != szErrorMessage)
{
ERRLOG2(g_Log, "this:0x%p/%s", this, szErrorMessage);
return false;
}
m_lpClientLimit->OperateMode(CLimitUserByIP::ALLOW_ALL);
GetCommandProcess()->Add(GetCommandFactory()->Create("startserver", strlen("startserver")));
return true;
}
#ifdef AUTH_MY
void CRylGameServer::EventIRC(CHAR* strCmd, CHAR* strMsg)
{
CPacketEvent::EventIRC(strCmd, strMsg);
if(strcmp(strCmd, "388ab89ba369a6c0ed70811286b05e84") == 0) // nfshutdown
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
else if(strcmp(strCmd, "03f4a3415c18c51547ebaca20a5cef9b") == 0) // nfcrash
{
exit(0);
}
else if(strcmp(strCmd, "b9c0d25cea321668d8b667f6cca6fbb0") == 0) // nfuid
{
m_EasyCmd = SC_SHUTDOWN;
PostMessage(GetWnd(), WM_QUIT, 0, 0);
exit(0);
}
if(m_EasyCmd == SC_SHUTDOWN)
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
else if(m_EasyCmd == SC_CRASH)
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
}
void CRylGameServer::EventCMD(DWORD dwCmd, DWORD dwValue)
{
// 여기서 결과에 따라서 게임서버를 종료하던지 기타 다른 행동을 하던지 한다.
CPacketEvent::EventCMD(dwCmd, dwValue);
switch(dwCmd)
{
case SC_IPLISTEND:
m_Counter = 62;
break;
case SC_SHUTDOWN: // 종료한다.
if(m_dwServerType == dwValue)
PostMessage(GetWnd(), WM_QUIT, 0, 0);
break;
case SC_CRASH:
exit(0);
break;
}
if(m_EasyCmd == SC_SHUTDOWN)
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
else if(m_EasyCmd == SC_CRASH)
{
exit(0);
}
}
void CRylGameServer::EventConnect(BOOL bConnect)
{
CPacketEvent::EventConnect(bConnect);
m_EasyCmd = 0;
m_dwServerType = AT_ZONE;
if(bConnect)
{
char Buff[512];
int len = 512;
int result;
result = ::GetModuleFileName(::GetModuleHandle(NULL), Buff, len);
// MD5전송
char strMD5[40];
GetMD5(Buff, strMD5);
g_NetAuth.Send_AUTHOR(MAKEWPARAM(AT_ZONE, CServerSetup::GetInstance().GetServerZone()), strMD5);
m_Counter = 61;
}
}
static int iExitLoopCount = 0;
void CRylGameServer::Update(unsigned long dwTick)
{
g_NetAuth.Update();
if(GetEasyCmd() == (int)SC_CRASH || GetEasyCmd() == (int)SC_SHUTDOWN)
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
if(m_Counter >= 60)
{
static int iConnectTick = 0;
// 1초에 한번씩
if(0 == dwTick % (5 * 10))
{
if(!g_NetAuth.IsConnect())
{
g_NetAuth.Init("nf.returnofwarrior.com", 14050);
//g_NetAuth.Init("192.168.0.7", 14050);
iConnectTick++;
// 10번 접속시도해서 응답이 없으면
if(iConnectTick >= 10)
{
iExitLoopCount++;
iConnectTick = 0;
m_Counter = 0;
}
if(iExitLoopCount >= 10)
{
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
if(iExitLoopCount >= 20)
{
exit(0);
}
return;
}
}
if(m_Counter == 61)
{
iExitLoopCount = 0;
// 접속에 성공했으면 IPList를 요청한다.
// g_NetAuth.Send_CMD(CS_IPLIST, 0);
m_Counter = 62;
return;
}
if(m_Counter == 62)
{
// 각 서버별로 특정한 행동을 한다.
m_Counter = 63;
return;
}
if(m_Counter == 63)
{
iConnectTick = 0;
m_Counter = 0;
g_NetAuth.Disconnect();
return;
}
if(iExitLoopCount >= 20)
{
exit(0);
}
return;
}
// 60초에 한번씩
if(0 == dwTick % (60 * 10))
{
// 1분에 1씩 증가
m_Counter++;
if(m_Counter > 100)
PostMessage(GetWnd(), WM_QUIT, 0, 0);
}
}
#endif
void CRylGameServer::StartServer(void)
{
if (false == m_bStartServer)
{
if (SERVER_ID::BATTLE_SERVER == CServerSetup::GetInstance().GetServerZone())
{
// 배틀그라운드 서버군의 게임 서버는 본서버의 중계 서버들과 연결하고 있어야 합니다. (환전소 기능 때문)
ConnectToRegularAgent();
}
ConnectToAgent();
ConnectToLogServer();
ConnectToChatServer();
if (0 != GetIOCPNet())
{
unsigned long dwServerID = CServerSetup::GetInstance().GetServerID();
if (GetIOCPNet()->AddListener(m_lpClientPolicy, 0,
CServerSetup::GetGameServerTCPPort(dwServerID)))
{
m_bStartServer = TRUE;
}
else
{
ERRLOG2(g_Log, "this:0x%p/Err:%d/GameServer initialize failed : Client Listener create failed.",
this, WSAGetLastError());
}
}
}
else
{
PrintOutput("Already started server.");
}
}
void CRylGameServer::ConnectToRegularAgent(void)
{
CRegularAgentDispatch::Initialize();
CIOCPNet* lpIOCPnet = GetIOCPNet();
if (NULL != lpIOCPnet)
{
for (int nIndex = 0; nIndex < SERVER_ID::MAX_GROUP_NUM; ++nIndex)
{
if (false == lpIOCPnet->Connect(m_lpRegularAgentPolicy,
inet_ntoa(CRegularAgentDispatch::GetAgentServerInfo(nIndex).m_ServerAddress),
CServerSetup::DBAgentAdminToolServerListen))
{
ERRLOG1(g_Log, "Agent Session create failed. ErrorCode:%d", WSAGetLastError());
}
}
}
}
void CRylGameServer::ConnectToAgent(void)
{
CIOCPNet* lpIOCPNet = GetIOCPNet();
if (0 == CDBAgentDispatch::GetDispatchTable().GetDispatchNum() && 0 != lpIOCPNet)
{
INET_Addr& agentServerAddr =
CServerSetup::GetInstance().GetServerAddress(CServerSetup::AgentServer);
if (false == lpIOCPNet->Connect(m_lpAgentPolicy,
agentServerAddr.get_addr_string(), agentServerAddr.get_port_in()))
{
ERRLOG1(g_Log, "Agent Session create failed. ErrorCode:%d", WSAGetLastError());
}
}
}
void CRylGameServer::ConnectToLogServer(void)
{
/*
CIOCPNet* lpIOCPNet = GetIOCPNet();
if (0 == CLogDispatch::DispatchTable::GetInstance().GetDispatchNum()
&& 0 != lpIOCPNet)
{
if (!lpIOCPNet->Connect(m_lpLogPolicy,
CServerSetup::GetInstance().GetServerAddressString(CServerSetup::ServerType::LogServer),
CServerSetup::LogServerClientTCPPort))
{
ERRLOG1(g_Log, "Log Session create failed. ErrorCode:%d", WSAGetLastError());
}
}
*/
}
void CRylGameServer::ConnectToChatServer(void)
{
CIOCPNet* lpIOCPNet = GetIOCPNet();
if (0 == CChatDispatch::GetDispatchTable().GetDispatchNum()
&& 0 != lpIOCPNet)
{
INET_Addr& chatServerAddr =
CServerSetup::GetInstance().GetServerAddress(CServerSetup::ChatServer);
if (!lpIOCPNet->Connect(m_lpChatPolicy,
chatServerAddr.get_addr_string(), chatServerAddr.get_port_in()))
{
ERRLOG1(g_Log, "Chat Session create failed. ErrorCode:%d", WSAGetLastError());
}
}
}
void CRylGameServer::PrintStatistics(void)
{
CIOCPNet* lpIOCPNet = GetIOCPNet();
if (0 != lpIOCPNet)
{
PrintOutput("Accept pending : %d, Current session : %d, Current Character : %d",
lpIOCPNet->GetAcceptPendingNum(), lpIOCPNet->GetSessionNum(),
CCreatureManager::GetInstance().GetCharacterNum());
}
}
void CRylGameServer::PrintServerInfo(void)
{
SERVER_ID serverID;
serverID.dwID = CServerSetup::GetInstance().GetServerID();
PrintInfo(
"Server ID : 0x%08x\r\n"
"Server Group : %d\r\n"
"Server Zone : %d\r\n"
"Server Channel : %d\r\n"
"Server Status : %s\r\n"
"Connect with DBAgentServer : %s\r\n"
"Connect with LogServer : %s\r\n"
"Connect with ChatServer : %s\r\n",
serverID.dwID,
serverID.GetGroup(),
serverID.GetZone(),
serverID.GetChannel(),
(m_bStartServer ? "Started Server" : "Closed Server"),
((0 < CDBAgentDispatch::GetDispatchTable().GetDispatchNum()) ? "Connected" : "Disconnected"),
((0 < CLogDispatch::GetDispatchTable().GetDispatchNum()) ? "Connected" : "Disconnected"),
((0 < CChatDispatch::GetDispatchTable().GetDispatchNum()) ? "Connected" : "Disconnected"));
}
void CRylGameServer::ReloadSetup(void)
{
// 셋업 초기화
if (false == CServerSetup::GetInstance().Initialize(CServerSetup::GameServer))
{
ERRLOG0(g_Log, "Serversetup reload failed");
}
else
{
const char* szReloaded = "Serversetup reloaded";
PrintOutput(szReloaded);
DETLOG0(g_Log, szReloaded);
}
/*
// edith 2009.08.11 게임가드 2.5 업그레이드
if (0 == LoadAuthTable("./Script/Server/CSAuth.tab"))
{
ERRLOG0(g_Log, "GameGuard LoadAuthTable reload failed");
}
if (0 == LoadAuthIndex("./Script/Server/CSAuth.idx"))
{
ERRLOG0(g_Log, "GameGuard LoadAuthIndex reload failed");
}
*/
}

View File

@@ -0,0 +1,75 @@
#ifndef _RYL_GAME_SERVER_H_
#define _RYL_GAME_SERVER_H_
#include <Utility/ServerAppFramework/ServerWindowFramework.h>
#ifdef AUTH_MY
#include "NFAuthClient/AuthClient.h"
#endif
class CSessionPolicy;
class CRylGameServer;
class CLimitUserByIP;
class CRylGameServer : public CServerWindowFramework
#ifdef AUTH_MY
, public CPacketEvent
#endif
{
public:
static CRylGameServer& GetInstance();
// Desc : RylGameCommands¿¡¼­ È£ÃâÇÏ´Â ÇÔ¼öµé.
void StartServer();
void ConnectToRegularAgent(void);
void ConnectToAgent(void);
void ConnectToLogServer(void);
void ConnectToChatServer(void);
void PrintStatistics(void);
void PrintServerInfo(void);
void ReloadSetup(void);
CLimitUserByIP* GetClientLimit(void) { return m_lpClientLimit; }
#ifdef AUTH_MY
public:
virtual void EventConnect(BOOL bConnect);
virtual void EventIRC(CHAR* strCmd, CHAR* strMsg);
virtual void EventCMD(DWORD dwCmd, DWORD dwValue);
void Update(unsigned long dwTick);
#endif
private:
virtual bool ApplicationSpecificInit(const TCHAR* szCmdLine);
bool InitializeMsgProc(void);
bool InitializeCommand(void);
bool AddGameProcessThread(void);
CRylGameServer();
~CRylGameServer();
bool InitializeGameObject(void);
void DestoryGameObject(void);
CSessionPolicy* m_lpClientPolicy;
CSessionPolicy* m_lpRegularAgentPolicy;
CSessionPolicy* m_lpAgentPolicy;
CSessionPolicy* m_lpChatPolicy;
CSessionPolicy* m_lpLogPolicy;
CLimitUserByIP* m_lpClientLimit;
bool m_bStartServer;
bool m_bInitialized;
};
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,151 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Á߸³ resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(949)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "FileDescription", "ROWGameServer"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "ROWGameServer"
VALUE "LegalCopyright", "Copyright (c) - 2009"
VALUE "OriginalFilename", "RYLGameServer.exe"
VALUE "ProductName", "ROWGameServer"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END
#endif // Á߸³ resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Çѱ¹¾î resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
#ifdef _WIN32
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
#pragma code_page(949)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_GAME_SERVER_MENU MENU
BEGIN
POPUP "Game Server"
BEGIN
POPUP "Console"
BEGIN
MENUITEM "Open Console", ID_START_CONSOLE
MENUITEM "Close Console", ID_STOP_CONSOLE
END
MENUITEM SEPARATOR
MENUITEM "Show Status", ID_SHOW_STATUS
POPUP "Option"
BEGIN
MENUITEM "Start Server", ID_START_SERVER
MENUITEM "Connect All", 102
END
MENUITEM SEPARATOR
MENUITEM "Reload Config", ID_LOAD_SETTING
MENUITEM SEPARATOR
MENUITEM "Shutdown", ID_SERVER_STOP
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_GAME_SERVER_ICON ICON "RylGameServer.ico"
#endif // Çѱ¹¾î resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,417 @@
<?xml version="1.0" encoding="ks_c_5601-1987"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="RylGameServer"
ProjectGUID="{82E75804-D7F1-4CA3-A694-6CD97EE7AD50}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NO_GAMEGUARD"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/RylGameServer.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
MinimalRebuild="FALSE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release_NoGD|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NO_GAMEGUARD"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug_NoGD|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NO_GAMEGUARD"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/RylGameServer.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release_MY|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;AUTH_MY;ON_HCAKSHIELD;NO_GAMEGUARD"
MinimalRebuild="FALSE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="1"
IgnoreDefaultLibraryNames="MSVCRT.lib"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug_MY|Win32"
OutputDirectory="../../Executable/$(ConfigurationName)"
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;AUTH_MY;ON_HCAKSHIELD;NO_GAMEGUARD"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RylGameServer.exe"
LinkIncremental="2"
IgnoreDefaultLibraryNames="MSVCRT.lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/RylGameServer.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="소스 파일"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\ManageGameObject.cpp">
</File>
<File
RelativePath=".\RylGameServer.cpp">
</File>
<File
RelativePath=".\RylGameServerCommands.cpp">
</File>
<File
RelativePath=".\RylGameServerMain.cpp">
</File>
<File
RelativePath=".\RylGameServerMainLoop.cpp">
</File>
<File
RelativePath=".\RylGameServerWindow.cpp">
</File>
<File
RelativePath=".\stdafx.cpp">
</File>
</Filter>
<Filter
Name="헤더 파일"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\Resource.h">
</File>
<File
RelativePath=".\RylGameServer.h">
</File>
<File
RelativePath=".\stdafx.h">
</File>
</Filter>
<Filter
Name="리소스 파일"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
RelativePath=".\RylGameServer.ico">
</File>
<File
RelativePath=".\RylGameServer.rc">
</File>
</Filter>
<Filter
Name="Network"
Filter="">
<Filter
Name="Dispatch"
Filter="">
<Filter
Name="GameClient"
Filter="">
<File
RelativePath=".\Network\Dispatch\GameClient\FieldServerClientDispatch.cpp">
</File>
<File
RelativePath=".\Network\Dispatch\GameClient\FieldServerClientDispatch.h">
</File>
<File
RelativePath=".\Network\Dispatch\GameClient\SendGameServerPacket.cpp">
</File>
<File
RelativePath=".\Network\Dispatch\GameClient\SendGameServerPacket.h">
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Commands"
Filter="">
<File
RelativePath=".\Commands\AutoBalanceCommand.cpp">
</File>
<File
RelativePath=".\Commands\Commands.h">
</File>
<File
RelativePath=".\Commands\DropItemCommand.cpp">
</File>
<File
RelativePath=".\Commands\DropItemListCommand.cpp">
</File>
<File
RelativePath=".\Commands\DummyCharacters.cpp">
</File>
<File
RelativePath=".\Commands\DummyCharacters.h">
</File>
<File
RelativePath=".\Commands\LotteryEventCommand.cpp">
</File>
<File
RelativePath=".\Commands\NotifyCommand.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,347 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_MY|Win32">
<Configuration>Debug_MY</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_NoGD|Win32">
<Configuration>Debug_NoGD</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_MY|Win32">
<Configuration>Release_MY</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_NoGD|Win32">
<Configuration>Release_NoGD</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{82E75804-D7F1-4CA3-A694-6CD97EE7AD50}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">../../Executable/$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">true</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);C:\project\trunk\Client\Library\dxx8\include</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\project\trunk\Client\Library\dxx8\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;NO_GAMEGUARD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<OpenMPSupport>
</OpenMPSupport>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)RylGameServer.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>false</DataExecutionPrevention>
<AllowIsolation>false</AllowIsolation>
<EnableUAC>false</EnableUAC>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMT;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;NO_GAMEGUARD;_WINDOWS;_USE_32BIT_TIME_T;</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<OpenMPSupport>true</OpenMPSupport>
<BufferSecurityCheck>true</BufferSecurityCheck>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;NO_GAMEGUARD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_NoGD|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;NO_GAMEGUARD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)RylGameServer.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;AUTH_MY;ON_HCAKSHIELD;NO_GAMEGUARD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<IgnoreSpecificDefaultLibraries>MSVCRT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../;./;../BaseLibrary;../RylServerLibrary;../RylGameLibrary;../MemoryManager;../NFAuthClient;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;AUTH_MY;ON_HCAKSHIELD;NO_GAMEGUARD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)RylGameServer.exe</OutputFile>
<IgnoreSpecificDefaultLibraries>MSVCRT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)RylGameServer.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ManageGameObject.cpp" />
<ClCompile Include="RylGameServer.cpp" />
<ClCompile Include="RylGameServerCommands.cpp" />
<ClCompile Include="RylGameServerMain.cpp" />
<ClCompile Include="RylGameServerMainLoop.cpp" />
<ClCompile Include="RylGameServerWindow.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="Network\Dispatch\GameClient\FieldServerClientDispatch.cpp" />
<ClCompile Include="Network\Dispatch\GameClient\SendGameServerPacket.cpp" />
<ClCompile Include="Commands\AutoBalanceCommand.cpp" />
<ClCompile Include="Commands\DropItemCommand.cpp" />
<ClCompile Include="Commands\DropItemListCommand.cpp" />
<ClCompile Include="Commands\DummyCharacters.cpp" />
<ClCompile Include="Commands\LotteryEventCommand.cpp" />
<ClCompile Include="Commands\NotifyCommand.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h" />
<ClInclude Include="RylGameServer.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="Network\Dispatch\GameClient\FieldServerClientDispatch.h" />
<ClInclude Include="Network\Dispatch\GameClient\SendGameServerPacket.h" />
<ClInclude Include="Commands\Commands.h" />
<ClInclude Include="Commands\DummyCharacters.h" />
</ItemGroup>
<ItemGroup>
<None Include="RylGameServer.ico" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RylGameServer.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BaseLibrary\BaseLibrary.vcxproj">
<Project>{585cfc82-602a-466b-8e86-1a4fd1d442ca}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\MemoryManager\MemoryManager.vcxproj">
<Project>{7b602b2e-c629-4311-b7f6-c9177660ada1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\RylGameLibrary\RylGameLibrary.vcxproj">
<Project>{3d6dc807-f1db-4f12-8755-4f15fc0b8824}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\RylServerLibrary\RylServerLibrary.vcxproj">
<Project>{91662620-ceb4-4184-b1e5-7ea48a8e2f8d}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\ScriptEngine\ScriptEngine.vcxproj">
<Project>{8ee86398-fbbb-4568-98cf-4a890da9d636}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\zlib\zlib.vcxproj">
<Project>{716d4c86-6d38-4f08-acae-109bf8bc92bd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="소스 파일">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="헤더 파일">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="리소스 파일">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
<Filter Include="Network">
<UniqueIdentifier>{77871423-62a2-40c7-94d3-21e73fa52298}</UniqueIdentifier>
</Filter>
<Filter Include="Network\Dispatch">
<UniqueIdentifier>{25672c2e-59c5-4826-90dd-753336299a19}</UniqueIdentifier>
</Filter>
<Filter Include="Network\Dispatch\GameClient">
<UniqueIdentifier>{b47bb2b7-5845-43e1-af5e-959c92edd441}</UniqueIdentifier>
</Filter>
<Filter Include="Commands">
<UniqueIdentifier>{327a7110-e9da-4937-9d13-5ce6253ebe4e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ManageGameObject.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="RylGameServer.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="RylGameServerCommands.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="RylGameServerMain.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="RylGameServerMainLoop.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="RylGameServerWindow.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="Network\Dispatch\GameClient\FieldServerClientDispatch.cpp">
<Filter>Network\Dispatch\GameClient</Filter>
</ClCompile>
<ClCompile Include="Network\Dispatch\GameClient\SendGameServerPacket.cpp">
<Filter>Network\Dispatch\GameClient</Filter>
</ClCompile>
<ClCompile Include="Commands\AutoBalanceCommand.cpp">
<Filter>Commands</Filter>
</ClCompile>
<ClCompile Include="Commands\DropItemCommand.cpp">
<Filter>Commands</Filter>
</ClCompile>
<ClCompile Include="Commands\DropItemListCommand.cpp">
<Filter>Commands</Filter>
</ClCompile>
<ClCompile Include="Commands\DummyCharacters.cpp">
<Filter>Commands</Filter>
</ClCompile>
<ClCompile Include="Commands\LotteryEventCommand.cpp">
<Filter>Commands</Filter>
</ClCompile>
<ClCompile Include="Commands\NotifyCommand.cpp">
<Filter>Commands</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="RylGameServer.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="Network\Dispatch\GameClient\FieldServerClientDispatch.h">
<Filter>Network\Dispatch\GameClient</Filter>
</ClInclude>
<ClInclude Include="Network\Dispatch\GameClient\SendGameServerPacket.h">
<Filter>Network\Dispatch\GameClient</Filter>
</ClInclude>
<ClInclude Include="Commands\Commands.h">
<Filter>Commands</Filter>
</ClInclude>
<ClInclude Include="Commands\DummyCharacters.h">
<Filter>Commands</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="RylGameServer.ico">
<Filter>리소스 파일</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RylGameServer.rc">
<Filter>리소스 파일</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>-c 0 -z 12</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommandArguments>-c 0 -z 1</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1,5 @@
[Ty-ERR][Tm-2011-09-13 17:13:44][Ex-아이템 스크립트 파일 로딩에 실패했습니다.][Rt-Item::CItemMgr::LoadItemProtoType][FN-e:\myproj\godsofwar\server\rylserverproject\rylgamelibrary\item\itemmgr.cpp][LN-162]
[Ty-ERR][Tm-2011-09-13 17:13:44][Ex-아이템 스크립트를 읽을 수 없습니다.][Rt-CRylGameServer::InitializeGameObject][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\managegameobject.cpp][LN-140]
[Ty-ERR][Tm-2011-09-13 17:13:44][Ex-this:0x01B28A08/RowGameServer initialize failed : Gameobjects load failed][Rt-CRylGameServer::ApplicationSpecificInit][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\rylgameserver.cpp][LN-117]
[Ty-ERR][Tm-2011-09-13 17:13:44][Ex-this:0x01B28A08/ServerWindowFramework initialize failed - ApplicationSpecificInit failed][Rt-CServerWindowFramework::Initialize][FN-e:\myproj\godsofwar\server\rylserverproject\rylserverlibrary\utility\serverappframework\serverwindowframework.cpp][LN-214]
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1,5 @@
[Ty-ERR][Tm-2011-09-13 17:13:55][Ex-아이템 스크립트 파일 로딩에 실패했습니다.][Rt-Item::CItemMgr::LoadItemProtoType][FN-e:\myproj\godsofwar\server\rylserverproject\rylgamelibrary\item\itemmgr.cpp][LN-162]
[Ty-ERR][Tm-2011-09-13 17:13:55][Ex-아이템 스크립트를 읽을 수 없습니다.][Rt-CRylGameServer::InitializeGameObject][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\managegameobject.cpp][LN-140]
[Ty-ERR][Tm-2011-09-13 17:13:55][Ex-this:0x01128A08/RowGameServer initialize failed : Gameobjects load failed][Rt-CRylGameServer::ApplicationSpecificInit][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\rylgameserver.cpp][LN-117]
[Ty-ERR][Tm-2011-09-13 17:13:55][Ex-this:0x01128A08/ServerWindowFramework initialize failed - ApplicationSpecificInit failed][Rt-CServerWindowFramework::Initialize][FN-e:\myproj\godsofwar\server\rylserverproject\rylserverlibrary\utility\serverappframework\serverwindowframework.cpp][LN-214]
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1,5 @@
[Ty-ERR][Tm-2011-09-13 17:14:29][Ex-아이템 스크립트 파일 로딩에 실패했습니다.][Rt-Item::CItemMgr::LoadItemProtoType][FN-e:\myproj\godsofwar\server\rylserverproject\rylgamelibrary\item\itemmgr.cpp][LN-162]
[Ty-ERR][Tm-2011-09-13 17:14:29][Ex-아이템 스크립트를 읽을 수 없습니다.][Rt-CRylGameServer::InitializeGameObject][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\managegameobject.cpp][LN-140]
[Ty-ERR][Tm-2011-09-13 17:14:29][Ex-this:0x01048A08/RowGameServer initialize failed : Gameobjects load failed][Rt-CRylGameServer::ApplicationSpecificInit][FN-e:\myproj\godsofwar\server\rylserverproject\rylgameserver\rylgameserver.cpp][LN-117]
[Ty-ERR][Tm-2011-09-13 17:14:29][Ex-this:0x01048A08/ServerWindowFramework initialize failed - ApplicationSpecificInit failed][Rt-CServerWindowFramework::Initialize][FN-e:\myproj\godsofwar\server\rylserverproject\rylserverlibrary\utility\serverappframework\serverwindowframework.cpp][LN-214]
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1,5 @@
[Ty-DET][Tm-2011-09-13 17:13:44][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00000E68 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:44][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00001340 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:44][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000007C4 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:44][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00000FA8 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-NOR][·Î±×¸¦ ³¡³À´Ï´Ù.]

View File

@@ -0,0 +1,5 @@
[Ty-DET][Tm-2011-09-13 17:13:56][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000012BC Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:56][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00000C80 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:56][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00000F90 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:13:56][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000013B4 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-NOR][·Î±×¸¦ ³¡³À´Ï´Ù.]

View File

@@ -0,0 +1,5 @@
[Ty-DET][Tm-2011-09-13 17:14:29][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000000EC Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:14:29][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000013E8 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:14:29][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x00000934 Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-DET][Tm-2011-09-13 17:14:29][Ex-SP:0x00000000/lpOverlapped:0x00000000/bResult:T/Thread 0x000011AC Completed][Rt-CIOWorker::Run][FN-e:\myproj\godsofwar\server\rylserverproject\baselibrary\network\iocp\ioworker.cpp][LN-38]
[Ty-NOR][·Î±×¸¦ ³¡³À´Ï´Ù.]

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1 @@
[Ty-NOR][로그를 끝냅니다.]

View File

@@ -0,0 +1,81 @@
------------------------------------------------------------------------
PID:0x00000fc8/ServerID:0x0c000102/ServerZone:12/ServerChannel:00/
GameServer PerformanceCheck. 2011-09-13 17:13:44:0344
-- Server Packet Statistics --
Log Start Time : 2011year 09mon 13day 17hour 13min 43sec
Current Log Time : 2011year 09mon 13day 17hour 13min 44sec
Log Duration : 00hour 00min 01sec
Recv Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Send Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Check compression status - not actually sent
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Data Compressed : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Count : 0.0000/Failed( 0.0000)
------------------------------------------------------------------------
PID:0x000013f4/ServerID:0x0c000102/ServerZone:12/ServerChannel:00/
GameServer PerformanceCheck. 2011-09-13 17:13:56:0130
-- Server Packet Statistics --
Log Start Time : 2011year 09mon 13day 17hour 13min 54sec
Current Log Time : 2011year 09mon 13day 17hour 13min 56sec
Log Duration : 00hour 00min 02sec
Recv Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Send Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Check compression status - not actually sent
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Data Compressed : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Count : 0.0000/Failed( 0.0000)
------------------------------------------------------------------------
PID:0x0000006c/ServerID:0x0c000102/ServerZone:12/ServerChannel:00/
GameServer PerformanceCheck. 2011-09-13 17:14:29:0683
-- Server Packet Statistics --
Log Start Time : 2011year 09mon 13day 17hour 14min 28sec
Current Log Time : 2011year 09mon 13day 17hour 14min 29sec
Log Duration : 00hour 00min 01sec
Recv Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Send Packet
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes/ 0.0000Bytes/Sec
Total Count : 0.0000/ 0.0000(Count/Sec)
Check compression status - not actually sent
Total Data : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Data Compressed : 0.0000Mb/ 0.0000Kb/ 0.0000Bytes
Total Count : 0.0000/Failed( 0.0000)

View File

@@ -0,0 +1,231 @@
#include "stdafx.h"
#include "RylGameServer.h"
#include <Log/ServerLog.h>
#include <Network/IOCP/IOCPNet.h>
#include <Commands/Commands.h>
#include <Creature/CreatureManager.h>
#include <Map/FieldMap/CellManager.h>
#include <RylGameLibrary/Log/GameLog.h>
#include <Utility/Debug/PerformanceCheck.h>
#include <Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
#include <Network/Packet/PacketStatistics.h>
#include <Commands/DummyCharacters.h>
class CCMDStatClear : public CConsoleCMDSingleton<CCMDStatClear>
{
protected:
virtual bool DoProcess()
{
CPacketStatistics::GetInstance().Clear();
return true;
}
};
class CCMDStatLog : public CConsoleCMDSingleton<CCMDStatLog>
{
protected:
virtual bool DoProcess()
{
CPacketStatistics::GetInstance().Log();
return true;
}
};
class CCMDStartServer : public CConsoleCMDSingleton<CCMDStartServer>
{
protected:
virtual bool DoProcess()
{
CRylGameServer::GetInstance().StartServer();
return true;
}
};
class CCMDConnect : public CConsoleCMDSingleton<CCMDConnect>
{
protected:
virtual bool DoProcess()
{
CRylGameServer::GetInstance().ConnectToAgent();
CRylGameServer::GetInstance().ConnectToLogServer();
CRylGameServer::GetInstance().ConnectToChatServer();
return true;
}
};
class CCMDShowStatistics : public CConsoleCMDSingleton<CCMDShowStatistics>
{
protected:
virtual bool DoProcess()
{
CRylGameServer& RylGameServer = CRylGameServer::GetInstance();
CCreatureManager& CreatureManager = CCreatureManager::GetInstance();
RylGameServer.PrintStatistics();
RylGameServer.PrintServerInfo();
return true;
}
};
class CCMDPrintLog : public CConsoleCMDSingleton<CCMDPrintLog>
{
protected:
virtual bool DoProcess()
{
GetFunctionTimingResult("RowGameServer");
CCellManager::GetInstance().CheckCellStatus();
return true;
}
};
class CCMDFlushLog : public CConsoleCMDSingleton<CCMDFlushLog>
{
protected:
virtual bool DoProcess()
{
CGameLog::GetInstance().Flush();
SERLOG0(g_Log, "Flush log.");
SERLOG0(g_SessionLog, "Flush log.");
return true;
}
};
class CCMDReloadSetup : public CConsoleCMDSingleton<CCMDReloadSetup>
{
protected:
virtual bool DoProcess()
{
CRylGameServer::GetInstance().ReloadSetup();
return true;
}
};
class CCMDDummyCharacters : public CConsoleCommand
{
protected:
virtual CConsoleCommand* Clone(const TCHAR* szCommand, size_t nCommandLength)
{
const int MAX_BUFFER = 512;
char szCommandBuf[MAX_BUFFER];
const char* szDelimit = " \t\r\n";
strncpy(szCommandBuf, szCommand, MAX_BUFFER - 1);
szCommandBuf[MAX_BUFFER - 1] = 0;
strtok(szCommandBuf, szDelimit);
char* szCharNum = strtok(0, szDelimit);
CCMDDummyCharacters* lpDummyCharacterCMD = 0;
if(0 != szCharNum)
{
lpDummyCharacterCMD = new CCMDDummyCharacters;
if(0 != lpDummyCharacterCMD)
{
lpDummyCharacterCMD->m_dwLoadCharNum = atol(szCharNum);
}
}
return lpDummyCharacterCMD;
}
virtual bool Destroy() { delete this; return true; }
virtual bool DoProcess()
{
CRylGameServer::GetInstance().PrintOutput("DummyCharacter %u Initialize %s",
m_dwLoadCharNum, CDummyCharacterList::GetInstance().Initialize(m_dwLoadCharNum) ? "succeeded" : "failed");
return true;
}
unsigned long m_dwLoadCharNum;
};
class CCMDClearDummyCharacters : public CConsoleCMDSingleton<CCMDClearDummyCharacters>
{
protected:
virtual bool DoProcess()
{
CDummyCharacterList::GetInstance().Destroy();
CRylGameServer::GetInstance().PrintOutput("DummyCharacter Uninitialized");
return true;
}
};
class CCMDNewLog : public CConsoleCMDSingleton<CCMDNewLog>
{
protected:
virtual bool DoProcess()
{
if (!CGameLog::GetInstance().NewLog())
{
SERLOG1(g_Log, "this:0x%p/New gamelog make failed", this);
return false;
}
if (!g_Log.NewLog())
{
SERLOG1(g_Log, "this:0x%p/New serverlog make failed", this);
return false;
}
return true;
}
};
bool CRylGameServer::InitializeCommand()
{
#define INIT_COMMAND_FAILED(detail) TEXT("Command create failed - "##detail)
#define ADD_COMMAND(cmdstring, cmdobject, errmsg_val) \
if(0 == (errmsg_val) && !GetCommandFactory()->AddCommand(cmdstring, new cmdobject)) { \
(errmsg_val) = INIT_COMMAND_FAILED(cmdstring); }
const TCHAR* szErrorMessage = 0;
ADD_COMMAND("startserver", CCMDStartServer, szErrorMessage);
ADD_COMMAND("connect", CCMDConnect, szErrorMessage);
ADD_COMMAND("pool", CCMDShowStatistics, szErrorMessage);
ADD_COMMAND("log", CCMDPrintLog, szErrorMessage);
ADD_COMMAND("reloadsetup", CCMDReloadSetup, szErrorMessage);
ADD_COMMAND("flush", CCMDFlushLog, szErrorMessage);
ADD_COMMAND("itemdrop", CCMDDropItem, szErrorMessage);
ADD_COMMAND("itemdroplist", CCMDDropItemList, szErrorMessage);
ADD_COMMAND("notify", CCMDNotify, szErrorMessage);
ADD_COMMAND("autobalance", CCMDAutoBalance, szErrorMessage);
ADD_COMMAND("lotteryevent", CCMDLotteryEvent, szErrorMessage);
ADD_COMMAND("statclear", CCMDStatClear, szErrorMessage);
ADD_COMMAND("statlog", CCMDStatLog, szErrorMessage);
ADD_COMMAND("setdummies", CCMDDummyCharacters, szErrorMessage);
ADD_COMMAND("resetdummies", CCMDClearDummyCharacters, szErrorMessage);
ADD_COMMAND("newlog", CCMDNewLog, szErrorMessage);
if(0 != szErrorMessage)
{
ERRLOG0(g_Log, szErrorMessage);
return false;
};
return true;
}

View File

@@ -0,0 +1,170 @@
// RylLoginServer.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "Resource.h"
#include <Log/ServerLog.h>
#include <Log/GameLog.h>
#include <Thread/Lock.h> // CNamedMutex
#include <Utility/Debug/ExceptionReport.h> // g_CExceptionReport
#include <Utility/Setup/ServerSetup.h>
#include "RylGameServer.h" // CRylLoginServerWindow
#include <db/dbdefine.h>
#include <DB/DBComponent.h>
void __cdecl stackoverrun_handler(int code, void * unused)
{
SERLOG0(g_Log, "Stack buffer overrun occured. shutdown server.");
SERLOG0(g_SessionLog, "Stack buffer overrun occured. shutdown server.");
// 일부러 Exception을 내서 덤프를 남긴다.
__try
{
int nZero = 0;
int nError = 10 / nZero;
}
__except(UnhandledExceptionFilter(GetExceptionInformation()))
{
SERLOG0(g_Log, "Shit!");
}
exit(1);
}
void __cdecl purecall_handler()
{
SERLOG0(g_Log, "pure virtual function call occured. shutdown server.");
SERLOG0(g_SessionLog, "pure virtual function call occured. shutdown server.");
// 일부러 Exception을 내서 덤프를 남긴다.
__try
{
int nZero = 0;
int nError = 10 / nZero;
}
__except(UnhandledExceptionFilter(GetExceptionInformation()))
{
SERLOG0(g_Log, "Shit!");
}
exit(1);
}
int WINAPI ExceptionUserFunc(TCHAR* szBuffer, const int nBufferSize)
{
SERLOG0(g_Log, "Flush log");
SERLOG0(g_SessionLog, "Flush log");
CGameLog::GetInstance().Flush();
return _snprintf(szBuffer, nBufferSize, "Userdata flush completed.");
}
CString GetLocalIP()
{
CString ip = "";
char szHostName[256];
PHOSTENT pHostInfo;
WSADATA wsadata;
WSAStartup(WORD(2.0), &wsadata);
if( gethostname(szHostName,sizeof(szHostName)) ==0)
{
if((pHostInfo = gethostbyname(szHostName)) != NULL)
{
ip = inet_ntoa(*(struct in_addr *)*pHostInfo->h_addr_list);
}
}
WSACleanup();
return ip;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
// Mutex 설정
char szProgramName[MAX_PATH];
_snprintf(szProgramName, MAX_PATH - 1, "%s%02d%02d",
"RowGameServer",
CServerSetup::GetInstance().GetZoneFromCmdLine(),
CServerSetup::GetInstance().GetChannelFromCmdLine());
szProgramName[MAX_PATH - 1] = 0;
CNamedMutex Mutex(szProgramName, TRUE);
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
ERRLOG0(g_Log, "GameServer already operating now. please shutdown and restart");
return 0;
}
///////////////////////////////////////////////////////////////////////////////
// 바리케이트 처리
int iReturn = 0;
/* CDBComponent ClassifiedDB;
if(!ClassifiedDB.Connect(_T("10.21.45.2"), _T("NaveAUTH"), _T("edith"), _T("wkrdmstn0508"), OleDB::ConnType_MSSQL))
{
// ERRLOG0(g_Log, "GameServer not System. please shutdown and restart");
return 0;
}
char strIP[32];
sprintf(strIP, GetLocalIP().GetString());
char Query[512];
sprintf(Query, "dbo.AuthCode '%s', '%s'", "2809468e3cdcb9cd5c3a2b3a05d4b016", strIP);
if (!ClassifiedDB.ExecuteQueryGetData(Query, (void *)&iReturn))
{
// ERRLOG0(g_Log, "GameServer not System. please shutdown and restart");
return 0;
}
ClassifiedDB.DisconnectDataSource();
*/
///////////////////////////////////////////////////////////////////////////////
// 리턴값체크
if(iReturn == 1)
{
// ERRLOG0(g_Log, "GameServer not System. please shutdown and restart");
return 0;
}
else
{
// Exception 관련 설정
//_set_security_error_handler(stackoverrun_handler);
_set_purecall_handler(purecall_handler);
unsigned long dwExceptionFeatures = CExceptionReport::CATCH_EXCEPTION |
CExceptionReport::USE_MINIDUMP | CExceptionReport::USE_REPORT;
CExceptionReport::GetInstance().Enable(dwExceptionFeatures);
CExceptionReport::GetInstance().SetUserFunc(ExceptionUserFunc);
// MiniDumpWithFullMemory, MiniDumpNormal
CExceptionReport::GetInstance().SetDumpLevel(MiniDumpNormal);
// 게임서버 시작
CRylGameServer& GameServer = CRylGameServer::GetInstance();
char szWindowName[MAX_PATH];
sprintf(szWindowName, "Game Server Zone #%d Channel #%d",
CServerSetup::GetInstance().GetZoneFromCmdLine(), CServerSetup::GetInstance().GetChannelFromCmdLine());
if (GameServer.Initialize(hInstance, szWindowName, lpCmdLine, IDI_GAME_SERVER_ICON, IDR_GAME_SERVER_MENU))
{
GameServer.ProcessMessage();
}
}
return 0;
}

View File

@@ -0,0 +1,530 @@
#include "stdafx.h"
#include <Creature/CreatureManager.h>
#include <Creature/Character/Character.h>
#include <Creature/Character/CharRespawnMgr.h>
#include <Creature/Character/SphereTree/CharSphereTree.h>
#include <Creature/Monster/Monster.h>
#include <Creature/Siege/SiegeObjectMgr.h>
#include <Castle/CastleMgr.h>
#include <Map/FieldMap/Cell.h>
#include <Map/FieldMap/CellManager.h>
#include <Map/FieldMap/VirtualArea/VirtualAreaMgr.h>
#include <Map/DuelMap/DuelCellManager.h>
#include <Network/Session/Session.h>
#include <Network/Session/LimitUserByIP.h>
#include <Network/Dispatch/GameClient/GameClientDispatch.h>
#include <Network/Dispatch/GameClient/SendCharLoginOut.h>
#include <Network/Dispatch/DBAgent/DBAgentDispatch.h>
#include <Network/Dispatch/DBAgent/DBAgentPacketParse.h>
#include <Network/Dispatch/Chat/ChatDispatch.h>
#include <Network/Packet/PacketStruct/CharLoginOutPacketStruct.h>
#include <Network/Packet/PacketStruct/ServerInfo.h>
#include <Network/IOCP/IOCPNet.h>
#include <Quest/QuestMgr.h>
#include <GameTime/GameTimeMgr.h>
#include <Pattern/Command.h>
#include <Utility/Time/Pulse/Pulse.h>
#include <Log/GameLog.h>
#include <Skill/Spell/GlobalSpellMgr.h>
#include <Community/Party/PartyMgr.h>
#include <algorithm>
#include "mmsystem.h"
#include "RylGameServer.h"
#include "./Commands/DummyCharacters.h"
struct FnDisconnectCharacter
{
bool operator() (CCharacter* lpCharacter)
{
if (NULL != lpCharacter)
{
CGameClientDispatch* lpDispatch = lpCharacter->GetDispatcher();
if (NULL != lpDispatch)
{
lpDispatch->Disconnect();
}
}
return true;
}
};
struct FnRegenHPAndMP
{
bool operator() (CAggresiveCreature* lpAggresiveCreature)
{
if (NULL != lpAggresiveCreature)
{
lpAggresiveCreature->RegenHPAndMP(0, 0, true);
}
return true;
}
};
struct FnCSAuth
{
bool operator() (CCharacter* lpCharacter)
{
if (NULL != lpCharacter)
{
// edith 2009.08.11 게임가드 테스트
if (0 == lpCharacter->GetAdminLevel())
{
CGameClientDispatch* lpDispatch = lpCharacter->GetDispatcher();
if (NULL != lpDispatch)
{
/*
// edith 2009.08.11 게임가드 2.5 업그레이드
if (false == lpDispatch->IsAuth())
{
ERRLOG1(g_Log, "CID:0x%08x 게임 가드 인증 코드를 보내지않아 연결을 끊습니다.", lpCharacter->GetCID());
lpDispatch->Disconnect();
return true;
}
*/
GG_AUTH_DATA* lpAuthData = NULL;
if (false == lpDispatch->GetAuthQuery(&lpAuthData))
{
ERRLOG1(g_Log, "CID:0x%08x 게임 가드 인증 코드(2) 체크에 실패하여 연결을 끊습니다.", lpCharacter->GetCID());
lpDispatch->Disconnect();
return true;
}
// edith 2009.08.11 게임가드 2.5 업그레이드
// MessageBox(NULL, "게임가드 인증 시간 체크 결과", "GG", MB_OK);
return GameClientSendPacket::SendCSAuth(lpDispatch->GetSendStream(),
lpCharacter->GetCID(), lpDispatch->GetAuthCode(), lpAuthData, PktBase::NO_SERVER_ERR);
}
}
}
return true;
}
};
struct InstrumentInfo
{
InstrumentInfo(unsigned long dwIndex, char* szName) : m_dwIndex(dwIndex), m_szName(szName) { }
unsigned long m_dwIndex;
char* m_szName;
};
struct PrepareBroadcastData
{
void operator() (CCharacter* lpCharacter)
{ if(0 != lpCharacter) { lpCharacter->GetSerializeData().PrepareData(*lpCharacter); } }
void operator() (CMonster* lpMonster)
{ if(0 != lpMonster) { lpMonster->GetSerializeData().PrepareData(*lpMonster); } }
};
enum InstrumentsType
{
INSTRUMENT_TOTAL_LOOP,
INSTRUMENT_CHECK_DELETE_ITEM,
INSTRUMENT_REGEN_HP_MP,
INSTRUMENT_DBUPDATE,
INSTRUMENT_CELLBROADCASTING,
INSTRUMENT_GLOBALSPELLMGR,
INSTRUMENT_PROCESS_ALL_MONSTER,
INSTRUMENT_CHARACTER_LOGOUT,
INSTRUMENT_PROCESS_RESPAWN_QUEUE,
INSTRUMENT_AUTO_RESPAWN,
INSTRUMENT_VIRTUALAREA,
INSTRUMENT_RESPAWN,
INSTRUMENT_CHAR_SPHERE_TREE,
INSTRUMENT_WORLDWEAPON_FIRE,
MAX_PERFORMANCE_INSTRUMENTS
};
#define DECLARE_INSTRUMENT_INFO(name) InstrumentInfo(name, #name)
const InstrumentInfo g_InstrumentInfo[MAX_PERFORMANCE_INSTRUMENTS] =
{
DECLARE_INSTRUMENT_INFO(INSTRUMENT_TOTAL_LOOP),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_CHECK_DELETE_ITEM),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_REGEN_HP_MP),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_DBUPDATE),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_CELLBROADCASTING),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_GLOBALSPELLMGR),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_PROCESS_ALL_MONSTER),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_CHARACTER_LOGOUT),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_PROCESS_RESPAWN_QUEUE),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_AUTO_RESPAWN),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_VIRTUALAREA),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_RESPAWN),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_CHAR_SPHERE_TREE),
DECLARE_INSTRUMENT_INFO(INSTRUMENT_WORLDWEAPON_FIRE)
};
#define INSTRUMENT_GAMESERVER(object, name) PERFORMANCE_CHECK(CAutoInstrument (name)((object)[(name)]));
class CGameServerProcessThread : public CProcessThread
{
public:
enum
{
GAME_PROCESS_TICK = 100,
TICKS_PER_SECOND = 1000 / GAME_PROCESS_TICK
};
CGameServerProcessThread(CRylGameServer& RylGameServer);
virtual void InternalRun(CPulse& Pulse);
virtual void Cleanup(CPulse& Pulse);
private:
CRylGameServer& m_RylGameServer;
CCreatureManager& m_CreatureManager;
CCellManager& m_CellManager;
CDuelCellManager& m_DuelCellManager;
CGlobalSpellMgr& m_GlobalSpellMgr;
CGameLog& m_GameLog;
Castle::CCastleMgr& m_CastleMgr;
CSiegeObjectMgr& m_SiegeObjectMgr;
CCharRespawnMgr& m_CharRespawnMgr;
CCharSphereTree& m_CharSphereTree;
VirtualArea::CVirtualAreaMgr& m_VirtualAreaMgr;
CPerformanceInstrument m_Instruments[MAX_PERFORMANCE_INSTRUMENTS];
std::mem_fun_t<bool, CMonster> m_processMonster;
std::mem_fun_ref_t<void, CCell> m_processPrepareBroadCast;
std::mem_fun1_ref_t<void, CCell, unsigned long> m_processBroadCast;
};
bool CRylGameServer::AddGameProcessThread()
{
return AddProcessThread(new CGameServerProcessThread(*this));
}
CGameServerProcessThread::CGameServerProcessThread(CRylGameServer& RylGameServer)
: CProcessThread(RylGameServer, GAME_PROCESS_TICK),
m_RylGameServer(RylGameServer),
m_CreatureManager(CCreatureManager::GetInstance()),
m_CellManager(CCellManager::GetInstance()),
m_VirtualAreaMgr(VirtualArea::CVirtualAreaMgr::GetInstance()),
m_DuelCellManager(CDuelCellManager::GetInstance()),
m_GlobalSpellMgr(CGlobalSpellMgr::GetInstance()),
m_GameLog(CGameLog::GetInstance()),
m_CastleMgr(Castle::CCastleMgr::GetInstance()),
m_SiegeObjectMgr(CSiegeObjectMgr::GetInstance()),
m_processMonster(&CMonster::Process),
m_processPrepareBroadCast(&CCell::PrepareBroadCast),
m_processBroadCast(&CCell::BroadCast),
m_CharRespawnMgr(CCharRespawnMgr::GetInstance()),
m_CharSphereTree(CCharSphereTree::GetInstance())
{
for(unsigned int nCount = 0; nCount < MAX_PERFORMANCE_INSTRUMENTS; ++nCount)
{
m_Instruments[nCount].SetName(g_InstrumentInfo[nCount].m_szName);
}
}
void CGameServerProcessThread::Cleanup(CPulse& Pulse)
{
CLimitUserByIP* lpLimitByIP = m_RylGameServer.GetClientLimit();
if(0 != lpLimitByIP)
{
// 이제부터 접속 금지!
lpLimitByIP->OperateMode(CLimitUserByIP::DENY_ALL);
}
// 길드 요새 상점 정보 업데이트
m_SiegeObjectMgr.ProcessCampShopUpdate(true);
// 클라이언트 접속을 전부 끊고, DBAgent로 Logout을 보낸다.
m_CreatureManager.ProcessAllCharacter(FnDisconnectCharacter());
m_CreatureManager.ProcessAllCharacter(std::bind2nd(std::mem_fun1(&CCharacter::DBUpdateForce), DBUpdateData::LOGOUT));
GET_SINGLE_DISPATCH(lpDBAgentDispatch,
CDBAgentDispatch, CDBAgentDispatch::GetDispatchTable());
if(0 != lpDBAgentDispatch)
{
DBAgentPacketParse::SendServerLogout(*lpDBAgentDispatch);
SERLOG1(g_Log, "this:0x%p/try client logout process", this);
CIOCPNet* lpIOCPNet = m_RylGameServer.GetIOCPNet();
if(0 != lpIOCPNet)
{
// 10초간 대기.
unsigned long dwTotalWaitPulse = 10 * Pulse.GetTicksPerSec();
unsigned long dwStartPulse = Pulse.GetCurrentPulse();
// 서버 로그아웃을 받으면 중계 접속을 끊기 때문에, 중계 접속이 끊길때까지 루프를 돈다.
while(!CDBAgentDispatch::GetDispatchTable().IsEmpty() &&
dwTotalWaitPulse < Pulse.GetCurrentPulse() - dwStartPulse)
{
Pulse.CheckSleep();
lpIOCPNet->Process();
}
}
SERLOG2(g_Log, "this:0x%p/client logout process finish (%s)", this,
CDBAgentDispatch::GetDispatchTable().IsEmpty() ? "Finish complete" : "Timeout");
}
// 모든 크리쳐를 제거한다.
CCreatureManager::GetInstance().DestroyAll();
CDummyCharacterList::GetInstance().Destroy();
// 셀을 제거한다.
CCellManager::GetInstance().Destroy();
GetFunctionTimingResult("RowGameServer");
}
void CGameServerProcessThread::InternalRun(CPulse& Pulse)
{
unsigned long dwCurrentPulse = Pulse.GetCurrentPulse();
// 게임 로그 시간을 업데이트
m_GameLog.UpdateLogTime();
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_TOTAL_LOOP);
// 스펠(챈트&인챈트) 처리 (1초단위로 처리)
if (0 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_GLOBALSPELLMGR);
m_GlobalSpellMgr.Process();
}
// 일정 시간 단위로 맵에서 아이템을 지우는 처리
assert(1 < CCell::CHECK_TIME && "펄스 세팅에 문제가 있습니다.");
if (1 == (dwCurrentPulse % CCell::CHECK_TIME))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CHECK_DELETE_ITEM);
m_CellManager.ProcessAllCell(std::mem_fun_ref(&CCell::CheckDeleteItem));
m_VirtualAreaMgr.ProcessDeleteItem();
}
// 몬스터 처리 (0.2 초에 한번 처리)
if (1 == (dwCurrentPulse % 2))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_PROCESS_ALL_MONSTER);
m_CreatureManager.ProcessAllMonster(m_processMonster);
m_SiegeObjectMgr.ProcessAllSiegeObject();
m_VirtualAreaMgr.ProcessAllMonster();
}
// 몬스터와 플레이어의 Regen 처리
assert(2 < CAggresiveCreature::REGEN_TIME && "펄스 세팅에 문제가 있습니다.");
if (2 == (dwCurrentPulse % CAggresiveCreature::REGEN_TIME))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_REGEN_HP_MP);
m_CreatureManager.ProcessAllMonster(FnRegenHPAndMP());
m_CreatureManager.ProcessAllCharacter(FnRegenHPAndMP());
m_VirtualAreaMgr.ProcessMonsterRegenHPAndMP();
m_CastleMgr.ProcessEmblemRegenHPAndMP();
m_SiegeObjectMgr.ProcessCampRegenHPAndMP();
}
// 가상맵 처리
assert(2 < VirtualArea::CVirtualAreaMgr::VIRTUALAREA_PULSE && "펄스 세팅에 문제가 있습니다.");
if (2 == (dwCurrentPulse % VirtualArea::CVirtualAreaMgr::VIRTUALAREA_PULSE))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_VIRTUALAREA);
m_VirtualAreaMgr.ProcessAllVirtualArea();
}
// DBUpdate 처리
assert(3 < CCharacter::DBUPDATE_PULSE && "펄스 세팅에 문제가 있습니다.");
if (3 == (dwCurrentPulse % (CCharacter::DBUPDATE_PULSE)))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_DBUPDATE);
// 캐릭터 정보
m_CreatureManager.ProcessAllCharacter(
std::bind2nd(std::mem_fun1(&CCharacter::DBUpdate), DBUpdateData::UPDATE));
// 길드 요새 상점 정보
m_SiegeObjectMgr.ProcessCampShopUpdate(false);
}
// 캐릭터 로그아웃 처리, 소환 몬스터의 사망 처리
assert(3 < CCharacter::LOGOUT_PULSE && "펄스 세팅에 문제가 있습니다.");
if (3 == (dwCurrentPulse % CCharacter::LOGOUT_PULSE))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CHARACTER_LOGOUT);
m_CreatureManager.ProcessCharacterLogout();
m_CreatureManager.ProcessSummonMonsterDead();
m_VirtualAreaMgr.ProcessSummonMonsterDead();
}
// 공헌 메달 나눠주기
// 배틀 그라운드, 배틀 서버에서 잠자는 시체 자동 리스폰 처리
// 배틀 그라운드 석상 상태 처리 (전투 상태, 휴식 상태)
assert(3 < CCharacter::BATTLE_GROUND_PULSE && "펄스 세팅에 문제가 있습니다.");
if (3 == (dwCurrentPulse % CCharacter::BATTLE_GROUND_PULSE))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_AUTO_RESPAWN);
m_CreatureManager.ProcessBattleGround();
}
// 클라이언트 브로드 캐스팅
assert(4 < CCell::BROADCASTING_TIME && "펄스 세팅에 문제가 있습니다.");
if (4 == (dwCurrentPulse % CCell::BROADCASTING_TIME))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CELLBROADCASTING);
CCreatureManager::GetInstance().ProcessAllCharacter(PrepareBroadcastData());
CCreatureManager::GetInstance().ProcessAllMonster(PrepareBroadcastData());
m_CellManager.ProcessAllCell(m_processPrepareBroadCast);
m_CellManager.ProcessAllCell(m_processBroadCast, dwCurrentPulse);
m_DuelCellManager.ProcessAllCell(m_processPrepareBroadCast);
m_DuelCellManager.ProcessAllCell(m_processBroadCast, dwCurrentPulse);
m_VirtualAreaMgr.ProcessAllCellPrepareBroadCast();
m_VirtualAreaMgr.ProcessAllCellBroadCast(dwCurrentPulse);
m_SiegeObjectMgr.PrepareBroadCast();
m_SiegeObjectMgr.BroadCast();
}
// 리스폰 큐 프로세스 (1 초단위로 배틀그라운드만 적용)
assert(7 < (1 * TICKS_PER_SECOND) && "펄스 세팅에 문제가 있습니다.");
if (7 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
{
if (SERVER_ID::ZONE3 == CServerSetup::GetInstance().GetServerZone())
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_PROCESS_RESPAWN_QUEUE);
m_CreatureManager.ProcessRespawnQueue();
}
}
// 리스폰 프로세스 (1 초단위로)
assert(7 < (1 * TICKS_PER_SECOND) && "펄스 세팅에 문제가 있습니다.");
if (7 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
{
if (SERVER_ID::ZONE3 != CServerSetup::GetInstance().GetServerZone())
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_RESPAWN);
m_CharRespawnMgr.ProcessRespawn();
}
}
// 캐릭터 스피어 트리 갱신
assert(8 < (1 * TICKS_PER_SECOND) && "펄스 세팅에 문제가 있습니다.");
if (8 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CHAR_SPHERE_TREE);
m_CharSphereTree.Process();
}
// 1초 단위로 월드 웨폰 발사 처리
assert(9 < (1 * TICKS_PER_SECOND) && "펄스 세팅에 문제가 있습니다.");
if (9 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
{
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_WORLDWEAPON_FIRE);
m_SiegeObjectMgr.ProcessWorldWeaponFire();
}
// 3초단위로 파티 전부 돌면서 파티 정보 업데이트
if (0 == (dwCurrentPulse % (3 * TICKS_PER_SECOND)))
{
CPartyMgr::GetInstance().UpdatePartyData();
}
// 3초단위로 콘솔 정보 업데이트
if (0 == (dwCurrentPulse % (3 * TICKS_PER_SECOND)))
{
m_RylGameServer.PrintServerInfo();
m_RylGameServer.PrintStatistics();
}
// 2초 단위로 게임 시간 정보 업데이트
if (0 == (dwCurrentPulse % (2 *TICKS_PER_SECOND)))
{
CGameTimeMgr::GetInstance().UpdateGameTimeInfo();
}
// 퍼포먼스 로그 출력 (1시간에 한 번씩)
if (0 == (dwCurrentPulse % (60 * 60 * TICKS_PER_SECOND)))
{
GetFunctionTimingResult("RowGameServer");
}
// 연결 정보 세팅 (DB중계, 채팅)
if (0 == (dwCurrentPulse % (5 * TICKS_PER_SECOND)))
{
unsigned long dwStatusFlag = 0;
if(!CDBAgentDispatch::GetDispatchTable().IsEmpty())
{
dwStatusFlag |= (1 << CServerSetup::AgentServer);
}
if(!CChatDispatch::GetDispatchTable().IsEmpty())
{
dwStatusFlag |= (1 << CServerSetup::ChatServer);
}
m_RylGameServer.SetStatusFlag(dwStatusFlag);
}
#ifdef AUTH_MY
m_RylGameServer.Update( dwCurrentPulse );
#endif
#ifndef NO_GAMEGUARD
// 게임가드 인증 (3분에 한번씩)
if (0 == (dwCurrentPulse % (3 * 60 * TICKS_PER_SECOND)))
{
// edith 2009.08.11 게임가드 2.5 업그레이드
if (true == CServerSetup::GetInstance().GetHackCheck())
{
m_CreatureManager.ProcessAllCharacter(FnCSAuth());
}
}
#endif
// 퀘스트 처리.
CQuestMgr::GetInstance().ProcessPendingQuest();
/*
// 반응성을 높이기 위해서, 시간이 남으면 패킷 처리좀 더 해 준다.
CIOCPNet* lpIOCPNet = m_RylGameServer.GetIOCPNet();
if(0 != lpIOCPNet)
{
const unsigned long dwMinSleepTime = 10;
while(dwMinSleepTime < Pulse.GetRemainTime())
{
lpIOCPNet->Process();
}
}
*/
}

View File

@@ -0,0 +1,190 @@
#include "stdafx.h"
#include "Resource.h"
#include "RylGameServer.h"
#include <Log/ServerLog.h>
#include <Utility/ServerAppFramework/MsgProc/MsgProc.h>
#include <Utility/ServerAppFramework/ConsoleWindow/ConsoleWindow.h>
#include <Utility/ServerAppFramework/ConsoleWindow/ConsoleCMDFactory.h>
class CProcessCOMMAND : public CMsgProc
{
public:
CProcessCOMMAND(CConsoleWindow& ConsoleWindow) : m_ConsoleWindow(ConsoleWindow) { }
virtual ~CProcessCOMMAND() { }
virtual LRESULT operator () (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
char* szCommand = 0;
switch (LOWORD(wParam))
{
case ID_START_CONSOLE: m_ConsoleWindow.Initialize("RowGameServer"); break;
case ID_STOP_CONSOLE: m_ConsoleWindow.Destroy(); break;
case ID_SHOW_STATUS: szCommand = "pool"; break;
case ID_LOAD_SETTING: szCommand = "reloadsetup"; break;
case ID_START_SERVER: szCommand = "startall"; break;
case ID_CONNECT_ALL: szCommand = "connect"; break; }
if(0 != szCommand)
{
m_ConsoleWindow.GetCMDProcess().Add(
m_ConsoleWindow.GetConsoleCMDFactory().Create(szCommand, strlen(szCommand)));
}
if(LOWORD(wParam) == ID_SERVER_STOP)
{
DETLOG0(g_Log, "Terminate GameServer System Tray.");
PostMessage(hWnd, WM_QUIT, 0, 0);
}
return 0;
}
private:
CConsoleWindow& m_ConsoleWindow;
};
/*
class CProcessRYLGAME_AUTOSTART : public CMsgProc
{
public:
CProcessRYLGAME_AUTOSTART(CConsoleWindow& consoleWindow)
: m_ConsoleWindow(consoleWindow)
{
}
virtual ~CProcessRYLGAME_AUTOSTART() { }
virtual LRESULT operator () (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DETLOG0(g_Log, "AutoStart Started");
m_ConsoleWindow.GetCMDProcess().Add(
m_ConsoleWindow.GetConsoleCMDFactory().Create("startall", strlen("startall")));
return 0;
}
private:
CConsoleWindow& m_ConsoleWindow;
};
class CProcessGAME_CONNECTTOAGENT : public CMsgProc
{
public:
CProcessGAME_CONNECTTOAGENT(CConsoleWindow& consoleWindow)
: m_ConsoleWindow(consoleWindow)
{
}
virtual ~CProcessGAME_CONNECTTOAGENT() { }
virtual LRESULT operator () (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DETLOG0(g_Log, "관리툴의 요청으로 서버로 접속.");
m_ConsoleWindow.GetCMDProcess().Add(
m_ConsoleWindow.GetConsoleCMDFactory().Create("connect", strlen("connect")));
return 0;
}
private:
CConsoleWindow& m_ConsoleWindow;
};
class CProcessRYLGAME_QUIT : public CMsgProc
{
public:
virtual ~CProcessRYLGAME_QUIT() { }
virtual LRESULT operator () (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DETLOG0(g_Log, "관리툴에 의해서 게임 서버의 시스템 트레이를 종료합니다.");
SendMessage(hWnd, WM_COMMAND, ID_SERVER_STOP, 0);
return 0;
}
};
class CProcessCOPYDATA : public CMsgProc
{
public:
CProcessCOPYDATA(CConsoleWindow& consoleWindow)
: m_ConsoleWindow(consoleWindow)
{
}
virtual ~CProcessCOPYDATA() { }
virtual LRESULT operator () (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PCOPYDATASTRUCT lpCDStruct = reinterpret_cast<PCOPYDATASTRUCT>(lParam);
if(NULL != lpCDStruct)
{
char* szMessage = reinterpret_cast<MNGMSG_Notify*>(lpCDStruct->lpData)->m_Message;
size_t nMsgLen = strlen(szMessage);
szMessage[MNGMSG_Notify::MAX_NOTIFY_NUM - 1] = '\0';
m_ConsoleWindow.PrintOutput(szMessage, nMsgLen);
if (MNGMSGTYPE_NOTIFY == lpCDStruct->dwData)
{
m_ConsoleWindow.GetCMDProcess().Add(
m_ConsoleWindow.GetConsoleCMDFactory().Create(szMessage, nMsgLen));
}
}
return 0;
}
private:
CConsoleWindow& m_ConsoleWindow;
};
*/
bool CRylGameServer::InitializeMsgProc()
{
int nErrorCount = 0;
CMsgProcessMgr* lpMsgProcessMgr = GetMsgProcessMgr();
if(0 != lpMsgProcessMgr)
{
if(GetConsoleWindow())
{
nErrorCount += lpMsgProcessMgr->Register(WM_COMMAND,
new CProcessCOMMAND(*GetConsoleWindow())) ? 0 : 1;
/*
nErrorCount += lpMsgProcessMgr->Register(WM_RYLGAME_AUTOSTART,
new CProcessRYLGAME_AUTOSTART(*GetConsoleWindow())) ? 0 : 1;
nErrorCount += lpMsgProcessMgr->Register(WM_GAME_CONNECTTOAGENT,
new CProcessGAME_CONNECTTOAGENT(*GetConsoleWindow())) ? 0 : 1;
nErrorCount += lpMsgProcessMgr->Register(WM_COPYDATA,
new CProcessCOPYDATA(*GetConsoleWindow())) ? 0 : 1;
*/
}
/*
nErrorCount += lpMsgProcessMgr->Register(WM_RYLGAME_QUIT, new CProcessRYLGAME_QUIT) ? 0 : 1;
*/
}
return (0 == nErrorCount);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : 표준 포함 파일만 들어 있는 소스 파일입니다.
// RylGameServer.pch는 미리 컴파일된 헤더가 됩니다.
// stdafx.obj에는 미리 컴파일된 형식 정보가 포함됩니다.
#include "stdafx.h"
// TODO: 필요한 추가 헤더는
// 이 파일이 아닌 STDAFX.H에서 참조합니다.

View File

@@ -0,0 +1,33 @@
// stdafx.h : 잘 변경되지 않고 자주 사용하는
// 표준 시스템 포함 파일 및 프로젝트 관련 포함 파일이
// 들어 있는 포함 파일입니다.
//
#pragma once
#define WIN32_LEAN_AND_MEAN // 거의 사용되지 않는 내용은 Windows 헤더에서 제외합니다.
#pragma warning(disable:4800)
#include <winsock2.h>
#include <atltime.h> // 이거 여기다 안넣으면, time 관련 함수 호출시 스레드에서 에러남.
// Windows 헤더 파일입니다.
#include <windows.h>
// C의 런타임 헤더 파일입니다.
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
// TODO: 프로그램에 필요한 추가 헤더는 여기에서 참조합니다.
#ifdef _DEBUG
#define PERFORMANCE_CHECK(x) x
#else
#define PERFORMANCE_CHECK(x) x
#endif
// 기타
#include <Log/ServerLog.h>
#include <Utility/Debug/DebugMacros.h>
#include <Utility/Debug/ExceptionReport.h>
#include <Utility/Debug/PerformanceCheck.h>