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:
@@ -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;
|
||||
}
|
||||
|
||||
105
Server/RylServerProject/RylGameServer/Commands/Commands.h
Normal file
105
Server/RylServerProject/RylGameServer/Commands/Commands.h
Normal file
@@ -0,0 +1,105 @@
|
||||
#ifndef _RYL_GAME_CCOMMANDS_H_
|
||||
#define _RYL_GAME_CCOMMANDS_H_
|
||||
|
||||
#include <RylServerLibrary/Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߸<EFBFBD><DFB8><EFBFBD>.
|
||||
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;
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>۸<EFBFBD><DBB8><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>߸<EFBFBD><DFB8><EFBFBD>.
|
||||
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];
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>鿡<EFBFBD><E9BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>뷱<EFBFBD><EBB7B1> 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;
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ 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
|
||||
@@ -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 <20><><EFBFBD><EFBFBD> <20><><EFBFBD>õ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if (NULL != lpItem)
|
||||
{
|
||||
if (lpItem->IsSet(Item::DetailData::STACKABLE) && 0 == lpItem->GetNumOrDurability())
|
||||
{
|
||||
DELETE_ITEM(lpItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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 <20><><EFBFBD><EFBFBD> <20><><EFBFBD>õ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if (NULL != lpItem)
|
||||
{
|
||||
if (lpItem->IsSet(Item::DetailData::STACKABLE) && 0 == lpItem->GetNumOrDurability())
|
||||
{
|
||||
DELETE_ITEM(lpItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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<49><44><EFBFBD><EFBFBD> <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
Item::CItem* lpItem = Item::CItemFactory::GetInstance().CreateTempItem(
|
||||
equipmentData.m_usEquipments[nCount]);
|
||||
|
||||
if(0 != lpItem)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ȿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
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<4F><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.txt", CClass::Defender);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.txt", CClass::Warrior);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD>ؽ<EFBFBD>.txt", CClass::Assassin);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD>ó.txt", CClass::Archer);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5>Ҽ<EFBFBD><D2BC><EFBFBD>.txt", CClass::Sorcerer);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD>æ<EFBFBD><C3A6>.txt", CClass::Enchanter);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ.txt", CClass::Priest);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4>Ŭ<EFBFBD><C5AC><EFBFBD><EFBFBD>.txt", CClass::Cleric);
|
||||
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD>÷<EFBFBD>.txt", CClass::Templar);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD><EFBFBD>Ŀ.txt", CClass::Attacker);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5>ų<EFBFBD>.txt", CClass::Gunner);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.txt", CClass::RuneOff);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ<C4B4><D9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.txt", CClass::LifeOff);
|
||||
INSERT_CLASS_SET("./Dummies/<2F><><EFBFBD>Ĵٵ彦<D9B5><E5BDA6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.txt", CClass::ShadowOff);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD>͵<EFBFBD><CDB5><EFBFBD> <20>ε<EFBFBD><CEB5>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
return LoadDummyChars("./Dummies/ij<><C4B3><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD>.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)
|
||||
{ // <20><><EFBFBD><EFBFBD>
|
||||
equipmentData.m_usEquipments[Item::EquipmentPos::WEAPON_HAND1] =
|
||||
static_cast<unsigned short>(atoi(szToken));
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{ // <20><><EFBFBD><EFBFBD>
|
||||
equipmentData.m_usEquipments[Item::EquipmentPos::SHIELD_HAND1] =
|
||||
static_cast<unsigned short>(atoi(szToken));
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{ // <20><><EFBFBD><EFBFBD>
|
||||
equipmentData.m_usEquipments[Item::EquipmentPos::HELM] =
|
||||
static_cast<unsigned short>(atoi(szToken));
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{ // <20><><EFBFBD><EFBFBD>
|
||||
equipmentData.m_usEquipments[Item::EquipmentPos::ARMOUR] =
|
||||
static_cast<unsigned short>(atoi(szToken));
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{ // <20>尩
|
||||
equipmentData.m_usEquipments[Item::EquipmentPos::GLOVE] =
|
||||
static_cast<unsigned short>(atoi(szToken));
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{ // <20>Ź<EFBFBD>
|
||||
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))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD>.
|
||||
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)
|
||||
{
|
||||
// <20≯<EFBFBD>
|
||||
strncpy(charDBData.m_Info.Name, szToken, CHAR_INFOST::MAX_NAME_LEN);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
charDBData.m_Info.Level = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// Ŭ<><C5AC><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>
|
||||
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)
|
||||
{
|
||||
// <20>Ӹ<EFBFBD>Į
|
||||
charDBData.m_Info.Hair = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
charDBData.m_Info.Face = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
charDBData.m_Info.Sex = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// X<><58>ǥ
|
||||
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<><59>ǥ
|
||||
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<><5A>ǥ
|
||||
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)
|
||||
{
|
||||
// <20>ʰ<EFBFBD><CAB0><EFBFBD><EFBFBD>Ա<EFBFBD> <20><><EFBFBD><EFBFBD> (n<>ʴ<EFBFBD> <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
dummyData.m_dwDressChangeFreq = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// <20><><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD> <20><><EFBFBD><EFBFBD> (n<>ʴ<EFBFBD> <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
dummyData.m_dwAttackFreq = atoi(szToken);
|
||||
}
|
||||
|
||||
szToken = strtok(0, szDelimiter);
|
||||
if(0 != szToken)
|
||||
{
|
||||
// <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (n<>ʴ<EFBFBD> <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
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;
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
/*
|
||||
ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD>ε<EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD> -
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ȱ<EFBFBD><C8B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20≯<EFBFBD><CCB8><EFBFBD> <20>ٲپ <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>о<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>. default<6C><74> off<66>̴<EFBFBD>.
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ൿ - <20>ʰ<EFBFBD><CAB0><EFBFBD><EFBFBD>Ա<EFBFBD>. <20>չٲٱ<D9B2>. <20>̵<EFBFBD>. <20><><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD>.
|
||||
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
||||
- <20><><EFBFBD>ε<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>ÿ<EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>⺻ ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28≯<EFBFBD>, <20><><EFBFBD><EFBFBD>, Ŭ<><C5AC><EFBFBD><EFBFBD> <20><>)
|
||||
- <20><><EFBFBD><EFBFBD> <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>´<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>. (<28><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> itemUID. <20><EFBFBD>, <20><>ĭ <20><><EFBFBD><EFBFBD>.)
|
||||
- ij<><C4B3><EFBFBD>ͺ<EFBFBD> <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD>, <20>ʰ<EFBFBD><CAB0><EFBFBD><EFBFBD>Ա<EFBFBD> <20><><EFBFBD><EFBFBD>, <20>չٲٱ<D9B2> <20><><EFBFBD><EFBFBD>, <20>̵<EFBFBD> <20><> <20><><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
- ij<><C4B3><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> 100<30><30><EFBFBD><EFBFBD> 800<30><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB0AC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ʈ<><C6AE><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
1. <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20>´<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>о<EFBFBD><D0BE>´<EFBFBD>.
|
||||
2. <20><>¥ ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ´<D6B4>.
|
||||
3. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> 1<>ʿ<EFBFBD> 4<><34><EFBFBD><EFBFBD> <20><>¥ <20>̵<EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
4. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD>θ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD><CCB5><EFBFBD> <20><> <20><> <20>ְ<EFBFBD> <20>Ѵ<EFBFBD>. <20>̵<EFBFBD>ó<EFBFBD><C3B3> <20><> <20><>¥ <20>̵<EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
||||
5. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ְ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
6. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٲ<EFBFBD> <20><> <20>ְ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
7. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD> <20><> <20>ְ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
8. <20><>¥ ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֺ<EFBFBD><D6BA><EFBFBD> <20>ִ<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų(!) <20><> <20><> <20><> <20>ְ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CID/<2F≯<EFBFBD>/<2F><><EFBFBD><EFBFBD>/Ŭ<><C5AC><EFBFBD><EFBFBD>/<2F>Ӹ<EFBFBD>Į/<2F><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>/<2F>ʰ<EFBFBD><CAB0><EFBFBD><EFBFBD>Ա<EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD>ΰ<EFBFBD> : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>尩 <20>Ź<EFBFBD>
|
||||
<EFBFBD><EFBFBD>ĭ : <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>ŵ<EFBFBD>
|
||||
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
*/
|
||||
|
||||
// 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
|
||||
@@ -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("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.");
|
||||
}
|
||||
else
|
||||
{
|
||||
CRylGameServer::GetInstance().PrintOutput("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>.");
|
||||
}
|
||||
break;
|
||||
|
||||
case LOTTERY_EVENT_ON:
|
||||
LotteryEvent.Active();
|
||||
CRylGameServer::GetInstance().PrintOutput("<22><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
break;
|
||||
|
||||
case LOTTERY_EVENT_OFF:
|
||||
LotteryEvent.DeActive();
|
||||
CRylGameServer::GetInstance().PrintOutput("<22><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
break;
|
||||
|
||||
case ERROR_CMD:
|
||||
default:
|
||||
CRylGameServer::GetInstance().PrintOutput("<22>߸<EFBFBD><DFB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.");
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
// ù<><C3B9>° whitespace<63><65> <20><> <20><><EFBFBD><EFBFBD>.
|
||||
for (; nIndex < nCommandLength; ++nIndex)
|
||||
{
|
||||
if (0 == szCommand[nIndex] || ' ' == szCommand[nIndex] ||
|
||||
'\t' == szCommand[nIndex] || '\n' == szCommand[nIndex])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
++nIndex;
|
||||
|
||||
// whitespace<63><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
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, "[<5B><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD>] : %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;
|
||||
}
|
||||
291
Server/RylServerProject/RylGameServer/ManageGameObject.cpp
Normal file
291
Server/RylServerProject/RylGameServer/ManageGameObject.cpp
Normal 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 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
void Log(const char *szMsg, ... )
|
||||
{
|
||||
va_list marker;
|
||||
char szTmp[256] = {0,};
|
||||
|
||||
va_start( marker ,szMsg );
|
||||
vsprintf(szTmp,szMsg, marker);
|
||||
va_end( marker );
|
||||
|
||||
// DebugView <20><> <20><><EFBFBD>ؼ<EFBFBD> <20>α<CEB1> Ȯ<><C8AE> <20><> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
// 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(¤tTime);
|
||||
|
||||
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)
|
||||
{
|
||||
// <20>α<EFBFBD> <20≯<EFBFBD> <20>ʱ<EFBFBD>ȭ.
|
||||
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);
|
||||
|
||||
// <20><>Ŷ <20><><EFBFBD><EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
CPacketStatistics::GetInstance().SetUserMessageFunc(PrePerformanceMsg, 0);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
CPerformanceCheck::GetInstance().SetUserMessageFunc(PrePerformanceMsg, 0);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>α<EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
if (false == CGameLog::GetInstance().Initialize(szLogFilePrefixName))
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>α<CEB1> <20>ʱ<EFBFBD>ȭ<EFBFBD>ϴµ<CFB4> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
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, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ռ<EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
if (false == Item::CItemMgr::GetInstance().LoadItemChemical())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ռ<EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
if (false == Item::CItemMgr::GetInstance().LoadItemSpeacialCompensation())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><>ų <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
if (false == CSkillMgr::GetInstance().LoadSkillsFromFile())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD>ų <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><>ų <20><><EFBFBD>̺<EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
if (false == Skill::CProcessTable::GetInstance().Initialize())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD>ų ó<><C3B3> <20><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD> <20>ʱ<EFBFBD>ȭ <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ <20>ʱ<EFBFBD>ȭ
|
||||
if (false == CGameEventMgr::GetInstance().Initialize())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
if (false == CCharRespawnMgr::GetInstance().LoadRespawnFromFile())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (false == Filter::InitFilter())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD≯<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><> <20>ε<EFBFBD>
|
||||
CCellManager& CellManager = CCellManager::GetInstance();
|
||||
|
||||
if (false == CellManager.LoadComplete())
|
||||
{
|
||||
CellManager.Load();
|
||||
CellManager.SetMoving(true);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><>ġ <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε<EFBFBD>
|
||||
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, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε忡 <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ʱ<EFBFBD>ȭ - <20><> <20>ε<EFBFBD><CEB5>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><> <20>ε<EFBFBD>
|
||||
if (false == CMonsterShout::GetInstance().LoadScript())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ε忡 <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20>Ǿƽĺ<C6BD> <20><> <20>ʱ<EFBFBD>ȭ
|
||||
if (false == EnemyCheck::CCheckTable::GetInstance().Initialize())
|
||||
{
|
||||
ERRLOG0(g_Log, "<EFBFBD>Ǿƽĺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD>ϴµ<CFB4> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
// edith 2009.08.11 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
/*
|
||||
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 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
// 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>Լ<EFBFBD> : 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. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>Լ<EFBFBD> : 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. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD> : 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
|
||||
}
|
||||
@@ -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); // ij<><C4B3><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD>
|
||||
AddDispatch(CmdCharLogout, ParseCharLogout); // ij<><C4B3><EFBFBD><EFBFBD> <20>αƿ<D7BE>
|
||||
AddDispatch(CmdCharMoveZone, ParseCharMoveZone); // ij<><C4B3><EFBFBD><EFBFBD> <20><> <20>̵<EFBFBD>
|
||||
AddDispatch(CmdServerZone, ParseServerZone); // ij<><C4B3><EFBFBD><EFBFBD> <20><> <20>̵<EFBFBD>
|
||||
AddDispatch(CmdCSAuth, ParseCSAuth); // <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
}
|
||||
|
||||
|
||||
CFieldGameClientDispatch::CFieldGameClientDispatch(CSession& Session)
|
||||
: CGameClientDispatch(Session, CFieldGameClientDispatchTable::GetInstance())
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef _SEND_GAME_SERVER_PACKET_H_
|
||||
#define _SEND_GAME_SERVER_PACKET_H_
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CSendStream;
|
||||
|
||||
namespace GameServerSendPacket
|
||||
{
|
||||
|
||||
bool SendUpdateAddressAck(CSendStream& SendStream, unsigned long dwCID,
|
||||
const SOCKADDR_IN& PublicAddr, const SOCKADDR_IN& PrivateAddr);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
26
Server/RylServerProject/RylGameServer/Resource.h
Normal file
26
Server/RylServerProject/RylGameServer/Resource.h
Normal 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
|
||||
478
Server/RylServerProject/RylGameServer/RylGameServer.cpp
Normal file
478
Server/RylServerProject/RylGameServer/RylGameServer.cpp
Normal 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 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
//#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())
|
||||
{
|
||||
// <20><><EFBFBD>ӿ<EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><> <20><>ũ<EFBFBD><C5A9>Ʈ <20>ʱ<EFBFBD>ȭ
|
||||
szErrorMessage = "RowGameServer initialize failed : Gameobjects load failed";
|
||||
}
|
||||
else if (!AddGameProcessThread())
|
||||
{
|
||||
szErrorMessage = "RowGameServer initialize failed : Add game process thread failed";
|
||||
}
|
||||
|
||||
// <20><>Ʋ<EFBFBD><EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20>߰輭<DFB0><E8BCAD> DB<44><42> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
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)
|
||||
{
|
||||
// <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD> <20><>Ÿ <20>ٸ<EFBFBD> <20>ൿ<EFBFBD><E0B5BF> <20>ϴ<EFBFBD><CFB4><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
CPacketEvent::EventCMD(dwCmd, dwValue);
|
||||
|
||||
switch(dwCmd)
|
||||
{
|
||||
case SC_IPLISTEND:
|
||||
m_Counter = 62;
|
||||
break;
|
||||
|
||||
case SC_SHUTDOWN: // <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
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<44><35><EFBFBD><EFBFBD>
|
||||
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<>ʿ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD>
|
||||
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<31><30> <20><><EFBFBD>ӽõ<D3BD><C3B5>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
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;
|
||||
|
||||
// <20><><EFBFBD>ӿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IPList<73><74> <20><>û<EFBFBD>Ѵ<EFBFBD>.
|
||||
// g_NetAuth.Send_CMD(CS_IPLIST, 0);
|
||||
m_Counter = 62;
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_Counter == 62)
|
||||
{
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ư<><C6AF><EFBFBD><EFBFBD> <20>ൿ<EFBFBD><E0B5BF> <20>Ѵ<EFBFBD>.
|
||||
m_Counter = 63;
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_Counter == 63)
|
||||
{
|
||||
iConnectTick = 0;
|
||||
m_Counter = 0;
|
||||
g_NetAuth.Disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
if(iExitLoopCount >= 20)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 60<36>ʿ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD>
|
||||
if(0 == dwTick % (60 * 10))
|
||||
{
|
||||
// 1<>п<EFBFBD> 1<><31> <20><><EFBFBD><EFBFBD>
|
||||
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())
|
||||
{
|
||||
// <20><>Ʋ<EFBFBD><EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4>. (ȯ<><C8AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
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)
|
||||
{
|
||||
// <20>¾<EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
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 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
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");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
75
Server/RylServerProject/RylGameServer/RylGameServer.h
Normal file
75
Server/RylServerProject/RylGameServer/RylGameServer.h
Normal 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<64><73><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>ϴ<EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD>.
|
||||
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
|
||||
BIN
Server/RylServerProject/RylGameServer/RylGameServer.ico
Normal file
BIN
Server/RylServerProject/RylGameServer/RylGameServer.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
151
Server/RylServerProject/RylGameServer/RylGameServer.rc
Normal file
151
Server/RylServerProject/RylGameServer/RylGameServer.rc
Normal 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
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>߸<EFBFBD> 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 // <20>߸<EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ѱ<EFBFBD><D1B1><EFBFBD> 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 // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
417
Server/RylServerProject/RylGameServer/RylGameServer.vcproj
Normal file
417
Server/RylServerProject/RylGameServer/RylGameServer.vcproj
Normal 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="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
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="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
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="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
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>
|
||||
347
Server/RylServerProject/RylGameServer/RylGameServer.vcxproj
Normal file
347
Server/RylServerProject/RylGameServer/RylGameServer.vcxproj
Normal 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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1,5 @@
|
||||
[Ty-ERR][Tm-2011-09-13 17:13:44][Ex-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.][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-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.][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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1,5 @@
|
||||
[Ty-ERR][Tm-2011-09-13 17:13:55][Ex-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.][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-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.][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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1,5 @@
|
||||
[Ty-ERR][Tm-2011-09-13 17:14:29][Ex-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.][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-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.][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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -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][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -0,0 +1 @@
|
||||
[Ty-NOR][<5B>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.]
|
||||
@@ -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)
|
||||
|
||||
|
||||
231
Server/RylServerProject/RylGameServer/RylGameServerCommands.cpp
Normal file
231
Server/RylServerProject/RylGameServer/RylGameServerCommands.cpp
Normal 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;
|
||||
}
|
||||
170
Server/RylServerProject/RylGameServer/RylGameServerMain.cpp
Normal file
170
Server/RylServerProject/RylGameServer/RylGameServerMain.cpp
Normal 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.");
|
||||
|
||||
// <20>Ϻη<CFBA> Exception<6F><6E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
__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.");
|
||||
|
||||
// <20>Ϻη<CFBA> Exception<6F><6E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
__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 <20><><EFBFBD><EFBFBD>
|
||||
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;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ٸ<EFBFBD><D9B8><EFBFBD><EFBFBD><EFBFBD>Ʈ ó<><C3B3>
|
||||
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();
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD>ϰ<EFBFBD>üũ
|
||||
if(iReturn == 1)
|
||||
{
|
||||
// ERRLOG0(g_Log, "GameServer not System. please shutdown and restart");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Exception <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//_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);
|
||||
|
||||
// <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
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;
|
||||
}
|
||||
|
||||
530
Server/RylServerProject/RylGameServer/RylGameServerMainLoop.cpp
Normal file
530
Server/RylServerProject/RylGameServer/RylGameServerMainLoop.cpp
Normal 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 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> <20><EFBFBD>Ʈ
|
||||
if (0 == lpCharacter->GetAdminLevel())
|
||||
{
|
||||
CGameClientDispatch* lpDispatch = lpCharacter->GetDispatcher();
|
||||
if (NULL != lpDispatch)
|
||||
{
|
||||
/*
|
||||
// edith 2009.08.11 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
if (false == lpDispatch->IsAuth())
|
||||
{
|
||||
ERRLOG1(g_Log, "CID:0x%08x <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.", lpCharacter->GetCID());
|
||||
lpDispatch->Disconnect();
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
GG_AUTH_DATA* lpAuthData = NULL;
|
||||
if (false == lpDispatch->GetAuthQuery(&lpAuthData))
|
||||
{
|
||||
ERRLOG1(g_Log, "CID:0x%08x <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>(2) üũ<C3BC><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.", lpCharacter->GetCID());
|
||||
lpDispatch->Disconnect();
|
||||
return true;
|
||||
}
|
||||
|
||||
// edith 2009.08.11 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
// MessageBox(NULL, "<22><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> üũ <20><><EFBFBD><EFBFBD>", "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)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>!
|
||||
lpLimitByIP->OperateMode(CLimitUserByIP::DENY_ALL);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
m_SiegeObjectMgr.ProcessCampShopUpdate(true);
|
||||
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, DBAgent<6E><74> Logout<75><74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
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<31>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
unsigned long dwTotalWaitPulse = 10 * Pulse.GetTicksPerSec();
|
||||
unsigned long dwStartPulse = Pulse.GetCurrentPulse();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>αƿ<D7BE><C6BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>涧<EFBFBD><E6B6A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
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");
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD>ĸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
CCreatureManager::GetInstance().DestroyAll();
|
||||
CDummyCharacterList::GetInstance().Destroy();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
CCellManager::GetInstance().Destroy();
|
||||
|
||||
GetFunctionTimingResult("RowGameServer");
|
||||
}
|
||||
|
||||
void CGameServerProcessThread::InternalRun(CPulse& Pulse)
|
||||
{
|
||||
unsigned long dwCurrentPulse = Pulse.GetCurrentPulse();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>α<EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
m_GameLog.UpdateLogTime();
|
||||
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_TOTAL_LOOP);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>(æƮ&<26><>æƮ) ó<><C3B3> (1<>ʴ<EFBFBD><CAB4><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>)
|
||||
if (0 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_GLOBALSPELLMGR);
|
||||
m_GlobalSpellMgr.Process();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
assert(1 < CCell::CHECK_TIME && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
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();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3> (0.2 <20>ʿ<EFBFBD> <20>ѹ<EFBFBD> ó<><C3B3>)
|
||||
if (1 == (dwCurrentPulse % 2))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_PROCESS_ALL_MONSTER);
|
||||
m_CreatureManager.ProcessAllMonster(m_processMonster);
|
||||
m_SiegeObjectMgr.ProcessAllSiegeObject();
|
||||
|
||||
m_VirtualAreaMgr.ProcessAllMonster();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> Regen ó<><C3B3>
|
||||
assert(2 < CAggresiveCreature::REGEN_TIME && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
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();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
assert(2 < VirtualArea::CVirtualAreaMgr::VIRTUALAREA_PULSE && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (2 == (dwCurrentPulse % VirtualArea::CVirtualAreaMgr::VIRTUALAREA_PULSE))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_VIRTUALAREA);
|
||||
m_VirtualAreaMgr.ProcessAllVirtualArea();
|
||||
}
|
||||
|
||||
// DBUpdate ó<><C3B3>
|
||||
assert(3 < CCharacter::DBUPDATE_PULSE && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (3 == (dwCurrentPulse % (CCharacter::DBUPDATE_PULSE)))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_DBUPDATE);
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
m_CreatureManager.ProcessAllCharacter(
|
||||
std::bind2nd(std::mem_fun1(&CCharacter::DBUpdate), DBUpdateData::UPDATE));
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
m_SiegeObjectMgr.ProcessCampShopUpdate(false);
|
||||
}
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20>αƿ<D7BE> ó<><C3B3>, <20><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
assert(3 < CCharacter::LOGOUT_PULSE && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (3 == (dwCurrentPulse % CCharacter::LOGOUT_PULSE))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CHARACTER_LOGOUT);
|
||||
|
||||
m_CreatureManager.ProcessCharacterLogout();
|
||||
m_CreatureManager.ProcessSummonMonsterDead();
|
||||
|
||||
m_VirtualAreaMgr.ProcessSummonMonsterDead();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
|
||||
// <20><>Ʋ <20><EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʋ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ڴ<EFBFBD> <20><>ü <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
// <20><>Ʋ <20><EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
assert(3 < CCharacter::BATTLE_GROUND_PULSE && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (3 == (dwCurrentPulse % CCharacter::BATTLE_GROUND_PULSE))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_AUTO_RESPAWN);
|
||||
m_CreatureManager.ProcessBattleGround();
|
||||
}
|
||||
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20><><EFBFBD>ε<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD>
|
||||
assert(4 < CCell::BROADCASTING_TIME && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
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();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ť <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> (1 <20>ʴ<EFBFBD><CAB4><EFBFBD><EFBFBD><EFBFBD> <20><>Ʋ<EFBFBD><EFBFBD><D7B6><EFBFBD><EFBFBD>常 <20><><EFBFBD><EFBFBD>)
|
||||
assert(7 < (1 * TICKS_PER_SECOND) && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> (1 <20>ʴ<EFBFBD><CAB4><EFBFBD><EFBFBD><EFBFBD>)
|
||||
assert(7 < (1 * TICKS_PER_SECOND) && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (7 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
|
||||
{
|
||||
if (SERVER_ID::ZONE3 != CServerSetup::GetInstance().GetServerZone())
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_RESPAWN);
|
||||
m_CharRespawnMgr.ProcessRespawn();
|
||||
}
|
||||
}
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD>Ǿ<EFBFBD> Ʈ<><C6AE> <20><><EFBFBD><EFBFBD>
|
||||
assert(8 < (1 * TICKS_PER_SECOND) && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (8 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_CHAR_SPHERE_TREE);
|
||||
m_CharSphereTree.Process();
|
||||
}
|
||||
|
||||
// 1<><31> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3>
|
||||
assert(9 < (1 * TICKS_PER_SECOND) && "<EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
if (9 == (dwCurrentPulse % (1 * TICKS_PER_SECOND)))
|
||||
{
|
||||
INSTRUMENT_GAMESERVER(m_Instruments, INSTRUMENT_WORLDWEAPON_FIRE);
|
||||
m_SiegeObjectMgr.ProcessWorldWeaponFire();
|
||||
}
|
||||
|
||||
// 3<>ʴ<EFBFBD><CAB4><EFBFBD><EFBFBD><EFBFBD> <20><>Ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>鼭 <20><>Ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
if (0 == (dwCurrentPulse % (3 * TICKS_PER_SECOND)))
|
||||
{
|
||||
CPartyMgr::GetInstance().UpdatePartyData();
|
||||
}
|
||||
|
||||
// 3<>ʴ<EFBFBD><CAB4><EFBFBD><EFBFBD><EFBFBD> <20>ܼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
if (0 == (dwCurrentPulse % (3 * TICKS_PER_SECOND)))
|
||||
{
|
||||
m_RylGameServer.PrintServerInfo();
|
||||
m_RylGameServer.PrintStatistics();
|
||||
}
|
||||
|
||||
// 2<><32> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
if (0 == (dwCurrentPulse % (2 *TICKS_PER_SECOND)))
|
||||
{
|
||||
CGameTimeMgr::GetInstance().UpdateGameTimeInfo();
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD> (1<>ð<EFBFBD><C3B0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>)
|
||||
if (0 == (dwCurrentPulse % (60 * 60 * TICKS_PER_SECOND)))
|
||||
{
|
||||
GetFunctionTimingResult("RowGameServer");
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (DB<44>߰<EFBFBD>, ä<><C3A4>)
|
||||
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
|
||||
// <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> <20><><EFBFBD><EFBFBD> (3<>п<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD>)
|
||||
if (0 == (dwCurrentPulse % (3 * 60 * TICKS_PER_SECOND)))
|
||||
{
|
||||
// edith 2009.08.11 <20><><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD> 2.5 <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
if (true == CServerSetup::GetInstance().GetHackCheck())
|
||||
{
|
||||
m_CreatureManager.ProcessAllCharacter(FnCSAuth());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>Ʈ ó<><C3B3>.
|
||||
CQuestMgr::GetInstance().ProcessPendingQuest();
|
||||
|
||||
/*
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̱<EFBFBD> <20><><EFBFBD>ؼ<EFBFBD>, <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ ó<><C3B3><EFBFBD><EFBFBD> <20><> <20><> <20>ش<EFBFBD>.
|
||||
CIOCPNet* lpIOCPNet = m_RylGameServer.GetIOCPNet();
|
||||
if(0 != lpIOCPNet)
|
||||
{
|
||||
const unsigned long dwMinSleepTime = 10;
|
||||
while(dwMinSleepTime < Pulse.GetRemainTime())
|
||||
{
|
||||
lpIOCPNet->Process();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
190
Server/RylServerProject/RylGameServer/RylGameServerWindow.cpp
Normal file
190
Server/RylServerProject/RylGameServer/RylGameServerWindow.cpp
Normal 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, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.");
|
||||
|
||||
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, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ý<EFBFBD><C3BD><EFBFBD> Ʈ<><C6AE><EFBFBD≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.");
|
||||
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);
|
||||
}
|
||||
|
||||
BIN
Server/RylServerProject/RylGameServer/small.ico
Normal file
BIN
Server/RylServerProject/RylGameServer/small.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
8
Server/RylServerProject/RylGameServer/stdafx.cpp
Normal file
8
Server/RylServerProject/RylGameServer/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// RylGameServer.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> STDAFX.H<><48><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
33
Server/RylServerProject/RylGameServer/stdafx.h
Normal file
33
Server/RylServerProject/RylGameServer/stdafx.h
Normal file
@@ -0,0 +1,33 @@
|
||||
// stdafx.h : <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#pragma warning(disable:4800)
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <atltime.h> // <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD><EFBFBD>, time <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>忡<EFBFBD><E5BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
// Windows <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <windows.h>
|
||||
// C<><43> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
|
||||
// TODO: <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#ifdef _DEBUG
|
||||
#define PERFORMANCE_CHECK(x) x
|
||||
#else
|
||||
#define PERFORMANCE_CHECK(x) x
|
||||
#endif
|
||||
|
||||
// <20><>Ÿ
|
||||
#include <Log/ServerLog.h>
|
||||
#include <Utility/Debug/DebugMacros.h>
|
||||
#include <Utility/Debug/ExceptionReport.h>
|
||||
#include <Utility/Debug/PerformanceCheck.h>
|
||||
Reference in New Issue
Block a user