Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
94
.gitignore
vendored
Normal file
94
.gitignore
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
# Visual Studio build artifacts
|
||||
*.obj
|
||||
*.pdb
|
||||
*.idb
|
||||
*.ilk
|
||||
*.exp
|
||||
*.lib
|
||||
*.dll
|
||||
*.exe
|
||||
*.pch
|
||||
*.ipch
|
||||
*.suo
|
||||
*.user
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.ncb
|
||||
*.aps
|
||||
*.sbr
|
||||
*.bsc
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Build directories
|
||||
[Dd]ebug/
|
||||
[Dd]ebug_MY/
|
||||
[Rr]elease/
|
||||
[Rr]elease_NoGD/
|
||||
[Rr]elease_MY/
|
||||
x64/
|
||||
x86/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
ipch/
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Intermediate directories
|
||||
Intermediate/
|
||||
BuildLog.htm
|
||||
|
||||
# ReSharper
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio cache files
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio Code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
**/packages/*
|
||||
!**/packages/build/
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Game-specific (keep documentation)
|
||||
!claudedocs/
|
||||
219
Client/CLAUDE.md
Normal file
219
Client/CLAUDE.md
Normal file
@@ -0,0 +1,219 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is the NeoRylClient, a C++ MMORPG game client built with Visual Studio 2010 using DirectX for graphics rendering. The codebase follows a component-based architecture with clear separation between game logic, networking, UI, and rendering systems.
|
||||
|
||||
## Build System
|
||||
|
||||
### Building the Project
|
||||
|
||||
Use Visual Studio 2010 or later to build this project:
|
||||
|
||||
```bash
|
||||
# Open the solution
|
||||
devenv NeoRylClient.sln
|
||||
|
||||
# Build from command line (if MSBuild is available)
|
||||
msbuild NeoRylClient.sln /p:Configuration=Debug /p:Platform=Win32
|
||||
msbuild NeoRylClient.sln /p:Configuration=Release /p:Platform=Win32
|
||||
```
|
||||
|
||||
### Build Configurations
|
||||
|
||||
- **Debug**: Standard debug build with full debugging symbols
|
||||
- **Debug_MY**: Custom debug configuration (outputs to `D:\Navezine\ROWTest_MY\`)
|
||||
- **Release**: Standard release build (outputs to `../../../Game/`)
|
||||
- **Release_NoGD**: Release build without GameGuard (outputs to `../../Executable/Release_NoGD\`)
|
||||
- **Release_MY**: Custom release configuration
|
||||
|
||||
### Project Dependencies
|
||||
|
||||
The solution builds in this order:
|
||||
1. MemoryManager (custom memory management)
|
||||
2. Caldron (core engine utilities)
|
||||
3. CrossM (cross-platform compatibility layer)
|
||||
4. Effect (visual effects system)
|
||||
5. SoundLib (audio system)
|
||||
6. Zalla3D Base Class (3D engine foundation)
|
||||
7. Zalla3D Scene Class (3D scene management)
|
||||
8. CharacterActionControl (character animation and control)
|
||||
9. GlobalScript (game logic and network layer)
|
||||
10. ScriptEngine (custom scripting language VM)
|
||||
11. LUA (Lua scripting support)
|
||||
12. NeoRylClient (main game client)
|
||||
|
||||
## Architecture
|
||||
|
||||
### Core Systems
|
||||
|
||||
**Network Layer** (`GlobalScript/Network/`):
|
||||
- Client-server communication using custom networking framework
|
||||
- `ClientNet::CClientEventHandler` base class for event handling
|
||||
- `AuthHandler`: Handles authentication server communication
|
||||
- `GameHandler`: Event-driven game server communication with command registration system
|
||||
- `UDPHandler`: UDP-based communication for real-time updates
|
||||
- Packet-based protocol with `PktBase` as the base packet structure
|
||||
|
||||
**Event Processing** (`RYLClient/EventHandler/GameProcess/`):
|
||||
- Domain-specific event processors organized by game feature
|
||||
- `GameProcess` namespace contains specialized processors:
|
||||
- `LoginoutProcess`: Character login/logout handling
|
||||
- `CharInfoProcess`: Character information updates
|
||||
- `FightProcess`: Combat system events
|
||||
- `ItemProcess`: Item management events
|
||||
- `SkillProcess`: Skill system events
|
||||
- `ChatProcess`: Chat and communication
|
||||
- `QuestProcess`: Quest system
|
||||
- `MoveProcess`: Character movement
|
||||
- `CastleProcess`: Castle/siege warfare
|
||||
- `BattleGroundClientProcess`: Battleground PvP events
|
||||
- `BroadcastProcess`: Server broadcasts
|
||||
- `CommunityProcess`: Guild and social features
|
||||
|
||||
**Scene Management** (`RYLClient/RYLClient/`):
|
||||
- `CRYLSceneManager`: Central scene coordinator
|
||||
- Scene hierarchy:
|
||||
- `RYLIntroScene`: Game startup/intro
|
||||
- `RYLLoginScene`: Login screen
|
||||
- `RYLRaceSelectScene`: Race/class selection
|
||||
- `RYLCharacterSelectScene`: Character selection
|
||||
- `RYLGameScene`: Main gameplay scene
|
||||
- `RYLLoadingScene`: Loading screens between scenes
|
||||
|
||||
**UI System** (`RYLClient/RYLUI/`):
|
||||
- Custom UI framework built on GM (Game Management) base classes
|
||||
- Component hierarchy: `GMUIObject` → specialized UI controls
|
||||
- UI Controls: Button, CheckBox, ComboBox, ListBox, Label, Edit, TabButton, Dialog
|
||||
- Custom extensions: `RYLButton`, `RYLDialog`, `RYLMessageBox`, `RYLImageManager`
|
||||
- `RYLTextureManager`: Manages UI textures and sprites
|
||||
- `RYLImageCabinet`: Centralized image resource management
|
||||
|
||||
**Character System** (`CharacterActionControl/`):
|
||||
- `RYLCreatureManager`: Manages all entities (players, NPCs, monsters)
|
||||
- `RYLCreature`: Base entity class with rendering and animation
|
||||
- `RYLCharacterControl`: Player character control and input handling
|
||||
- Specialized controls for different weapon types and combat modes
|
||||
- `CameraControl`: Camera system with scripting support
|
||||
|
||||
**Script Engine** (`ScriptEngine/`):
|
||||
- Custom scripting language VM with compiler toolchain
|
||||
- Flex/Bison-based parser (`string.l`, `string.y`)
|
||||
- Intermediate code generation and virtual machine execution
|
||||
- Symbol table, syntax tree, and relocation table support
|
||||
- Used for game logic scripting alongside Lua
|
||||
|
||||
**Game Data Management**:
|
||||
- `CRYLGameData`: Central game state and data manager
|
||||
- `CRYLNetworkData`: Network state management
|
||||
- `CRYLCommunityData`: Social features data (guild, friends, etc.)
|
||||
- `CCharStatus`: Character stats and attributes
|
||||
- `CRYLCastleManager` / `CRYLCampManager`: Territory control systems
|
||||
- `CRYLSkillScriptMgr`: Lua-based skill scripting
|
||||
|
||||
### Key Design Patterns
|
||||
|
||||
**Event-Driven Network Architecture**:
|
||||
- Game server events use a registration system in `CGameEventHandler`
|
||||
- Register handlers with `AddHandler(commandId, functionPointer, ignoreStatusMask)`
|
||||
- Events dispatched through `OnDispatch()` to registered function pointers
|
||||
- Each event function signature: `bool EventFunc(CClientEventHandler*, PktBase*)`
|
||||
|
||||
**Manager Pattern**:
|
||||
- Multiple manager classes coordinate subsystems (Scene, Creature, Texture, Castle, Camp, Notice)
|
||||
- Managers are owned by `CClientMain` and accessed globally
|
||||
|
||||
**Namespace Organization**:
|
||||
- `ClientNet`: Network layer abstractions
|
||||
- `GameProcess`: Game event processing logic
|
||||
- `Skill`, `Item`: Domain-specific data structures
|
||||
- `DbgUtils`: Debug utilities
|
||||
- `GameClientLog`: Logging functionality
|
||||
|
||||
## Working with the Codebase
|
||||
|
||||
### Adding Network Event Handlers
|
||||
|
||||
Event handlers are registered in `GameHandler` during initialization:
|
||||
|
||||
```cpp
|
||||
// In game initialization
|
||||
pGameHandler->AddHandler(CMD_YOUR_EVENT, &YourEventFunction);
|
||||
|
||||
// Event function in appropriate GameProcess file
|
||||
namespace GameProcess {
|
||||
GAME_EVENT_FUNC(YourEventFunction) {
|
||||
// Extract packet data
|
||||
// Update game state
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### UI Development
|
||||
|
||||
UI dialogs inherit from `RYLDialog` and use the component system:
|
||||
|
||||
```cpp
|
||||
class CYourDialog : public CRYLDialog {
|
||||
RYLButton* m_pButton;
|
||||
RYLLabel* m_pLabel;
|
||||
|
||||
void InitControls();
|
||||
void OnButtonClick();
|
||||
};
|
||||
```
|
||||
|
||||
UI resources are managed through `RYLTextureManager` and loaded from image files.
|
||||
|
||||
### Character/Entity Management
|
||||
|
||||
All visible entities go through `RYLCreatureManager`:
|
||||
- Creates and destroys creature instances
|
||||
- Updates position, animation, and rendering
|
||||
- Handles entity lifecycle and cleanup
|
||||
|
||||
### Scene Transitions
|
||||
|
||||
Scene changes flow through `CRYLSceneManager`:
|
||||
- Properly cleanup current scene before transition
|
||||
- Initialize new scene resources
|
||||
- Handle loading screens for resource-intensive transitions
|
||||
|
||||
## Code Conventions
|
||||
|
||||
- **Character Set**: MultiByte (not Unicode)
|
||||
- **Naming**:
|
||||
- Classes: Prefix with `C` (e.g., `CClientMain`, `CRYLGameData`)
|
||||
- Managers: Suffix with `Manager` (e.g., `CRYLCreatureManager`)
|
||||
- Event handlers: Suffix with `Handler` (e.g., `CGameEventHandler`)
|
||||
- UI controls: Prefix with `RYL` or `GMUI` (e.g., `RYLButton`, `GMUIObject`)
|
||||
- **Hungarian Notation**: Used extensively (m_ for members, p for pointers, dw for DWORD, etc.)
|
||||
- **Headers**: Include guards use `#ifndef __FILENAME_H__` pattern
|
||||
- **Namespaces**: Event processors in `GameProcess`, network in `ClientNet`
|
||||
|
||||
## Dependencies
|
||||
|
||||
**External Libraries**:
|
||||
- DirectX SDK (graphics and sound)
|
||||
- Winsock2 (networking)
|
||||
- Lua (embedded in RYLClient/LUA/)
|
||||
- EAX (3D audio - eax.dll, eax.lib, eaxguid.lib)
|
||||
- DbgHelp (crash dumps - dbghelp.dll, DbgHelp.Lib)
|
||||
|
||||
**Engine Modules** (located in `../Engine/`):
|
||||
- Caldron: Core utilities
|
||||
- CrossM: Cross-platform layer
|
||||
- Effect: Visual effects
|
||||
- SoundLib: Audio engine
|
||||
- Zalla3D: 3D rendering engine
|
||||
|
||||
## Special Notes
|
||||
|
||||
- The main client executable is named `NeoRylClient` but outputs to different directories depending on build configuration
|
||||
- Lua scripting is integrated through the LUA project (dependency of NeoRylClient)
|
||||
- The custom script engine uses Flex/Bison; if modifying grammar, run `Parse.bat` in ScriptEngine directory
|
||||
- Character encoding in source files may contain Korean comments (MultiByte character set)
|
||||
- Anti-cheat integration through GameGuard (referenced in headers and build configs)
|
||||
979
Client/CharacterActionControl/CCameraScript.cpp
Normal file
979
Client/CharacterActionControl/CCameraScript.cpp
Normal file
@@ -0,0 +1,979 @@
|
||||
#include "CCameraScript.h"
|
||||
#include "SceneManager.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
|
||||
extern D3DXVECTOR3 g_vecCube[8];
|
||||
extern WORD g_vecCubeIndex[36];
|
||||
|
||||
|
||||
CCameraScript::CCameraScript() {
|
||||
|
||||
m_pDevice = CSceneManager::GetDevice();
|
||||
m_pDevice->GetTransform(D3DTS_VIEW, &m_matBeforeView);
|
||||
InitCameraScript();
|
||||
m_iFixCount = 0;
|
||||
|
||||
m_bBackWord = false;
|
||||
m_bInitSet = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
CCameraScript::~CCameraScript() {
|
||||
|
||||
m_lstEvent.clear();
|
||||
m_lstPosSpline.clear();
|
||||
m_lstLookSpline.clear();
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_VIEW, &m_matBeforeView);
|
||||
|
||||
}
|
||||
void CCameraScript::ReWindFix() {
|
||||
if(m_iFixCount > 0)
|
||||
m_iFixCount--;
|
||||
else
|
||||
m_iFixCount = (m_iEventNum - 1);
|
||||
}
|
||||
|
||||
void CCameraScript::Rewind() {
|
||||
if(m_iBeforeEvent > 0)
|
||||
m_iBeforeEvent--;
|
||||
else
|
||||
m_iBeforeEvent = (m_iEventNum - 1);
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::FoWindFix() {
|
||||
if(m_iFixCount < (m_iEventNum - 1))
|
||||
m_iFixCount++;
|
||||
else
|
||||
m_iFixCount = 0;
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::Fowind() {
|
||||
if(m_iBeforeEvent < (m_iEventNum-1))
|
||||
m_iBeforeEvent++;
|
||||
else
|
||||
m_iBeforeEvent = 0;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
void CCameraScript::Jump(int iEvent) {
|
||||
|
||||
if((iEvent >= 0) && (iEvent < m_iEventNum)) {
|
||||
m_iBeforeEvent = iEvent;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
}
|
||||
void CCameraScript::InitFrame() {
|
||||
// m_bStart = false;
|
||||
m_dwBeforeTick = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
m_iBeforeEvent = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::SetVecTakePos()
|
||||
{
|
||||
D3DXVECTOR3 vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
D3DXVECTOR3 vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
D3DXVECTOR3 vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
|
||||
m_CurrentEvent.m_vecCameraPos = vecInterPos;
|
||||
m_CurrentEvent.m_vecCameraLook = vecInterLook;
|
||||
m_CurrentEvent.m_vecCameraUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CCameraScript::PlayScript(int iRoll,int iLoop,bool bFix) {
|
||||
|
||||
int i;
|
||||
if(m_bStart == false)
|
||||
return;
|
||||
|
||||
m_dwCurrentTick = timeGetTime();
|
||||
float fSkipFrame = 0.0f;
|
||||
|
||||
if(m_dwBeforeTick == 0) { // ù <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
fSkipFrame = 0;
|
||||
m_matBeforePos = *(CSceneManager::m_ViewCamera->GetMatPosition());
|
||||
m_matBeforeView2 = CSceneManager::m_ViewCamera->m_matView;
|
||||
}
|
||||
else {
|
||||
fSkipFrame = ((int)m_dwCurrentTick - (int)m_dwBeforeTick) / (float)CAMERAFRAMESTEP;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(iRoll == 0) { // Play
|
||||
|
||||
if(m_fRunFrame < m_lstEvent[m_iBeforeEvent].m_fFrame )
|
||||
{
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
|
||||
i = m_iBeforeEvent + 1;
|
||||
|
||||
for( i; i < m_iEventNum; i++ ) {
|
||||
if(m_fRunFrame >= m_lstEvent[i].m_fFrame) {
|
||||
m_iBeforeEvent = i;
|
||||
}
|
||||
}
|
||||
|
||||
if((m_iEventNum - 1) == m_iBeforeEvent) { // Looping ó<><C3B3>
|
||||
if(iLoop == 1) {
|
||||
m_iBeforeEvent = 0;
|
||||
m_dwBeforeTick = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
|
||||
}
|
||||
else { // Looping X
|
||||
m_iBeforeEvent = m_iEventNum - 1;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
m_bStart = false;
|
||||
InitFrame();
|
||||
if(bFix)
|
||||
{
|
||||
|
||||
CSceneManager::m_ViewCamera->SetMatView(m_matBeforeView2);
|
||||
CSceneManager::m_ViewCamera->SetMatPosition(m_matBeforePos);
|
||||
CSceneManager::m_ViewCamera->MoveFrustum();
|
||||
CSceneManager::m_ViewCamera->SetVecPosition(vector3(m_matBeforePos._41,m_matBeforePos._42,m_matBeforePos._43));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
float fInterpol;
|
||||
if(m_iBeforeEvent == (m_iEventNum - 1))
|
||||
fInterpol = 1.0f;
|
||||
else {
|
||||
fInterpol = (float)(m_fRunFrame - m_lstEvent[m_iBeforeEvent].m_fFrame) / (m_lstEvent[m_iBeforeEvent + 1].m_fFrame - m_lstEvent[m_iBeforeEvent].m_fFrame);
|
||||
}
|
||||
m_CurrentEvent.m_fFrame = m_fRunFrame;
|
||||
|
||||
|
||||
// Interpolation<6F><6E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
D3DXVECTOR3 vecInterpol;
|
||||
|
||||
D3DXVECTOR3 vecInterPos;
|
||||
D3DXVECTOR3 vecInterLook;
|
||||
D3DXVECTOR3 vecInterUp;
|
||||
|
||||
switch(m_lstEvent[m_iBeforeEvent].m_iInterpolation) {
|
||||
case C_LINE:
|
||||
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
int PosStart = m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
int iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iPosEnd - m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterPos = m_lstPosSpline[ PosStart + iInterpolNum];
|
||||
|
||||
PosStart = m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iLookEnd - m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterLook = m_lstLookSpline[ PosStart + iInterpolNum];
|
||||
|
||||
/* vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraPos - m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos + (vecInterpol * fInterpol);
|
||||
|
||||
vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraLook - m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook + (vecInterpol * fInterpol);
|
||||
*/
|
||||
vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraUp - m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp + (vecInterpol * fInterpol);
|
||||
}
|
||||
|
||||
break;
|
||||
case C_BEZIER1: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
}
|
||||
else {
|
||||
|
||||
int PosStart = m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
int iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iPosEnd - m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterPos = m_lstPosSpline[ PosStart + iInterpolNum];
|
||||
|
||||
PosStart = m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iLookEnd - m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterLook = m_lstLookSpline[ PosStart + iInterpolNum];
|
||||
|
||||
|
||||
float fInterpol2 = fInterpol * fInterpol;
|
||||
/* vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraPos * fInterpol2);
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraLook * fInterpol2);*/
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraUp * fInterpol2);
|
||||
|
||||
}
|
||||
break;
|
||||
/*case C_BEZIER2: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
}
|
||||
break;*/
|
||||
default:
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
m_CurrentEvent.m_vecCameraPos = vecInterPos;
|
||||
m_CurrentEvent.m_vecCameraLook = vecInterLook;
|
||||
m_CurrentEvent.m_vecCameraUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
D3DXMatrixLookAtLH(&m_matCurrentFrame,
|
||||
&(m_CurrentEvent.m_vecCameraPos),&(m_CurrentEvent.m_vecCameraLook),&(m_CurrentEvent.m_vecCameraUp));
|
||||
|
||||
//m_fRunFrame += m_dwBeforeTick = m_dwCurrentTick = timeGetTime();
|
||||
|
||||
m_fRunFrame += fSkipFrame;
|
||||
m_dwBeforeTick = m_dwCurrentTick = timeGetTime();
|
||||
|
||||
}
|
||||
|
||||
bool CCameraScript::SaveScript(char *strFileName) {
|
||||
|
||||
if((strFileName != NULL) && strlen(strFileName) > 1) {
|
||||
FILE *fp = fopen(strFileName,"wb");
|
||||
if(fp != NULL) {
|
||||
float fVersion = CAMERASCRIPTVERSION;
|
||||
fwrite((float *)&fVersion,sizeof(float),1,fp);
|
||||
fwrite((int *)&m_iEventNum,sizeof(int),1,fp);
|
||||
fwrite((CCameraEvent *)&(m_lstEvent[0]),sizeof(CCameraEvent),m_iEventNum,fp);
|
||||
fclose(fp);
|
||||
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool CCameraScript::LoadScript(char *strFileName) {
|
||||
|
||||
//InitCameraScript();
|
||||
|
||||
if((strFileName != NULL) && strlen(strFileName) > 1) {
|
||||
float fVersion = 0.0f;
|
||||
|
||||
char strPath[256] = {0};
|
||||
|
||||
strcpy(strPath,EFFECTSCRIPTPATH);
|
||||
strcat(strPath,strFileName);
|
||||
|
||||
|
||||
FILE *fp = fopen(strPath,"rb");
|
||||
if(fp != NULL) {
|
||||
fread((float *)&fVersion,sizeof(float),1,fp);
|
||||
if((fVersion >= 0.9f) && (fVersion <= 1.1f)) {
|
||||
int i;
|
||||
|
||||
fread((int *)&m_iEventNum,sizeof(int),1,fp);
|
||||
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
CCameraEvent EmptyNode;
|
||||
m_lstEvent.push_back(EmptyNode);
|
||||
}
|
||||
|
||||
fread((CCameraEvent *)&(m_lstEvent[0]),sizeof(CCameraEvent),m_iEventNum,fp);
|
||||
}
|
||||
fclose(fp);
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void CCameraScript::InitCameraScript(bool bInitPos,D3DXVECTOR3 vecInitPos,D3DXVECTOR3 vecInitLook) {
|
||||
m_lstEvent.clear();
|
||||
m_iEventNum = 0;
|
||||
m_iBeforeEvent = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
|
||||
m_dwBeforeTick = 0;
|
||||
m_bStart = false;
|
||||
|
||||
m_lstPosSpline.clear();
|
||||
m_bCreateSpline = false;
|
||||
|
||||
m_lstLookSpline.clear();
|
||||
m_bCreateLookSpline = false;
|
||||
m_iInsertLook = 0;
|
||||
m_iFixCount = 0;
|
||||
m_bBackWord = false;
|
||||
m_vecCameraInitPos = vecInitPos;
|
||||
m_vecCameraInitLook = vecInitLook;
|
||||
m_bInitSet = bInitPos;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
int CCameraScript::GetFixCount(int &iIndex,float &fFrame) {
|
||||
iIndex = m_lstEvent[m_iFixCount].m_iIndex;
|
||||
fFrame = m_lstEvent[m_iFixCount].m_fFrame;
|
||||
return m_iFixCount;
|
||||
|
||||
}
|
||||
void CCameraScript::FixLook(int iEvent,D3DXVECTOR3 vecLook) {
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
|
||||
}
|
||||
void CCameraScript::InsertLookPos(D3DXVECTOR3 vecLook) {
|
||||
|
||||
if(m_iInsertLook >= (int)m_lstEvent.size()) {
|
||||
MessageBox(NULL,"Look Pos <20>ʰ<EFBFBD> ","error",MB_OK);
|
||||
|
||||
return;
|
||||
}
|
||||
m_lstEvent[m_iInsertLook].m_vecCameraLook = vecLook;
|
||||
m_iInsertLook++;
|
||||
|
||||
char tmp[256]= {0};
|
||||
|
||||
int iNum = m_iInsertLook - m_lstEvent.size();
|
||||
/* sprintf(tmp,"%d <20><><EFBFBD><EFBFBD> Target Point <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.",iNum);
|
||||
MessageBox(NULL,tmp,"msg",MB_OK);
|
||||
*/
|
||||
}
|
||||
int CCameraScript::InsertEvent( D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol ) {
|
||||
|
||||
CCameraEvent Node;
|
||||
|
||||
Node.m_iIndex = m_iEventNum;
|
||||
Node.m_iInterpolation = iInterpol;
|
||||
Node.m_vecCameraPos = vecPos;
|
||||
Node.m_vecCameraLook = vecLook;
|
||||
Node.m_vecCameraUp = vecUp;
|
||||
Node.m_fFrame = fFrame;
|
||||
|
||||
m_lstEvent.push_back(Node);
|
||||
|
||||
return m_iEventNum++;
|
||||
}
|
||||
void CCameraScript::FixEvent( int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol ) {
|
||||
if((iEvent< 0) || (iEvent >= m_iEventNum) )
|
||||
return;
|
||||
m_lstEvent[iEvent].m_vecCameraPos = vecPos;
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
m_lstEvent[iEvent].m_vecCameraUp = vecUp;
|
||||
m_lstEvent[iEvent].m_fFrame = fFrame;
|
||||
m_lstEvent[iEvent].m_iInterpolation = iInterpol;
|
||||
}
|
||||
void CCameraScript::DeleteEvent(float fFrame,int iInterpol) {
|
||||
|
||||
if(m_iEventNum <= 0)
|
||||
return;
|
||||
int i;
|
||||
|
||||
for( i = 0 ; i < m_iEventNum; i++ )
|
||||
{
|
||||
if(((m_lstEvent[i].m_fFrame - fFrame) + (float)(m_lstEvent[i].m_iInterpolation - iInterpol)) <= 0.001f) {
|
||||
m_lstEvent.erase(m_lstEvent.begin() + i);
|
||||
m_iEventNum--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
void CCameraScript::DeleteEvent(int iIndex) {
|
||||
|
||||
if((iIndex <= 0) || (iIndex >= m_iEventNum))
|
||||
return;
|
||||
int i;
|
||||
|
||||
for( i = 0 ; i < m_iEventNum; i++ )
|
||||
{
|
||||
if(i == iIndex) {
|
||||
m_lstEvent.erase(m_lstEvent.begin() + i);
|
||||
m_iEventNum--;
|
||||
|
||||
InitFrame();
|
||||
m_iFixCount = 0;
|
||||
if(m_iInsertLook >= m_iEventNum)
|
||||
m_iInsertLook = (m_iEventNum - 1);
|
||||
m_bCreateLookSpline = false;
|
||||
m_bCreateSpline = false;
|
||||
m_bStart = false;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
void CCameraScript::SetPlay(bool bFlag) {
|
||||
m_bStart = bFlag;
|
||||
|
||||
InitFrame();
|
||||
if(bFlag == false) {
|
||||
CSceneManager::m_ViewCamera->SetMatView(m_matBeforeView2);
|
||||
CSceneManager::m_ViewCamera->SetMatPosition(m_matBeforePos);
|
||||
CSceneManager::m_ViewCamera->MoveFrustum();
|
||||
CSceneManager::m_ViewCamera->SetVecPosition(vector3(m_matBeforePos._41,m_matBeforePos._42,m_matBeforePos._43));
|
||||
|
||||
}
|
||||
}*/
|
||||
void CCameraScript::RenderPos_Up() {
|
||||
|
||||
int i;
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraPos.x + m_lstEvent[i].m_vecCameraUp.x * 50.0f;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraPos.y + m_lstEvent[i].m_vecCameraUp.y * 50.0f;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraPos.z + m_lstEvent[i].m_vecCameraUp.z * 50.0f;
|
||||
|
||||
identity._11 = 1.0f;
|
||||
identity._22 = 1.0f;
|
||||
identity._33 = 1.0f;
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 9.0f;
|
||||
identity._22 = 9.0f;
|
||||
identity._33 = 9.0f;
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffff4444);
|
||||
else
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraPos.x;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraPos.y;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraPos.z;
|
||||
|
||||
identity._11 = 1.0f;
|
||||
identity._22 = 1.0f;
|
||||
identity._33 = 1.0f;
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 9.0f;
|
||||
identity._22 = 9.0f;
|
||||
identity._33 = 9.0f;
|
||||
|
||||
}
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffff0000);
|
||||
else
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLook() {
|
||||
|
||||
int i;
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraLook.x;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraLook.y;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraLook.z;
|
||||
|
||||
identity._11 = 10.0f;
|
||||
identity._22 = 10.0f;
|
||||
identity._33 = 10.0f;
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 15.0f;
|
||||
identity._22 = 15.0f;
|
||||
identity._33 = 15.0f;
|
||||
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffffff00);
|
||||
else
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLookSpline() {
|
||||
|
||||
if((m_lstLookSpline.size() <= 0) || (m_bCreateLookSpline == false))
|
||||
return;
|
||||
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
int iSplineNum = m_lstLookSpline.size();
|
||||
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xffffff00);
|
||||
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINESTRIP,(iSplineNum - 1),&(m_lstLookSpline[0]),sizeof(D3DXVECTOR3));
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::RenderPosSpline() {
|
||||
|
||||
if((m_lstPosSpline.size() <= 0) || (m_bCreateSpline == false))
|
||||
return;
|
||||
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
int iSplineNum = m_lstPosSpline.size();
|
||||
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xff00ffff);
|
||||
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINESTRIP,(iSplineNum - 1),&(m_lstPosSpline[0]),sizeof(D3DXVECTOR3));
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLine() {
|
||||
|
||||
int i;
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
m_pDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
|
||||
D3DXVECTOR3 vecUp = D3DXVECTOR3(m_lstEvent[i].m_vecCameraPos.x + m_lstEvent[i].m_vecCameraUp.x * 50.0f,
|
||||
m_lstEvent[i].m_vecCameraPos.y + m_lstEvent[i].m_vecCameraUp.y * 50.0f,
|
||||
m_lstEvent[i].m_vecCameraPos.z + m_lstEvent[i].m_vecCameraUp.z * 50.0f);
|
||||
D3DXVECTOR3 vecPos = D3DXVECTOR3(m_lstEvent[i].m_vecCameraPos.x,
|
||||
m_lstEvent[i].m_vecCameraPos.y,
|
||||
m_lstEvent[i].m_vecCameraPos.z);
|
||||
|
||||
D3DXVECTOR3 vecLook = D3DXVECTOR3(m_lstEvent[i].m_vecCameraLook.x,
|
||||
m_lstEvent[i].m_vecCameraLook.y,
|
||||
m_lstEvent[i].m_vecCameraLook.z);
|
||||
|
||||
|
||||
D3DXVECTOR3 vecLinePos[2];
|
||||
vecLinePos[0] = vecUp;
|
||||
vecLinePos[1] = vecPos;
|
||||
/* vecLinePos[2] = vecPos;
|
||||
vecLinePos[3] = vecLook;
|
||||
*/
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,0xff000000);
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST,1,vecLinePos,sizeof(D3DXVECTOR3));
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
m_pDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
m_pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::CreateSpline() {
|
||||
|
||||
m_lstPosSpline.clear();
|
||||
m_lstLookSpline.clear();
|
||||
|
||||
|
||||
float fU,fU2,fU3;
|
||||
float i,j;
|
||||
|
||||
for( i = 0; i < (m_iEventNum); i++ ) {
|
||||
m_lstEvent[i].m_iPosStart = m_lstPosSpline.size();
|
||||
|
||||
for(j = 0;j < CAMERASPLINEUNIT;j++) {
|
||||
fU = (float)j / (float)CAMERASPLINEUNIT;
|
||||
fU2 = fU * fU;
|
||||
fU3 = fU2 * fU;
|
||||
D3DXVECTOR3 vecNode;
|
||||
|
||||
vecNode.x = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.x +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.x +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.x +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.x) / 6.0f;
|
||||
vecNode.y = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.y +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.y +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.y +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.y) / 6.0f;
|
||||
vecNode.z = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.z +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.z +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.z +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.z) / 6.0f;
|
||||
|
||||
m_lstPosSpline.push_back(vecNode);
|
||||
|
||||
}
|
||||
m_lstEvent[i].m_iPosEnd = m_lstPosSpline.size();
|
||||
}
|
||||
m_bCreateSpline = true;
|
||||
if(m_iInsertLook <= 0)
|
||||
{
|
||||
m_bCreateLookSpline = false;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
for( i = 0; i < (m_iEventNum); i++ ) {
|
||||
m_lstEvent[i].m_iLookStart = m_lstLookSpline.size();
|
||||
for(j = 0;j < CAMERASPLINEUNIT;j++) {
|
||||
fU = (float)j / (float)CAMERASPLINEUNIT;
|
||||
fU2 = fU * fU;
|
||||
fU3 = fU2 * fU;
|
||||
D3DXVECTOR3 vecNode;
|
||||
|
||||
vecNode.x = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.x +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.x +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.x +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.x) / 6.0f;
|
||||
vecNode.y = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.y +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.y +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.y +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.y) / 6.0f;
|
||||
vecNode.z = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.z +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.z +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.z +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.z) / 6.0f;
|
||||
|
||||
m_lstLookSpline.push_back(vecNode);
|
||||
|
||||
}
|
||||
m_lstEvent[i].m_iLookEnd = m_lstLookSpline.size();
|
||||
}
|
||||
}
|
||||
m_bCreateLookSpline = true;
|
||||
|
||||
}
|
||||
void CCameraScript::BackWordEvent() // Event<6E><74> <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD>.
|
||||
{
|
||||
int iCurrent;
|
||||
int iBackCurrent;
|
||||
|
||||
m_bBackWord = !m_bBackWord;
|
||||
|
||||
D3DXVECTOR3 vecTmpSwap;
|
||||
|
||||
|
||||
for(int i = 0; i < floorf((float)m_iEventNum / 2.0f); i++ )
|
||||
{
|
||||
iCurrent = i;
|
||||
iBackCurrent = (m_iEventNum - 1) - i;
|
||||
|
||||
if(iCurrent != iBackCurrent)
|
||||
{
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraLook;
|
||||
m_lstEvent[iCurrent].m_vecCameraLook = m_lstEvent[iBackCurrent].m_vecCameraLook;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraLook = vecTmpSwap;
|
||||
|
||||
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraPos;
|
||||
m_lstEvent[iCurrent].m_vecCameraPos = m_lstEvent[iBackCurrent].m_vecCameraPos;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraPos = vecTmpSwap;
|
||||
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraUp;
|
||||
m_lstEvent[iCurrent].m_vecCameraUp = m_lstEvent[iBackCurrent].m_vecCameraUp;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraUp = vecTmpSwap;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(m_bInitSet)
|
||||
{
|
||||
D3DXVECTOR3 vecUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
FixEvent(m_iEventNum -1,m_vecCameraInitPos,m_vecCameraInitLook,vecUp);
|
||||
InsertEvent(m_vecCameraInitPos,m_vecCameraInitLook,vecUp,m_lstEvent[m_iEventNum -1].m_fFrame + 25.0f,0);
|
||||
|
||||
//FixEvent(m_iEventNum -2,m_vecCameraInitPos,m_vecCameraInitLook,vecUp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
void CCameraScript::FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp)
|
||||
{
|
||||
if((iEvent< 0) || (iEvent >= m_iEventNum) )
|
||||
return;
|
||||
m_lstEvent[iEvent].m_vecCameraPos = vecPos;
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
m_lstEvent[iEvent].m_vecCameraUp = vecUp;
|
||||
|
||||
}
|
||||
void CCameraScript::SetPlay(bool bFlag,bool bBack,bool bStartPos) {
|
||||
m_bStart = bFlag;
|
||||
if(bBack && bFlag)
|
||||
{
|
||||
if(!m_bBackWord)
|
||||
{
|
||||
BackWordEvent();
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
}
|
||||
}
|
||||
else if(bFlag)
|
||||
{
|
||||
if(m_bBackWord)
|
||||
{
|
||||
BackWordEvent();
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
}
|
||||
}
|
||||
if(bStartPos && bFlag && !bBack) // Start pos <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>)
|
||||
{
|
||||
|
||||
matrix *matPos= CSceneManager::GetCamera()->GetMatPosition();
|
||||
vector3 vecCameraToward = CSceneManager::GetCamera()->GetViewTowardVector();
|
||||
//vector3 vecCameraUp = CSceneManager::GetCamera()->GetViewUpVector();
|
||||
|
||||
D3DXVECTOR3 vecCameraSPos = D3DXVECTOR3(matPos->_41,matPos->_42,matPos->_43);
|
||||
D3DXVECTOR3 vecCameraSLook = D3DXVECTOR3(vecCameraSPos.x + vecCameraToward.x * 50.0f,vecCameraSPos.y + vecCameraToward.y* 50.0f,vecCameraSPos.z + vecCameraToward.z* 50.0f);
|
||||
//D3DXVECTOR3 vecCameraSUp = D3DXVECTOR3(vecCameraUp.x,vecCameraUp.y,vecCameraUp.z);
|
||||
|
||||
D3DXVECTOR3 vecCameraSUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
FixEvent(0,vecCameraSPos,vecCameraSLook,vecCameraSUp);
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
|
||||
}
|
||||
|
||||
InitFrame();
|
||||
if(bFlag == false) {
|
||||
CSceneManager::m_ViewCamera->SetMatView(m_matBeforeView2);
|
||||
CSceneManager::m_ViewCamera->SetMatPosition(m_matBeforePos);
|
||||
CSceneManager::m_ViewCamera->MoveFrustum();
|
||||
CSceneManager::m_ViewCamera->SetVecPosition(vector3(m_matBeforePos._41,m_matBeforePos._42,m_matBeforePos._43));
|
||||
|
||||
}
|
||||
}
|
||||
154
Client/CharacterActionControl/CCameraScript.h
Normal file
154
Client/CharacterActionControl/CCameraScript.h
Normal file
@@ -0,0 +1,154 @@
|
||||
#ifndef __CCAMERASCRIPT_H__
|
||||
#define __CCAMERASCRIPT_H__
|
||||
|
||||
#include <d3d8.h>
|
||||
#include <d3dx8.h>
|
||||
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include "matrix.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
enum C_INTERPOLATION {
|
||||
C_LINE, // Linear
|
||||
C_BEZIER1, // Bezier (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3)
|
||||
C_BEZIER2, // Bezier (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4)
|
||||
C_NOTINTERPOLATION, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
#define CAMERAEVENTEMPTY -1
|
||||
#define CAMERAZEROFRAME 0.0f
|
||||
#define CAMERASCRIPTVERSION 1.0f
|
||||
#define CAMERAFRAMESTEP 30.0f
|
||||
#define CAMERASPLINEUNIT 100
|
||||
class CCameraScript {
|
||||
private:
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> unit
|
||||
class CCameraEvent {
|
||||
public:
|
||||
int m_iIndex; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD>
|
||||
int m_iInterpolation; // <20><> Event<6E><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
float m_fFrame; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
D3DXVECTOR3 m_vecControlPoint[2]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Control Point
|
||||
D3DXVECTOR3 m_vecCameraPos;
|
||||
D3DXVECTOR3 m_vecCameraLook;
|
||||
D3DXVECTOR3 m_vecCameraUp;
|
||||
|
||||
int m_iPosStart; // Pos Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
int m_iPosEnd; // Pos Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
|
||||
int m_iLookStart; // Look Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
int m_iLookEnd; // Look Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
|
||||
CCameraEvent() {
|
||||
m_iIndex = CAMERAEVENTEMPTY;
|
||||
m_iInterpolation = C_LINE;
|
||||
m_fFrame = CAMERAZEROFRAME;
|
||||
m_vecCameraPos = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_vecCameraUp = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_vecCameraLook = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_iPosStart = CAMERAEVENTEMPTY;
|
||||
m_iPosEnd = CAMERAEVENTEMPTY;
|
||||
m_iLookStart = CAMERAEVENTEMPTY;
|
||||
m_iLookEnd = CAMERAEVENTEMPTY;
|
||||
|
||||
}
|
||||
~CCameraEvent() {}
|
||||
};
|
||||
vector<CCameraEvent> m_lstEvent;
|
||||
|
||||
|
||||
vector<D3DXVECTOR3> m_lstPosSpline;
|
||||
bool m_bCreateSpline;
|
||||
|
||||
vector<D3DXVECTOR3> m_lstLookSpline;
|
||||
bool m_bCreateLookSpline;
|
||||
int m_iInsertLook;
|
||||
|
||||
int m_iEventNum;
|
||||
int m_iBeforeEvent;
|
||||
float m_fRunFrame; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD> frame
|
||||
D3DXMATRIX m_matBeforeView;
|
||||
|
||||
|
||||
CCameraEvent m_CurrentEvent; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD> <20>´<EFBFBD>, Event Unit
|
||||
D3DXMATRIX m_matCurrentFrame; // <20><><EFBFBD><EFBFBD> Frame View Matrix
|
||||
LPDIRECT3DDEVICE8 m_pDevice; // Direct3D Device
|
||||
|
||||
DWORD m_dwBeforeTick;
|
||||
DWORD m_dwCurrentTick;
|
||||
bool m_bStart;
|
||||
|
||||
|
||||
matrix m_matBeforePos;
|
||||
matrix m_matBeforeView2;
|
||||
|
||||
int m_iFixCount;
|
||||
|
||||
bool m_bBackWord;
|
||||
|
||||
D3DXVECTOR3 m_vecCameraInitPos;
|
||||
D3DXVECTOR3 m_vecCameraInitLook;
|
||||
bool m_bInitSet;
|
||||
|
||||
public:
|
||||
CCameraScript();
|
||||
~CCameraScript();
|
||||
|
||||
void InitCameraScript(bool bInitPos = false,D3DXVECTOR3 vecInitPos = D3DXVECTOR3(0.0f,0.0f,0.0f),D3DXVECTOR3 vecInitLook = D3DXVECTOR3(0.0f,0.0f,0.0f));
|
||||
void InitFrame();
|
||||
|
||||
int InsertEvent(D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol);
|
||||
void InsertLookPos(D3DXVECTOR3 vecLook);
|
||||
|
||||
void FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp);
|
||||
void FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol);
|
||||
void FixLook(int iEvent,D3DXVECTOR3 vecLook);
|
||||
|
||||
void DeleteEvent(float fFrame,int iInterpol);
|
||||
void DeleteEvent(int iIndex);
|
||||
|
||||
bool SaveScript(char *strFileName);
|
||||
bool LoadScript(char *strFileName);
|
||||
|
||||
void CreateSpline();
|
||||
|
||||
void PlayScript(int iRoll,int iLoop,bool bFix);
|
||||
void Rewind();
|
||||
void Fowind();
|
||||
void Jump(int iEvent); //iEvent<6E><74> jump
|
||||
// void SetPlay(bool bFlag);
|
||||
void SetPlay(bool bFlag,bool bBack = false,bool bStartPos = false);
|
||||
|
||||
void SetVecTakePos(); //<2F><>ǥ <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
|
||||
D3DXVECTOR3 GetVecPos() { return m_CurrentEvent.m_vecCameraPos; }
|
||||
D3DXVECTOR3 GetVecLook() { return m_CurrentEvent.m_vecCameraLook; }
|
||||
D3DXVECTOR3 GetVecUp() { return m_CurrentEvent.m_vecCameraUp; }
|
||||
D3DXMATRIX GetCurrentViewMat() { return m_matCurrentFrame; }
|
||||
|
||||
void RenderPos_Up();
|
||||
void RenderLook();
|
||||
void RenderLine();
|
||||
void RenderPosSpline();
|
||||
void RenderLookSpline();
|
||||
bool ISPlay() { return m_bStart;}
|
||||
int GetExistEventNum() { return m_iEventNum;}
|
||||
int GetFixCount(int &iIndex,float &fFrame);
|
||||
void ReWindFix();
|
||||
void FoWindFix();
|
||||
|
||||
void BackWordEvent();
|
||||
|
||||
//
|
||||
void HALT()
|
||||
{
|
||||
m_bStart = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
534
Client/CharacterActionControl/CameraControl.cpp
Normal file
534
Client/CharacterActionControl/CameraControl.cpp
Normal file
@@ -0,0 +1,534 @@
|
||||
// CameraControl.cpp: implementation of the CCameraControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "CameraControl.h"
|
||||
#include "SceneManager.h"
|
||||
#include "FrameTimer.h"
|
||||
#include "FullSceneEffect.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
float CCameraControl::m_fJumpRate=0.0f;
|
||||
float CCameraControl::m_fCameraShakeRateTime=-1.0f;
|
||||
float CCameraControl::m_fCameraShakeNowTime=0.0f;
|
||||
vector3 CCameraControl::m_vecCameraShakeLength=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
float CCameraControl::m_fFadeOutStart=0.0f;
|
||||
float CCameraControl::m_fFadeOutMaintenance=0.0f;
|
||||
float CCameraControl::m_fFadeOutEnd=0.0f;
|
||||
float CCameraControl::m_fFadeOutNowTime=0.0f;
|
||||
|
||||
float CCameraControl::m_fFadeInStart=0.0f;
|
||||
float CCameraControl::m_fFadeInMaintenance=0.0f;
|
||||
float CCameraControl::m_fFadeInEnd=0.0f;
|
||||
float CCameraControl::m_fFadeInNowTime=0.0f;
|
||||
|
||||
color CCameraControl::m_FadeInColor;
|
||||
|
||||
DWORD CCameraControl::m_nCameraAnimationTimer=0xffffffff;
|
||||
|
||||
|
||||
CCameraControl::CCameraControl()
|
||||
{
|
||||
m_fCameraRotX = 3.14159f / 2.0f;
|
||||
m_fCameraRotY = 0.4f;
|
||||
|
||||
m_fBattleCameraRotY = 0.3f;
|
||||
m_fBattleInterCharacterCamera = 600.0f; // Minotaurs <20><>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD> <20>ʱ<EFBFBD> ī<><EFBFBD> <20><>ġ
|
||||
m_fMouseClickInterCharacterCamera=1000.0f;
|
||||
|
||||
m_nCameraMode=1;
|
||||
m_fDirection = 0.0f;
|
||||
|
||||
m_FadeInColor.c=0xffffffff;
|
||||
}
|
||||
|
||||
CCameraControl::~CCameraControl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateBattleCharacter(vector3 vecChrPos, float fDirection, float fInitY, float fInitZ)
|
||||
{
|
||||
if(m_nCameraMode>=2)
|
||||
{
|
||||
UpdateControlCamera();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_fDirection = fDirection;
|
||||
|
||||
vecChrPos += vector3(0.0f, fInitY, fInitZ);
|
||||
|
||||
if(m_fBattleCameraRotY > 3.14159f/2.0f-0.3f)
|
||||
m_fBattleCameraRotY=3.14159f/2.0f-0.3f;
|
||||
if(m_fBattleCameraRotY< -3.14159f/2.0f+0.7f)
|
||||
m_fBattleCameraRotY=-3.14159f/2.0f+0.7f;
|
||||
|
||||
vector3 vecCameraInterPos;
|
||||
|
||||
if(m_fJumpRate>0.0f)
|
||||
{
|
||||
vector3 vecJumpRate=sinf(m_fJumpRate)*vector3(0.0f,10.0f,0.0f);
|
||||
vecChrPos-=vecJumpRate;
|
||||
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fJumpRate+=((int)fCameraUpdate)*0.08f;
|
||||
|
||||
if(m_fJumpRate>3.14159f)
|
||||
{
|
||||
m_fJumpRate=0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fCameraShakeRateTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
vector3 vecCameraShake=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
static bool bStart = false;
|
||||
|
||||
if(m_fCameraShakeRateTime>0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fCameraShakeNowTime+=(int)fCameraUpdate;
|
||||
if(m_fCameraShakeNowTime>m_fCameraShakeRateTime)
|
||||
{
|
||||
m_fCameraShakeRateTime=-1.0f;
|
||||
}
|
||||
|
||||
vecCameraShake=vector3( (rand()%1000)-500 , (rand()%1000)-500 , (rand()%1000)-500 );
|
||||
vecCameraShake.Normalize();
|
||||
vecCameraShake.x=vecCameraShake.x*CCameraControl::m_vecCameraShakeLength.x;
|
||||
vecCameraShake.y=vecCameraShake.y*CCameraControl::m_vecCameraShakeLength.y;
|
||||
vecCameraShake.z=vecCameraShake.z*CCameraControl::m_vecCameraShakeLength.z;
|
||||
CSceneManager::m_pFullSceneEffect->SetFlag(FULLSCENE_MOTIONBLUR,true);
|
||||
bStart = true;
|
||||
}
|
||||
else if(bStart){
|
||||
bStart = false;
|
||||
CSceneManager::m_pFullSceneEffect->SetFlag(FULLSCENE_MOTIONBLUR,false);
|
||||
|
||||
}
|
||||
|
||||
//vecCameraInterPos+=vecCameraShake;
|
||||
|
||||
CalcCameraPosition(vecChrPos,fDirection,m_fBattleCameraRotY,m_fBattleInterCharacterCamera,vecCameraInterPos);
|
||||
|
||||
if(m_fBattleInterCharacterCamera < 200.0f)
|
||||
{
|
||||
float fDownFocus = (40.0f - ((m_fBattleInterCharacterCamera - 100.0f) / 2.50f));
|
||||
|
||||
vecChrPos.y = vecChrPos.y - fDownFocus;
|
||||
vecCameraInterPos.y = vecCameraInterPos.y - fDownFocus;
|
||||
}
|
||||
|
||||
SetCamera(vecCameraInterPos, vecCameraShake, vecChrPos);
|
||||
/* matrix matView;
|
||||
matView.CameraLookAt(vecCameraInterPos+vecCameraShake, vecChrPos+vecCameraShake, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=vecCameraInterPos;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(vecChrPos);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
|
||||
if(m_fFadeOutStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeOutNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeOutNowTime <= m_fFadeOutStart)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime/m_fFadeOutStart;
|
||||
}
|
||||
if( m_fFadeOutNowTime > m_fFadeOutStart &&
|
||||
m_fFadeOutNowTime < m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime-(m_fFadeOutStart+m_fFadeOutMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeOutEnd);
|
||||
}
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=true;
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterRate=fSetTime;
|
||||
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance+m_fFadeOutEnd)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=false;
|
||||
|
||||
m_fFadeOutStart=0.0f;
|
||||
m_fFadeOutMaintenance=0.0f;
|
||||
m_fFadeOutEnd=0.0f;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(m_fFadeInStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeInNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeInNowTime <= m_fFadeInStart)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime/m_fFadeInStart;
|
||||
}
|
||||
if( m_fFadeInNowTime > m_fFadeInStart &&
|
||||
m_fFadeInNowTime < m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime-(m_fFadeInStart+m_fFadeInMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeInEnd);
|
||||
}
|
||||
if(fSetTime<1.0f && fSetTime>0.0f)
|
||||
{
|
||||
int a=0;
|
||||
}
|
||||
color InterColor;
|
||||
color ZeroColor;
|
||||
ZeroColor.c=0x00000000;
|
||||
InterColor=color::Interpolation(ZeroColor,m_FadeInColor,fSetTime);
|
||||
CSceneManager::m_FullSceneFade=InterColor;
|
||||
//CSceneManager::m_FullSceneFade.c=0x00ff0000;
|
||||
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance+m_fFadeInEnd)
|
||||
{
|
||||
m_fFadeInStart=0.0f;
|
||||
m_fFadeInMaintenance=0.0f;
|
||||
m_fFadeInEnd=0.0f;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
|
||||
CSceneManager::m_FullSceneFade.c=0x0;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateClickMode(vector3 vecChrPos, float fInitY, float fInitZ)
|
||||
{
|
||||
if(m_nCameraMode>=2)
|
||||
{
|
||||
UpdateControlCamera();
|
||||
return;
|
||||
}
|
||||
vecChrPos += vector3(0.0f, fInitY, fInitZ); // <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
if(m_fCameraRotY > 3.14159f/2.0f-0.3f)
|
||||
m_fCameraRotY=3.14159f/2.0f-0.3f;
|
||||
if(m_fCameraRotY< -3.14159f/2.0f+0.7f)
|
||||
m_fCameraRotY=-3.14159f/2.0f+0.7f;
|
||||
|
||||
|
||||
//CalcCameraPosition(vecChrPos,-m_fCameraRotX,vecCameraInterPos);
|
||||
|
||||
m_fCameraShakeRateTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
vector3 vecCameraShake=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
if(m_fCameraShakeRateTime>0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fCameraShakeNowTime+=(int)fCameraUpdate;
|
||||
if(m_fCameraShakeNowTime>m_fCameraShakeRateTime)
|
||||
{
|
||||
m_fCameraShakeRateTime=-1.0f;
|
||||
}
|
||||
|
||||
vecCameraShake=vector3( (rand()%1000)-500 , (rand()%1000)-500 , (rand()%1000)-500 );
|
||||
vecCameraShake.Normalize();
|
||||
vecCameraShake.x=vecCameraShake.x*CCameraControl::m_vecCameraShakeLength.x;
|
||||
vecCameraShake.y=vecCameraShake.y*CCameraControl::m_vecCameraShakeLength.y;
|
||||
vecCameraShake.z=vecCameraShake.z*CCameraControl::m_vecCameraShakeLength.z;
|
||||
}
|
||||
|
||||
|
||||
vector3 vecCameraInterPos;
|
||||
|
||||
CalcCameraPosition(vecChrPos,-m_fCameraRotX,m_fCameraRotY,m_fMouseClickInterCharacterCamera,vecCameraInterPos);
|
||||
|
||||
if(m_fMouseClickInterCharacterCamera < 200.0f)
|
||||
{
|
||||
float fDownFocus = (40.0f - ((m_fMouseClickInterCharacterCamera - 100.0f) / 2.50f));
|
||||
|
||||
vecChrPos.y = vecChrPos.y - fDownFocus;
|
||||
vecCameraInterPos.y = vecCameraInterPos.y - fDownFocus;
|
||||
}
|
||||
|
||||
SetCamera(vecCameraInterPos, vecCameraShake, vecChrPos);
|
||||
/*
|
||||
matrix matRotation,matResult;
|
||||
|
||||
matResult.Translation(vector3(1.0f,0.0f,0.0f));
|
||||
D3DXQUATERNION qR;
|
||||
D3DXQuaternionRotationYawPitchRoll(&qR,-m_fCameraRotX,0.0f,m_fCameraRotY);
|
||||
D3DXMatrixRotationQuaternion(matRotation,&qR);
|
||||
|
||||
matResult=matResult*matRotation;
|
||||
//vector3 vecCameraPosition=matResult.GetLoc();
|
||||
vector3 vecCameraInterPos=matResult.GetLoc();
|
||||
vector3 vecResultCameraPos = (vecCameraInterPos * m_fMouseClickInterCharacterCamera) + vecChrPos;
|
||||
|
||||
|
||||
/////////////////////Terrain//////////////////
|
||||
|
||||
//List<vector3> PolyList;
|
||||
CSceneManager::m_HeightField.GetLineIntersectPoly(vecChrPos,vecResultCameraPos,PolyList);
|
||||
|
||||
float fCollisionLens=m_fMouseClickInterCharacterCamera;
|
||||
|
||||
float fLens;
|
||||
vector3 vecPoly[3];
|
||||
if(PolyList.num>0)
|
||||
{
|
||||
for(int cIndices=0;cIndices<PolyList.num/3;cIndices++)
|
||||
{
|
||||
vecPoly[0]=PolyList[cIndices*3+0];
|
||||
vecPoly[1]=PolyList[cIndices*3+1];
|
||||
vecPoly[2]=PolyList[cIndices*3+2];
|
||||
|
||||
if(CIntersection::PolygonRay(vecChrPos,vecResultCameraPos,vecPoly,fLens) && fCollisionLens > fLens && fLens > 0.0f)
|
||||
{
|
||||
fCollisionLens=fLens;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float fChrInter=fCollisionLens;
|
||||
vecCameraInterPos=vecCameraInterPos*fChrInter+vecChrPos;
|
||||
|
||||
float fCameraHeight=CSceneManager::m_HeightField.GetHeight(vecCameraInterPos);
|
||||
if(vecCameraInterPos.y < fCameraHeight +30.0f)
|
||||
{
|
||||
vecCameraInterPos.y=fCameraHeight +30.0f;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void CCameraControl::ModeConvertAnimation()
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
//fCameraUpdate=
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateControlCamera()
|
||||
{
|
||||
if(m_nCameraMode==100)
|
||||
return;
|
||||
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fTime+=fCameraUpdate;
|
||||
|
||||
vector3 vecAdder=m_vecVelocity*fCameraUpdate;
|
||||
m_vecNowPosition=m_vecNowPosition+vecAdder;
|
||||
|
||||
vector3 vecForLens=m_vecEndPosition-m_vecStartPosition;
|
||||
vector3 vecNowLens=m_vecNowPosition-m_vecStartPosition;
|
||||
|
||||
static float fVelScalar=0.0f;
|
||||
|
||||
m_vecVelocity+=m_vecAccelate*fCameraUpdate;
|
||||
|
||||
if(vecForLens.GetLens() < vecNowLens.GetLens())
|
||||
{
|
||||
m_nCameraMode=m_nPrepareCameraMode;
|
||||
}
|
||||
|
||||
matrix matView;
|
||||
matView.CameraLookAt(m_vecNowPosition, m_vecTargetCameraPosition, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=m_vecNowPosition;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(m_vecNowPosition);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
}
|
||||
|
||||
void CCameraControl::CalcCameraPosition(vector3 vecChrPos,float fCameraDirection,float fCameraYDirection,float fInterCamera,vector3 &vecCameraInterPos)
|
||||
{
|
||||
matrix matRotation,matResult;
|
||||
|
||||
matResult.Translation(vector3(1.0f,0.0f,0.0f));
|
||||
D3DXQUATERNION qR;
|
||||
D3DXQuaternionRotationYawPitchRoll(&qR,fCameraDirection,0.0f,fCameraYDirection);
|
||||
D3DXMatrixRotationQuaternion(matRotation,&qR);
|
||||
|
||||
matResult=matResult*matRotation;
|
||||
//vector3 vecCameraPosition=matResult.GetLoc();
|
||||
vecCameraInterPos=matResult.GetLoc();
|
||||
vector3 vecResultCameraPos = (vecCameraInterPos * fInterCamera) + vecChrPos;
|
||||
|
||||
|
||||
/////////////////////Terrain//////////////////
|
||||
|
||||
std::vector<vector3> PolyList;
|
||||
CSceneManager::m_HeightField.GetLineIntersectPoly(vecChrPos,vecResultCameraPos,PolyList);
|
||||
|
||||
float fCollisionLens=fInterCamera;
|
||||
|
||||
float fLens;
|
||||
vector3 vecPoly[3];
|
||||
if(PolyList.size()>0)
|
||||
{
|
||||
for(int cIndices=0;cIndices<(int)PolyList.size()/3;cIndices++)
|
||||
{
|
||||
vecPoly[0]=PolyList[cIndices*3+0];
|
||||
vecPoly[1]=PolyList[cIndices*3+1];
|
||||
vecPoly[2]=PolyList[cIndices*3+2];
|
||||
|
||||
if(CIntersection::PolygonRay(vecChrPos,vecResultCameraPos,vecPoly,fLens) && fCollisionLens > fLens && fLens > 0.0f)
|
||||
{
|
||||
fCollisionLens=fLens;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float fChrInter=fCollisionLens;
|
||||
vecCameraInterPos=vecCameraInterPos*fChrInter+vecChrPos;
|
||||
|
||||
float fCameraHeight=CSceneManager::m_HeightField.GetHeight(vecCameraInterPos);
|
||||
if(vecCameraInterPos.y < fCameraHeight +30.0f)
|
||||
{
|
||||
vecCameraInterPos.y = fCameraHeight +30.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void CCameraControl::SetFadeOut(float fStart, float fMaintenance, float fEnd)
|
||||
{
|
||||
m_fFadeOutStart=fStart;
|
||||
m_fFadeOutMaintenance=fMaintenance;
|
||||
m_fFadeOutEnd=fEnd;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
}
|
||||
|
||||
void CCameraControl::SetFadeIn(float fStart, float fMaintenance, float fEnd,color FadeColor)
|
||||
{
|
||||
m_fFadeInStart=fStart;
|
||||
m_fFadeInMaintenance=fMaintenance;
|
||||
m_fFadeInEnd=fEnd;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
m_FadeInColor=FadeColor;
|
||||
}
|
||||
|
||||
void CCameraControl::SetCamera(vector3 &vecCameraInterPos, vector3 &vecCameraShake, vector3 &vecChrPos)
|
||||
{
|
||||
matrix matView;
|
||||
matView.CameraLookAt(vecCameraInterPos+vecCameraShake, vecChrPos, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=vecCameraInterPos;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(vecChrPos);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
|
||||
if(m_fFadeOutStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeOutNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeOutNowTime <= m_fFadeOutStart)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime/m_fFadeOutStart;
|
||||
}
|
||||
if( m_fFadeOutNowTime > m_fFadeOutStart &&
|
||||
m_fFadeOutNowTime < m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime-(m_fFadeOutStart+m_fFadeOutMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeOutEnd);
|
||||
//if(fSetTime<0.0f)
|
||||
// fSetTime=0.0f;
|
||||
}
|
||||
if(fSetTime>=0.0f)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=true;
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterRate=fSetTime;
|
||||
}
|
||||
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance+m_fFadeOutEnd)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=false;
|
||||
|
||||
m_fFadeOutStart=0.0f;
|
||||
m_fFadeOutMaintenance=0.0f;
|
||||
m_fFadeOutEnd=0.0f;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(m_fFadeInStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeInNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeInNowTime <= m_fFadeInStart)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime/m_fFadeInStart;
|
||||
}
|
||||
if( m_fFadeInNowTime > m_fFadeInStart &&
|
||||
m_fFadeInNowTime < m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime-(m_fFadeInStart+m_fFadeInMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeInEnd);
|
||||
}
|
||||
if(fSetTime<1.0f && fSetTime>0.0f)
|
||||
{
|
||||
int a=0;
|
||||
}
|
||||
color InterColor;
|
||||
color ZeroColor;
|
||||
ZeroColor.c=0x00000000;
|
||||
InterColor=color::Interpolation(ZeroColor,m_FadeInColor,fSetTime);
|
||||
CSceneManager::m_FullSceneFade=InterColor;
|
||||
//CSceneManager::m_FullSceneFade.c=0x00ff0000;
|
||||
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance+m_fFadeInEnd)
|
||||
{
|
||||
m_fFadeInStart=0.0f;
|
||||
m_fFadeInMaintenance=0.0f;
|
||||
m_fFadeInEnd=0.0f;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
|
||||
CSceneManager::m_FullSceneFade.c=0x0;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Client/CharacterActionControl/CameraControl.h
Normal file
72
Client/CharacterActionControl/CameraControl.h
Normal file
@@ -0,0 +1,72 @@
|
||||
// CameraControl.h: interface for the CCameraControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_)
|
||||
#define AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "3DMath.h"
|
||||
#include <d3d8.h>
|
||||
|
||||
class CCameraControl
|
||||
{
|
||||
public:
|
||||
void SetCamera(vector3 &vecCameraInterPos, vector3 &vecCameraShake, vector3 &vecChrPos);
|
||||
static void SetFadeIn(float fStart,float fMaintenance,float fEnd,color FadeColor);
|
||||
static void SetFadeOut(float fStart,float fMaintenance,float fEnd);
|
||||
void CalcCameraPosition(vector3 vecChrPos,float fCameraDirection,float fCameraYDirection,float fInterCamera,vector3 &vecCameraInterPos);
|
||||
void UpdateControlCamera();
|
||||
void ModeConvertAnimation();
|
||||
void UpdateClickMode(vector3 vecChrPos, float fInitY, float fInitZ = 0.0f);
|
||||
void UpdateBattleCharacter(vector3 vecChrPos,float fDirection, float fInitY, float fInitZ = 0.0f);
|
||||
int m_nCameraMode;//0 <20><><EFBFBD>콺 Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,1 <20><>Ʋ,2 <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> ī<><EFBFBD> (<28><><EFBFBD><EFBFBD>ũ,<2C><>ũ<EFBFBD><C5A9>Ʈ...)
|
||||
int m_nPrepareCameraMode;
|
||||
|
||||
|
||||
|
||||
static float m_fJumpRate;
|
||||
static float m_fCameraShakeRateTime;
|
||||
static float m_fCameraShakeNowTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
static float m_fFadeOutStart;
|
||||
static float m_fFadeOutMaintenance;
|
||||
static float m_fFadeOutEnd;
|
||||
static float m_fFadeOutNowTime;
|
||||
|
||||
static float m_fFadeInStart;
|
||||
static float m_fFadeInMaintenance;
|
||||
static float m_fFadeInEnd;
|
||||
static float m_fFadeInNowTime;
|
||||
static color m_FadeInColor;
|
||||
|
||||
|
||||
|
||||
//
|
||||
vector3 m_vecStartPosition,m_vecEndPosition;
|
||||
vector3 m_vecVelocity,m_vecAccelate;
|
||||
vector3 m_vecNowPosition;
|
||||
float m_fTotalTimeInterval;
|
||||
float m_fTime;
|
||||
//
|
||||
float m_fCameraRotX,m_fCameraRotY;//Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
float m_fBattleCameraRotY;
|
||||
float m_fDirection;
|
||||
float m_fMouseClickInterCharacterCamera,m_fBattleInterCharacterCamera;
|
||||
vector3 m_vecTargetCameraPosition;
|
||||
vector3 m_vecCameraPos;
|
||||
//
|
||||
|
||||
|
||||
|
||||
static DWORD m_nCameraAnimationTimer;
|
||||
CCameraControl();
|
||||
virtual ~CCameraControl();
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_)
|
||||
381
Client/CharacterActionControl/CharacterActionControl.vcproj
Normal file
381
Client/CharacterActionControl/CharacterActionControl.vcproj
Normal file
@@ -0,0 +1,381 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="CharacterActionControl"
|
||||
ProjectGUID="{3A5BBAD5-1C45-4F24-973C-DC63B5C0F8AF}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../Library/$(ConfigurationName)"
|
||||
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;"../../Engine/Zalla3D Base Class";"../../Engine/Zalla3D Scene Class";../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/CharacterActionControl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../Library/$(ConfigurationName)"
|
||||
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;"../../Engine/Zalla3D Base Class";"../../Engine/Zalla3D Scene Class";../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/CharacterActionControl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_NoGD|Win32"
|
||||
OutputDirectory="../../Library/$(ConfigurationName)"
|
||||
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;"../../Engine/Zalla3D Base Class";"../../Engine/Zalla3D Scene Class";../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/CharacterActionControl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_MY|Win32"
|
||||
OutputDirectory="../../Library/$(ConfigurationName)"
|
||||
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;"../../Engine/Zalla3D Base Class";"../../Engine/Zalla3D Scene Class";../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/CharacterActionControl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug_MY|Win32"
|
||||
OutputDirectory="../../Library/$(ConfigurationName)"
|
||||
IntermediateDirectory="../../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;"../../Engine/Zalla3D Base Class";"../../Engine/Zalla3D Scene Class";../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/CharacterActionControl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<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=".\CameraControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCameraScript.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputDevice.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputJoystick.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputKeyboard.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputMouse.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=".\CameraControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCameraScript.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CreatureSize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputDevice.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputJoystick.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputKeyboard.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\InputMouse.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}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Creature Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLCreature.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCreature.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Creature Effect Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLCreatureEffect.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCreatureEffect.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLDamageEffect.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLDamageEffect.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Creature Common Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLCreatureCommon.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Creature Manager Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLCharacterDataManager.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCharacterDataManager.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCreatureManager.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCreatureManager.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Creature Control Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLCharacterControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLCharacterControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLDropshipControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLDropshipControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLObjectControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLObjectControl.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Siege"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLLongAttackWeaponControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLLongAttackWeaponControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLShortAttackWeaponControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLShortAttackWeaponControl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Castle"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RYLLongDefenceWeaponControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLLongDefenceWeaponControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLShortDefenceWeaponControl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RYLShortDefenceWeaponControl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
229
Client/CharacterActionControl/CharacterActionControl.vcxproj
Normal file
229
Client/CharacterActionControl/CharacterActionControl.vcxproj
Normal file
@@ -0,0 +1,229 @@
|
||||
<?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|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>{3A5BBAD5-1C45-4F24-973C-DC63B5C0F8AF}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</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)'=='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'">../../Library/$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../Library/$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">../../Library/$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">../../Library/$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">../../Library/$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">../../Intermediate/$(ProjectName)/$(Configuration)\</IntDir>
|
||||
<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|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'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;../../Engine/Zalla3D Base Class;../../Engine/Zalla3D Scene Class;../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)CharacterActionControl.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;../../Engine/Zalla3D Base Class;../../Engine/Zalla3D Scene Class;../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)CharacterActionControl.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_NoGD|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;../../Engine/Zalla3D Base Class;../../Engine/Zalla3D Scene Class;../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)CharacterActionControl.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;../../Engine/Zalla3D Base Class;../../Engine/Zalla3D Scene Class;../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)CharacterActionControl.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_MY|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../RYLClient;../RYLClient/RYLUI;../RYLClient/RYLClient;../RYLClient/EventHandler;../../Engine/Effect;../../Engine/SoundLib;../../Engine/Zalla3D Base Class;../../Engine/Zalla3D Scene Class;../../Engine/Caldron;../GlobalScript;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)CharacterActionControl.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CameraControl.cpp" />
|
||||
<ClCompile Include="CCameraScript.cpp" />
|
||||
<ClCompile Include="InputDevice.cpp" />
|
||||
<ClCompile Include="InputJoystick.cpp" />
|
||||
<ClCompile Include="InputKeyboard.cpp" />
|
||||
<ClCompile Include="InputMouse.cpp" />
|
||||
<ClCompile Include="RYLCreature.cpp" />
|
||||
<ClCompile Include="RYLCreatureEffect.cpp" />
|
||||
<ClCompile Include="RYLDamageEffect.cpp" />
|
||||
<ClCompile Include="RYLCharacterDataManager.cpp" />
|
||||
<ClCompile Include="RYLCreatureManager.cpp" />
|
||||
<ClCompile Include="RYLCharacterControl.cpp" />
|
||||
<ClCompile Include="RYLDropshipControl.cpp" />
|
||||
<ClCompile Include="RYLObjectControl.cpp" />
|
||||
<ClCompile Include="RYLLongAttackWeaponControl.cpp" />
|
||||
<ClCompile Include="RYLShortAttackWeaponControl.cpp" />
|
||||
<ClCompile Include="RYLLongDefenceWeaponControl.cpp" />
|
||||
<ClCompile Include="RYLShortDefenceWeaponControl.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CameraControl.h" />
|
||||
<ClInclude Include="CCameraScript.h" />
|
||||
<ClInclude Include="CreatureSize.h" />
|
||||
<ClInclude Include="InputDevice.h" />
|
||||
<ClInclude Include="InputJoystick.h" />
|
||||
<ClInclude Include="InputKeyboard.h" />
|
||||
<ClInclude Include="InputMouse.h" />
|
||||
<ClInclude Include="RYLCreature.h" />
|
||||
<ClInclude Include="RYLCreatureEffect.h" />
|
||||
<ClInclude Include="RYLDamageEffect.h" />
|
||||
<ClInclude Include="RYLCreatureCommon.h" />
|
||||
<ClInclude Include="RYLCharacterDataManager.h" />
|
||||
<ClInclude Include="RYLCreatureManager.h" />
|
||||
<ClInclude Include="RYLCharacterControl.h" />
|
||||
<ClInclude Include="RYLDropshipControl.h" />
|
||||
<ClInclude Include="RYLObjectControl.h" />
|
||||
<ClInclude Include="RYLLongAttackWeaponControl.h" />
|
||||
<ClInclude Include="RYLShortAttackWeaponControl.h" />
|
||||
<ClInclude Include="RYLLongDefenceWeaponControl.h" />
|
||||
<ClInclude Include="RYLShortDefenceWeaponControl.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\MemoryManager\MemoryManager.vcxproj">
|
||||
<Project>{b6bdd524-1dde-4a65-aed7-9ee4bc86a05d}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,159 @@
|
||||
<?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="Creature Files">
|
||||
<UniqueIdentifier>{f16294ca-1c1e-45a5-b1e0-6a6d8ddd305a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Files\Creature Effect Files">
|
||||
<UniqueIdentifier>{e6772d5c-058a-4853-beab-86f64cd2a536}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Common Files">
|
||||
<UniqueIdentifier>{7aed39bc-386a-45a2-9cb2-7425fd71020b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Manager Files">
|
||||
<UniqueIdentifier>{fa13df36-776a-448f-9936-280b50406ebe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Control Files">
|
||||
<UniqueIdentifier>{8853dde1-0a12-4907-8cb5-ff31050aa058}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Control Files\Siege">
|
||||
<UniqueIdentifier>{4bf65774-aea6-41a1-a1ad-05da2e78821c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Creature Control Files\Castle">
|
||||
<UniqueIdentifier>{193e3faa-674b-461d-9d7e-7946ac6b7f92}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CameraControl.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CCameraScript.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InputDevice.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InputJoystick.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InputKeyboard.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InputMouse.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLCreature.cpp">
|
||||
<Filter>Creature Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLCreatureEffect.cpp">
|
||||
<Filter>Creature Files\Creature Effect Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLDamageEffect.cpp">
|
||||
<Filter>Creature Files\Creature Effect Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLCharacterDataManager.cpp">
|
||||
<Filter>Creature Manager Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLCreatureManager.cpp">
|
||||
<Filter>Creature Manager Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLCharacterControl.cpp">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLDropshipControl.cpp">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLObjectControl.cpp">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLLongAttackWeaponControl.cpp">
|
||||
<Filter>Creature Control Files\Siege</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLShortAttackWeaponControl.cpp">
|
||||
<Filter>Creature Control Files\Siege</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLLongDefenceWeaponControl.cpp">
|
||||
<Filter>Creature Control Files\Castle</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RYLShortDefenceWeaponControl.cpp">
|
||||
<Filter>Creature Control Files\Castle</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CameraControl.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CCameraScript.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CreatureSize.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InputDevice.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InputJoystick.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InputKeyboard.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InputMouse.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCreature.h">
|
||||
<Filter>Creature Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCreatureEffect.h">
|
||||
<Filter>Creature Files\Creature Effect Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLDamageEffect.h">
|
||||
<Filter>Creature Files\Creature Effect Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCreatureCommon.h">
|
||||
<Filter>Creature Common Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCharacterDataManager.h">
|
||||
<Filter>Creature Manager Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCreatureManager.h">
|
||||
<Filter>Creature Manager Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLCharacterControl.h">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLDropshipControl.h">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLObjectControl.h">
|
||||
<Filter>Creature Control Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLLongAttackWeaponControl.h">
|
||||
<Filter>Creature Control Files\Siege</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLShortAttackWeaponControl.h">
|
||||
<Filter>Creature Control Files\Siege</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLLongDefenceWeaponControl.h">
|
||||
<Filter>Creature Control Files\Castle</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RYLShortDefenceWeaponControl.h">
|
||||
<Filter>Creature Control Files\Castle</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
503
Client/CharacterActionControl/CreatureSize.h
Normal file
503
Client/CharacterActionControl/CreatureSize.h
Normal file
@@ -0,0 +1,503 @@
|
||||
// CreatureSize.h: interface for the CCreatureSize class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_)
|
||||
#define AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
class CCreatureSize
|
||||
{
|
||||
public:
|
||||
vector3 vecMonsterMinBox[200];
|
||||
vector3 vecMonsterMaxBox[200];
|
||||
|
||||
CCreatureSize()
|
||||
{
|
||||
|
||||
vecMonsterMinBox[1]=vector3(-35.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[1]=vector3(35.0f, 0.0f, 65.0f);
|
||||
|
||||
vecMonsterMinBox[2]=vector3(-42.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[2]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[3]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[3]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[4]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[4]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[5]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[5]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[6]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[6]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[7]=vector3(-56.0f, 0.0f, -88.0f);
|
||||
vecMonsterMaxBox[7]=vector3(56.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[8]=vector3(-56.0f, 0.0f, -88.0f);
|
||||
vecMonsterMaxBox[8]=vector3(56.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[9]=vector3(-32.0f, 0.0f, -40.0f);
|
||||
vecMonsterMaxBox[9]=vector3(32.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[10]=vector3(-45.0f, 0.0f, -35.0f);
|
||||
vecMonsterMaxBox[10]=vector3(35.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[11]=vector3(-40.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[11]=vector3(40.0f, 0.0f, 25.0f);
|
||||
|
||||
vecMonsterMinBox[12]=vector3(-40.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[12]=vector3(30.0f, 0.0f, 20.0f);
|
||||
|
||||
vecMonsterMinBox[13]=vector3(-40.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[13]=vector3(30.0f, 0.0f, 20.0f);
|
||||
|
||||
vecMonsterMinBox[14]=vector3(-49.5f, 0.0f, -38.5f);
|
||||
vecMonsterMaxBox[14]=vector3(38.5f, 0.0f, 60.5f);
|
||||
|
||||
vecMonsterMinBox[15]=vector3(-44.0f, 0.0f, -27.5f);
|
||||
vecMonsterMaxBox[15]=vector3(44.0f, 0.0f, 27.5f);
|
||||
|
||||
vecMonsterMinBox[16]=vector3(-44.0f, 0.0f, -60.5f);
|
||||
vecMonsterMaxBox[16]=vector3(33.0f, 0.0f, 22.0f);
|
||||
|
||||
vecMonsterMinBox[17]=vector3(-44.0f, 0.0f, -60.5f);
|
||||
vecMonsterMaxBox[17]=vector3(33.0f, 0.0f, 22.0f);
|
||||
|
||||
vecMonsterMinBox[18]=vector3(-54.0f, 0.0f, -42.0f);
|
||||
vecMonsterMaxBox[18]=vector3(42.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[19]=vector3(-48.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[19]=vector3(48.0f, 0.0f, 30.0f);
|
||||
|
||||
vecMonsterMinBox[20]=vector3(-50.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[20]=vector3(65.0f, 0.0f, 155.0f);
|
||||
|
||||
vecMonsterMinBox[21]=vector3(-48.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[21]=vector3(36.0f, 0.0f, 24.0f);
|
||||
|
||||
vecMonsterMinBox[22]=vector3(-48.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[22]=vector3(36.0f, 0.0f, 24.0f);
|
||||
|
||||
vecMonsterMinBox[23]=vector3(-30.0f, 0.0f, -15.0f);
|
||||
vecMonsterMaxBox[23]=vector3(35.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[24]=vector3(-25.0f, 0.0f, -20.0f);
|
||||
vecMonsterMaxBox[24]=vector3(25.0f, 0.0f, 35.0f);
|
||||
|
||||
vecMonsterMinBox[25]=vector3(-20.0f, 0.0f, -70.0f);
|
||||
vecMonsterMaxBox[25]=vector3(15.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[26]=vector3(-95.0f, 0.0f, -80.0f);
|
||||
vecMonsterMaxBox[26]=vector3(95.0f, 0.0f, 100.0f);
|
||||
|
||||
vecMonsterMinBox[27]=vector3(-36.0f, 0.0f, -18.0f);
|
||||
vecMonsterMaxBox[27]=vector3(42.0f, 0.0f, 180.0f);
|
||||
|
||||
vecMonsterMinBox[28]=vector3(-35.0f, 0.0f, -17.5f);
|
||||
vecMonsterMaxBox[28]=vector3(24.5f, 0.0f, 45.5f);
|
||||
|
||||
vecMonsterMinBox[29]=vector3(-30.0f, 0.0f, -24.0f);
|
||||
vecMonsterMaxBox[29]=vector3(30.0f, 0.0f, 42.0f);
|
||||
|
||||
vecMonsterMinBox[30]=vector3(-24.0f, 0.0f, -84.0f);
|
||||
vecMonsterMaxBox[30]=vector3(18.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[31]=vector3(-142.5f, 0.0f, -120.0f);
|
||||
vecMonsterMaxBox[31]=vector3(142.5f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[32]=vector3(-50.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[32]=vector3(35.0f, 0.0f, 65.0f);
|
||||
|
||||
vecMonsterMinBox[33]=vector3(-190.0f, 0.0f, -160.0f);
|
||||
vecMonsterMaxBox[33]=vector3(190.0f, 0.0f, 200.0f);
|
||||
|
||||
vecMonsterMinBox[34]=vector3(-60.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[34]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[35]=vector3(-120.0f, 0.0f, -115.0f);
|
||||
vecMonsterMaxBox[35]=vector3(95.0f, 0.0f, 120.0f);
|
||||
|
||||
vecMonsterMinBox[36]=vector3(-90.0f, 0.0f, -120.0f);
|
||||
vecMonsterMaxBox[36]=vector3(90.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[37]=vector3(-45.0f, 0.0f, -165.0f);
|
||||
vecMonsterMaxBox[37]=vector3(55.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[38]=vector3(-45.0f, 0.0f, -180.0f);
|
||||
vecMonsterMaxBox[38]=vector3(50.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[39]=vector3(-45.0f, 0.0f, -180.0f);
|
||||
vecMonsterMaxBox[39]=vector3(50.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[40]=vector3(-35.0f, 0.0f, -28.0f);
|
||||
vecMonsterMaxBox[40]=vector3(35.0f, 0.0f, 49.0f);
|
||||
|
||||
vecMonsterMinBox[41]=vector3(-60.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[41]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[42]=vector3(-44.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[42]=vector3(44.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[43]=vector3(-78.0f, 0.0f, -72.0f);
|
||||
vecMonsterMaxBox[43]=vector3(60.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[44]=vector3(-108.0f, 0.0f, -144.0f);
|
||||
vecMonsterMaxBox[44]=vector3(108.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[45]=vector3(-54.0f, 0.0f, -198.0f);
|
||||
vecMonsterMaxBox[45]=vector3(66.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[46]=vector3(-54.0f, 0.0f, -216.0f);
|
||||
vecMonsterMaxBox[46]=vector3(60.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[47]=vector3(-54.0f, 0.0f, -216.0f);
|
||||
vecMonsterMaxBox[47]=vector3(60.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[48]=vector3(-70.0f, 0.0f, -35.0f);
|
||||
vecMonsterMaxBox[48]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[49]=vector3(-168.0f, 0.0f, -161.0f);
|
||||
vecMonsterMaxBox[49]=vector3(133.0f, 0.0f, 168.0f);
|
||||
|
||||
vecMonsterMinBox[50]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[50]=vector3(20.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[51]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[51]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[52]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[52]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[53]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[53]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[54]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[54]=vector3(20.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[55]=vector3(-96.0f, 0.0f, -90.0f);
|
||||
vecMonsterMaxBox[55]=vector3(96.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[56]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[56]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[57]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[57]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[58]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[58]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[59]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[59]=vector3(20.0f, 0.0f, 145.0f);
|
||||
|
||||
vecMonsterMinBox[60]=vector3(-28.0f, 0.0f, -63.0f);
|
||||
vecMonsterMaxBox[60]=vector3(28.0f, 0.0f, 203.0f);
|
||||
|
||||
vecMonsterMinBox[61]=vector3(-60.0f, 0.0f, -75.0f);
|
||||
vecMonsterMaxBox[61]=vector3(60.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[62]=vector3(-126.0f, 0.0f, -168.0f);
|
||||
vecMonsterMaxBox[62]=vector3(126.0f, 0.0f, 112.0f);
|
||||
|
||||
vecMonsterMinBox[63]=vector3(-63.0f, 0.0f, -231.0f);
|
||||
vecMonsterMaxBox[63]=vector3(77.0f, 0.0f, 112.0f);
|
||||
|
||||
vecMonsterMinBox[64]=vector3(-63.0f, 0.0f, -252.0f);
|
||||
vecMonsterMaxBox[64]=vector3(70.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[65]=vector3(-63.0f,0.0f, -252.0f);
|
||||
vecMonsterMaxBox[65]=vector3(70.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[66]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[66]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[67]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[67]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[68]=vector3(-112.0f,0.0f, -105.0f);
|
||||
vecMonsterMaxBox[68]=vector3(112.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[69]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[69]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[70]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[70]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[71]=vector3(-119.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[71]=vector3(119.0f, 0.0f, 189.0f);
|
||||
|
||||
vecMonsterMinBox[72]=vector3(-168.0f,0.0f, -184.0f);
|
||||
vecMonsterMaxBox[72]=vector3(88.0f, 0.0f, 192.0f);
|
||||
|
||||
vecMonsterMinBox[73]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[73]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[74]=vector3(-75.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[74]=vector3(60.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[75]=vector3(-75.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[75]=vector3(60.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[76]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[76]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[77]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[77]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[78]=vector3(-70.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[78]=vector3(30.0f, 0.0f, 45.0f);
|
||||
|
||||
vecMonsterMinBox[79]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[79]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[80]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[80]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[81]=vector3(-80.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[81]=vector3(100.0f, 0.0f, 85.0f);
|
||||
|
||||
vecMonsterMinBox[82]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[82]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[83]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[83]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[84]=vector3(-20.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[84]=vector3(15.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[85]=vector3(-58.5f,0.0f, -36.0f);
|
||||
vecMonsterMaxBox[85]=vector3(108.0f, 0.0f, 144.0f);
|
||||
|
||||
vecMonsterMinBox[86]=vector3(-71.5f,0.0f, -44.0f);
|
||||
vecMonsterMaxBox[86]=vector3(132.0f, 0.0f, 176.0f);
|
||||
|
||||
vecMonsterMinBox[87]=vector3(-24.0f,0.0f, -84.0f);
|
||||
vecMonsterMaxBox[87]=vector3(18.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[88]=vector3(-240.0f,0.0f, -230.0f);
|
||||
vecMonsterMaxBox[88]=vector3(190.0f, 0.0f, 240.0f);
|
||||
|
||||
vecMonsterMinBox[89]=vector3(-22.5f,0.0f, -52.5f);
|
||||
vecMonsterMaxBox[89]=vector3(22.5f, 0.0f, 127.5f);
|
||||
|
||||
vecMonsterMinBox[90]=vector3(-66.0f,0.0f, -11.0f);
|
||||
vecMonsterMaxBox[90]=vector3(82.5f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[91]=vector3(-78.0f,0.0f, -72.0f);
|
||||
vecMonsterMaxBox[91]=vector3(60.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[92]=vector3(-98.0f,0.0f, -91.0f);
|
||||
vecMonsterMaxBox[92]=vector3(147.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[93]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[93]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[94]=vector3(-91.0f,0.0f, -56.0f);
|
||||
vecMonsterMaxBox[94]=vector3(168.0f, 0.0f, 224.0f);
|
||||
|
||||
vecMonsterMinBox[95]=vector3(-150.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[95]=vector3(105.0f, 0.0f, 160.0f);
|
||||
|
||||
vecMonsterMinBox[96]=vector3(-130.0f,0.0f, -80.0f);
|
||||
vecMonsterMaxBox[96]=vector3(240.0f, 0.0f, 320.0f);
|
||||
|
||||
vecMonsterMinBox[97]=vector3(-45.0f,0.0f, -105.0f);
|
||||
vecMonsterMaxBox[97]=vector3(45.0f, 0.0f, 255.0f);
|
||||
|
||||
vecMonsterMinBox[98]=vector3(-150.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[98]=vector3(105.0f, 0.0f, 160.0f);
|
||||
|
||||
vecMonsterMinBox[99]=vector3(-130.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[99]=vector3(80.0f, 0.0f, 130.0f);
|
||||
|
||||
vecMonsterMinBox[100]=vector3(-115.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[100]=vector3(80.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[101]=vector3(-180.0f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[101]=vector3(126.0f, 0.0f, 192.0f);
|
||||
|
||||
vecMonsterMinBox[102]=vector3(-156.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[102]=vector3(96.0f, 0.0f, 156.0f);
|
||||
|
||||
vecMonsterMinBox[103]=vector3(-96.0f,0.0f, -16.0f);
|
||||
vecMonsterMaxBox[103]=vector3(120.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[104]=vector3(-138.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[104]=vector3(96.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[105]=vector3(-50.0f,0.0f, -25.0f);
|
||||
vecMonsterMaxBox[105]=vector3(60.0f, 0.0f, 130.0f);
|
||||
|
||||
vecMonsterMinBox[106]=vector3(-50.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[106]=vector3(45.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[107]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[107]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[108]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[108]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[109]=vector3(-30.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[109]=vector3(40.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[110]=vector3(-30.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[110]=vector3(40.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[111]=vector3(-60.0f,0.0f, -30.0f);
|
||||
vecMonsterMaxBox[111]=vector3(72.0f, 0.0f, 156.0f);
|
||||
|
||||
vecMonsterMinBox[112]=vector3(-60.0f,0.0f, -24.0f);
|
||||
vecMonsterMaxBox[112]=vector3(54.0f, 0.0f, 48.0f);
|
||||
|
||||
vecMonsterMinBox[113]=vector3(-210.0f,0.0f, -91.0f);
|
||||
vecMonsterMaxBox[113]=vector3(147.0f, 0.0f, 224.0f);
|
||||
|
||||
vecMonsterMinBox[114]=vector3(-182.0f,0.0f, -77.0f);
|
||||
vecMonsterMaxBox[114]=vector3(112.0f, 0.0f, 182.0f);
|
||||
|
||||
vecMonsterMinBox[115]=vector3(-161.0f,0.0f, -77.0f);
|
||||
vecMonsterMaxBox[115]=vector3(112.0f, 0.0f, 105.0f);
|
||||
|
||||
vecMonsterMinBox[116]=vector3(-85.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[116]=vector3(85.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[117]=vector3(-36.0f,0.0f, -42.0f);
|
||||
vecMonsterMaxBox[117]=vector3(48.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[118]=vector3(-36.0f,0.0f, -42.0f);
|
||||
vecMonsterMaxBox[118]=vector3(48.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[119]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[119]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[120]=vector3(-95.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[120]=vector3(95.0f, 0.0f, 165.0f);
|
||||
|
||||
vecMonsterMinBox[121]=vector3(-114.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[121]=vector3(114.0f, 0.0f, 198.0f);
|
||||
|
||||
vecMonsterMinBox[122]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[122]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[123]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[123]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[124]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[124]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[125]=vector3(-85.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[125]=vector3(85.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[126]=vector3(-133.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[126]=vector3(133.0f, 0.0f, 231.0f);
|
||||
|
||||
vecMonsterMinBox[127]=vector3(-70.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[127]=vector3(84.0f, 0.0f, 182.0f);
|
||||
|
||||
vecMonsterMinBox[128]=vector3(-70.0f,0.0f, -28.0f);
|
||||
vecMonsterMaxBox[128]=vector3(63.0f, 0.0f, 56.0f);
|
||||
|
||||
vecMonsterMinBox[129]=vector3(-42.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[129]=vector3(56.0f, 0.0f, 84.0f);
|
||||
|
||||
vecMonsterMinBox[130]=vector3(-42.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[130]=vector3(56.0f, 0.0f, 84.0f);
|
||||
|
||||
vecMonsterMinBox[131]=vector3(-80.0f,0.0f, -40.0f);
|
||||
vecMonsterMaxBox[131]=vector3(96.0f, 0.0f, 208.0f);
|
||||
|
||||
vecMonsterMinBox[132]=vector3(-84.5f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[132]=vector3(65.0f, 0.0f, 84.5f);
|
||||
|
||||
vecMonsterMinBox[133]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[133]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[134]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[134]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[135]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[135]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[136]=vector3(-80.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[136]=vector3(70.0f, 0.0f, 145.0f);
|
||||
|
||||
vecMonsterMinBox[137]=vector3(-80.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[137]=vector3(60.0f, 0.0f, 115.0f);
|
||||
|
||||
vecMonsterMinBox[138]=vector3(-240.0f,0.0f, -262.5f);
|
||||
vecMonsterMaxBox[138]=vector3(405.0f, 0.0f, 225.0f);
|
||||
|
||||
vecMonsterMinBox[139]=vector3(-250.0f,0.0f, -205.0f);
|
||||
vecMonsterMaxBox[139]=vector3(195.0f, 0.0f, 135.0f);
|
||||
|
||||
vecMonsterMinBox[140]=vector3(-25.0f,0.0f, -25.0f);
|
||||
vecMonsterMaxBox[140]=vector3(25.0f, 0.0f, 25.0f);
|
||||
|
||||
vecMonsterMinBox[141]=vector3(-145.0f,0.0f, -280.0f);
|
||||
vecMonsterMaxBox[141]=vector3(135.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[142]=vector3(-40.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[142]=vector3(40.0f, 0.0f, 280.0f);
|
||||
|
||||
vecMonsterMinBox[143]=vector3(-40.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[143]=vector3(40.0f, 0.0f, 290.0f);
|
||||
|
||||
vecMonsterMinBox[144]=vector3(-50.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[144]=vector3(50.0f, 0.0f, 300.0f);
|
||||
|
||||
vecMonsterMinBox[145]=vector3(-50.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[145]=vector3(50.0f, 0.0f, 300.0f);
|
||||
|
||||
vecMonsterMinBox[146]=vector3(-81.0f,0.0f, -108.0f);
|
||||
vecMonsterMaxBox[146]=vector3(81.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[147]=vector3(-40.5f,0.0f, -148.5f);
|
||||
vecMonsterMaxBox[147]=vector3(49.5f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[148]=vector3(-30.0f,0.0f, -37.5f);
|
||||
vecMonsterMaxBox[148]=vector3(30.0f, 0.0f, 37.5f);
|
||||
|
||||
vecMonsterMinBox[149]=vector3(-45.0f,0.0f, -22.5f);
|
||||
vecMonsterMaxBox[149]=vector3(58.5f, 0.0f, 139.5f);
|
||||
|
||||
vecMonsterMinBox[150]=vector3(-72.0f,0.0f, -67.5f);
|
||||
vecMonsterMaxBox[150]=vector3(72.0f, 0.0f, 81.0f);
|
||||
|
||||
vecMonsterMinBox[151]=vector3(-49.5f,0.0f, -180.0f);
|
||||
vecMonsterMaxBox[151]=vector3(40.5f, 0.0f, 54.0f);
|
||||
|
||||
vecMonsterMinBox[152]=vector3(-54.0f,0.0f, -9.0f);
|
||||
vecMonsterMaxBox[152]=vector3(67.5f, 0.0f, 54.0f);
|
||||
|
||||
vecMonsterMinBox[153]=vector3(-84.0f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[153]=vector3(126.0f, 0.0f, 120.0f);
|
||||
|
||||
vecMonsterMinBox[154]=vector3(-96.0f,0.0f, -84.0f);
|
||||
vecMonsterMaxBox[154]=vector3(84.0f, 0.0f, 174.0f);
|
||||
|
||||
vecMonsterMinBox[155]=vector3(-96.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[155]=vector3(72.0f, 0.0f, 138.0f);
|
||||
|
||||
vecMonsterMinBox[156]=vector3(-95.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[156]=vector3(95.0f, 0.0f, 165.0f);
|
||||
|
||||
vecMonsterMinBox[157]=vector3(-90.0f,0.0f, -120.0f);
|
||||
vecMonsterMaxBox[157]=vector3(90.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[158]=vector3(-45.0f,0.0f, -165.0f);
|
||||
vecMonsterMaxBox[158]=vector3(55.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[159]=vector3(-45.0f,0.0f, -22.5f);
|
||||
vecMonsterMaxBox[159]=vector3(58.5f, 0.0f, 139.5f);
|
||||
|
||||
}
|
||||
|
||||
~CCreatureSize() { }
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_)
|
||||
320
Client/CharacterActionControl/InputDevice.cpp
Normal file
320
Client/CharacterActionControl/InputDevice.cpp
Normal file
@@ -0,0 +1,320 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "InputDevice.h"
|
||||
|
||||
CInputDevice::CInputDevice()
|
||||
: m_pDirectInput(NULL), m_pDIDeviceKeyboard(NULL), m_pDIDeviceMouse(NULL), m_pDIDeviceJoystick(NULL),
|
||||
m_bKeyboard(false), m_bMouse(false), m_bJoystick(false), m_bForcefeedback(false), m_ucSliderCount(0),
|
||||
m_lpdiEffect(NULL), m_ucPOVCount(0), m_ucButtionCount(0)
|
||||
{
|
||||
memset(m_aKey, 0, sizeof(unsigned char)*256);
|
||||
memset(&m_dims2, 0, sizeof(DIMOUSESTATE2));
|
||||
memset(&m_dijs2, 0, sizeof(DIJOYSTATE2));
|
||||
|
||||
for (unsigned char ucIndex = 0; ucIndex < 4; ucIndex++)
|
||||
{
|
||||
m_dijs2.rgdwPOV[ucIndex] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
CInputDevice::~CInputDevice()
|
||||
{
|
||||
}
|
||||
|
||||
bool CInputDevice::Initialize(HWND hWnd, bool bKeyboard, bool bMouse, bool bJoystick)
|
||||
{
|
||||
HRESULT hr = DirectInput8Create(
|
||||
GetModuleHandle(NULL),
|
||||
DIRECTINPUT_VERSION,
|
||||
IID_IDirectInput8,
|
||||
(VOID**)&m_pDirectInput,
|
||||
NULL);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
m_hWnd = hWnd;
|
||||
|
||||
// Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if (true == bKeyboard)
|
||||
{
|
||||
hr = m_pDirectInput->CreateDevice(GUID_SysKeyboard, &m_pDIDeviceKeyboard, NULL);
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = m_pDIDeviceKeyboard->SetDataFormat(&c_dfDIKeyboard);
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = m_pDIDeviceKeyboard->SetCooperativeLevel(hWnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE);
|
||||
DI_FAILED(hr);
|
||||
|
||||
m_pDIDeviceKeyboard->Acquire();
|
||||
|
||||
m_bKeyboard = bKeyboard;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>콺 <20><><EFBFBD><EFBFBD>
|
||||
if (true == bMouse)
|
||||
{
|
||||
hr = m_pDirectInput->CreateDevice(GUID_SysMouse, &m_pDIDeviceMouse, NULL);
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = m_pDIDeviceMouse->SetDataFormat(&c_dfDIMouse2);
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = m_pDIDeviceMouse->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND);
|
||||
DI_FAILED(hr);
|
||||
|
||||
m_pDIDeviceMouse->Acquire();
|
||||
|
||||
m_bMouse = bMouse;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD>
|
||||
if (true == bJoystick)
|
||||
{
|
||||
hr = m_pDirectInput->EnumDevices(DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, NULL, DIEDFL_ATTACHEDONLY);
|
||||
|
||||
DI_FAILED(hr);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CInputDevice::Release(void)
|
||||
{
|
||||
if (NULL != m_pDIDeviceKeyboard)
|
||||
{
|
||||
m_pDIDeviceKeyboard->Unacquire();
|
||||
SAFE_RELEASE(m_pDIDeviceKeyboard);
|
||||
}
|
||||
|
||||
if (NULL != m_pDIDeviceMouse)
|
||||
{
|
||||
m_pDIDeviceMouse->Unacquire();
|
||||
SAFE_RELEASE(m_pDIDeviceMouse);
|
||||
}
|
||||
|
||||
if (NULL != m_lpdiEffect)
|
||||
{
|
||||
m_lpdiEffect->Stop();
|
||||
SAFE_RELEASE(m_lpdiEffect);
|
||||
}
|
||||
|
||||
if (NULL != m_pDIDeviceJoystick)
|
||||
{
|
||||
m_pDIDeviceJoystick->Unacquire();
|
||||
SAFE_RELEASE(m_pDIDeviceJoystick);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pDirectInput);
|
||||
}
|
||||
|
||||
void CInputDevice::Process(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// Ű<><C5B0><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
if (NULL != m_pDIDeviceKeyboard && true == m_bKeyboard)
|
||||
{
|
||||
ZeroMemory(m_aKey, sizeof(m_aKey));
|
||||
|
||||
hr = m_pDIDeviceKeyboard->GetDeviceState(sizeof(m_aKey), m_aKey);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
hr = m_pDIDeviceKeyboard->Acquire();
|
||||
|
||||
if (hr == DIERR_OTHERAPPHASPRIO || hr == DIERR_NOTACQUIRED)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>콺 ó<><C3B3>
|
||||
if (NULL != m_pDIDeviceMouse && true == m_bMouse)
|
||||
{
|
||||
ZeroMemory(&m_dims2, sizeof(DIMOUSESTATE2));
|
||||
|
||||
hr = m_pDIDeviceMouse->GetDeviceState(sizeof(DIMOUSESTATE2), &m_dims2);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
hr = m_pDIDeviceMouse->Acquire();
|
||||
|
||||
if (hr==DIERR_OTHERAPPHASPRIO || hr==DIERR_NOTACQUIRED)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>̽<EFBFBD>ƽ ó<><C3B3>
|
||||
if (NULL != m_pDIDeviceJoystick && true == m_bJoystick)
|
||||
{
|
||||
hr = m_pDIDeviceJoystick->Poll();
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
hr = m_pDIDeviceJoystick->Acquire();
|
||||
|
||||
if (hr==DIERR_OTHERAPPHASPRIO || hr==DIERR_NOTACQUIRED)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&m_dijs2, sizeof(DIJOYSTATE2));
|
||||
|
||||
hr = m_pDIDeviceJoystick->GetDeviceState(sizeof(DIJOYSTATE2), &m_dijs2);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
hr = m_pDIDeviceJoystick->Acquire();
|
||||
|
||||
if (hr==DIERR_OTHERAPPHASPRIO || hr==DIERR_NOTACQUIRED)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext)
|
||||
{
|
||||
CInputDevice* pInputDevice = CInputDevice::GetInstance();
|
||||
|
||||
HRESULT hr = pInputDevice->m_pDirectInput->CreateDevice(pdidInstance->guidInstance, &pInputDevice->m_pDIDeviceJoystick, NULL);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->SetDataFormat(&c_dfDIJoystick2);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->SetCooperativeLevel(pInputDevice->GetWindowHandle(), DISCL_EXCLUSIVE | DISCL_FOREGROUND);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
DIDEVCAPS didevcaps;
|
||||
memset(&didevcaps, 0, sizeof(DIDEVCAPS));
|
||||
didevcaps.dwSize = sizeof(DIDEVCAPS);
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->GetCapabilities(&didevcaps);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
if (didevcaps.dwFlags & DIDC_FORCEFEEDBACK)
|
||||
{
|
||||
pInputDevice->m_bForcefeedback = true;
|
||||
}
|
||||
|
||||
if (pInputDevice->m_bForcefeedback)
|
||||
{
|
||||
DIPROPDWORD dipdw;
|
||||
dipdw.diph.dwSize = sizeof(DIPROPDWORD);
|
||||
dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
||||
dipdw.diph.dwObj = 0;
|
||||
dipdw.diph.dwHow = DIPH_DEVICE;
|
||||
dipdw.dwData = FALSE;
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->SetProperty( DIPROP_AUTOCENTER, &dipdw.diph);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->EnumObjects(EnumAxesCallback,
|
||||
(VOID*)&pInputDevice->m_dwNumForceFeedbackAxis, DIDFT_AXIS);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
if (pInputDevice->m_dwNumForceFeedbackAxis > 2)
|
||||
{
|
||||
pInputDevice->m_dwNumForceFeedbackAxis = 2;
|
||||
}
|
||||
|
||||
DWORD rgdwAxes[2] = { DIJOFS_X, DIJOFS_Y };
|
||||
LONG rglDirection[2] = { 0, 0 };
|
||||
DICONSTANTFORCE cf = { 0 };
|
||||
|
||||
DIEFFECT eff;
|
||||
ZeroMemory(&eff, sizeof(eff));
|
||||
eff.dwSize = sizeof(DIEFFECT);
|
||||
eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS;
|
||||
eff.dwDuration = INFINITE;
|
||||
eff.dwSamplePeriod = 0;
|
||||
eff.dwGain = DI_FFNOMINALMAX;
|
||||
eff.dwTriggerButton = DIEB_NOTRIGGER;
|
||||
eff.dwTriggerRepeatInterval = 0;
|
||||
eff.cAxes = pInputDevice->m_dwNumForceFeedbackAxis;
|
||||
eff.rgdwAxes = rgdwAxes;
|
||||
eff.rglDirection = rglDirection;
|
||||
eff.lpEnvelope = 0;
|
||||
eff.cbTypeSpecificParams = sizeof(DICONSTANTFORCE);
|
||||
eff.lpvTypeSpecificParams = &cf;
|
||||
eff.dwStartDelay = 0;
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->CreateEffect( GUID_ConstantForce,
|
||||
&eff, &pInputDevice->m_lpdiEffect, NULL);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
if (!pInputDevice->m_lpdiEffect)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
pInputDevice->m_ucButtionCount = static_cast<unsigned char>(didevcaps.dwButtons);
|
||||
|
||||
hr = pInputDevice->m_pDIDeviceJoystick->EnumObjects(EnumObjectsCallback,
|
||||
(VOID*)pInputDevice->GetWindowHandle(), DIDFT_ALL);
|
||||
|
||||
DI_FAILED(hr);
|
||||
|
||||
pInputDevice->m_pDIDeviceJoystick->Acquire();
|
||||
|
||||
pInputDevice->m_bJoystick = true;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK EnumObjectsCallback(const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext)
|
||||
{
|
||||
CInputDevice* pInputDevice = CInputDevice::GetInstance();
|
||||
|
||||
if (pdidoi->dwType & DIDFT_AXIS)
|
||||
{
|
||||
DIPROPRANGE diprg;
|
||||
diprg.diph.dwSize = sizeof(DIPROPRANGE);
|
||||
diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
||||
diprg.diph.dwHow = DIPH_BYID;
|
||||
diprg.diph.dwObj = pdidoi->dwType;
|
||||
diprg.lMin = -1000;
|
||||
diprg.lMax = +1000;
|
||||
|
||||
HRESULT hr = pInputDevice->m_pDIDeviceJoystick->SetProperty(DIPROP_RANGE, &diprg.diph );
|
||||
|
||||
DI_FAILED(hr);
|
||||
}
|
||||
|
||||
if (GUID_Slider == pdidoi->guidType)
|
||||
{
|
||||
pInputDevice->m_ucSliderCount++;
|
||||
}
|
||||
|
||||
if (GUID_POV == pdidoi->guidType)
|
||||
{
|
||||
pInputDevice->m_ucPOVCount++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext )
|
||||
{
|
||||
DWORD* pdwNumForceFeedbackAxis = (DWORD*) pContext;
|
||||
|
||||
if( (pdidoi->dwFlags & DIDOI_FFACTUATOR) != 0 )
|
||||
{
|
||||
(*pdwNumForceFeedbackAxis)++;
|
||||
}
|
||||
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
117
Client/CharacterActionControl/InputDevice.h
Normal file
117
Client/CharacterActionControl/InputDevice.h
Normal file
@@ -0,0 +1,117 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <dinput.h>
|
||||
|
||||
#define DI_FAILED(hr) \
|
||||
{ \
|
||||
if (FAILED(hr)) \
|
||||
{ \
|
||||
return false; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
|
||||
|
||||
/*!
|
||||
\class CInputDevice
|
||||
DX Input<75><74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
*/
|
||||
|
||||
class CInputDevice
|
||||
{
|
||||
public:
|
||||
|
||||
static CInputDevice* GetInstance()
|
||||
{
|
||||
static CInputDevice inputDevice;
|
||||
return &inputDevice;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief DX Input <20>ʱ<EFBFBD>ȭ <20>Լ<EFBFBD>
|
||||
\param hWnd <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
||||
\param bKeyboard Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
\param bMouse <09><><EFBFBD>콺 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
\param bJoystick <09><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
*/
|
||||
bool Initialize(HWND hWnd, bool bKeyboard, bool bMouse, bool bJoystick);
|
||||
|
||||
//! DX Input Release <20>Լ<EFBFBD>
|
||||
void Release(void);
|
||||
|
||||
//! <20>Է<EFBFBD> ó<><C3B3> <20>ϴ<EFBFBD> <20>Լ<EFBFBD>
|
||||
void Process(void);
|
||||
|
||||
//! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline HWND GetWindowHandle(void) { return m_hWnd; }
|
||||
|
||||
//! Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline bool IsKeyboard(void) { return m_bKeyboard; }
|
||||
//! <20><><EFBFBD>콺 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline bool IsMouse(void) { return m_bMouse; }
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline bool IsJoystick(void) { return m_bJoystick; }
|
||||
|
||||
//! Ű <20><><EFBFBD>¸<EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline unsigned char* GeteyboardState(void) { return m_aKey; }
|
||||
//! <20><><EFBFBD>콺 <20><><EFBFBD>¸<EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline DIMOUSESTATE2* GetMouseState(void) { return &m_dims2; }
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD>¸<EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline DIJOYSTATE2* GetJoyState(void) { return &m_dijs2; }
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><>ư<EFBFBD><C6B0> <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline unsigned char GetJoyButtonCount(void) { return m_ucButtionCount; }
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Force Feedback Axis <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
unsigned long GetNumForceFeedbackAxis(void) { return m_dwNumForceFeedbackAxis; }
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Force Feedback <20><><EFBFBD><EFBFBD> <20><><EFBFBD>θ<EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
inline bool GetForceFeedBack(void) { return m_bForcefeedback; }
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Force Feedback <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>.
|
||||
inline void SetForceFeedBack(bool bForceFeedBack) { m_bForcefeedback = bForceFeedBack; }
|
||||
|
||||
friend class CInputJoystick;
|
||||
friend class CInputMouse;
|
||||
friend class CInputKeyboard;
|
||||
|
||||
private:
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> <20>ݹ<EFBFBD> <20>Լ<EFBFBD>
|
||||
friend BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ݹ<EFBFBD> <20>Լ<EFBFBD>(<28><>ư, Slider, POV).
|
||||
friend BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext );
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Axix <20>ݹ<EFBFBD> <20>Լ<EFBFBD>.
|
||||
friend BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext );
|
||||
|
||||
private:
|
||||
|
||||
CInputDevice();
|
||||
~CInputDevice();
|
||||
|
||||
HWND m_hWnd; //!< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
||||
|
||||
IDirectInput8* m_pDirectInput; //!< <20><><EFBFBD>̷<EFBFBD>Ʈ <20><>Dz
|
||||
IDirectInputDevice8* m_pDIDeviceKeyboard; //!< Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD>̷<EFBFBD>Ʈ <20><>Dz <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
IDirectInputDevice8* m_pDIDeviceMouse; //!< <20><><EFBFBD>콺 <20><><EFBFBD>̷<EFBFBD>Ʈ <20><>Dz <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
IDirectInputDevice8* m_pDIDeviceJoystick; //!< <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD>̷<EFBFBD>Ʈ <20><>Dz <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
|
||||
bool m_bKeyboard; //!< Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool m_bMouse; //!< <20><><EFBFBD>콺 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool m_bJoystick; //!< <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
bool m_bForcefeedback; //!< Force Feedback <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_aKey[256]; //!< Ű <20>Է<EFBFBD><D4B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
DIMOUSESTATE2 m_dims2; //!< <20><><EFBFBD>콺 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
DIJOYSTATE2 m_dijs2;
|
||||
|
||||
unsigned char m_ucSliderCount; //!< Slider Controls <20><>.
|
||||
unsigned char m_ucPOVCount; //!< POV Controls <20><>.
|
||||
unsigned char m_ucButtionCount; //!< Buttons <20><>.
|
||||
|
||||
unsigned long m_dwNumForceFeedbackAxis; //!< Force Feed Back Axis <20><>.
|
||||
|
||||
LPDIRECTINPUTEFFECT m_lpdiEffect; //!< Force Feed Back <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> Effect.
|
||||
};
|
||||
195
Client/CharacterActionControl/InputJoystick.cpp
Normal file
195
Client/CharacterActionControl/InputJoystick.cpp
Normal file
@@ -0,0 +1,195 @@
|
||||
#include "InputDevice.h"
|
||||
#include "InputJoystick.h"
|
||||
#include <math.h>
|
||||
|
||||
CInputJoystick::CInputJoystick()
|
||||
{
|
||||
m_Sensitivity = 200;
|
||||
}
|
||||
|
||||
CInputJoystick::~CInputJoystick()
|
||||
{
|
||||
}
|
||||
|
||||
CInputJoystick* CInputJoystick::GetInstance()
|
||||
{
|
||||
static CInputJoystick inputJoystick;
|
||||
return &inputJoystick;
|
||||
}
|
||||
|
||||
bool CInputJoystick::GetCheckInputJoystick()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
for (unsigned char ucKey = 0; ucKey < CInputDevice::GetInstance()->GetJoyButtonCount(); ucKey++)
|
||||
{
|
||||
if (GetJoyButton(ucKey))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetX() || GetY() || GetZ())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (GetRotationZ())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (GetPOV())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CInputJoystick::GetJoyButton(unsigned char ucKey)
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
if (ucKey < CInputDevice::GetInstance()->GetJoyButtonCount())
|
||||
{
|
||||
if ( pdijs2 ->rgbButtons[ucKey] & 0x80 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned long CInputJoystick::GetPOV()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
int iPOV = (int)pdijs2->rgdwPOV[0];
|
||||
|
||||
unsigned long dwKey = 0;
|
||||
|
||||
if (iPOV!=-1)
|
||||
{
|
||||
iPOV = iPOV / 100;
|
||||
|
||||
if (iPOV >= 0 && iPOV <= 360)
|
||||
{
|
||||
switch (iPOV)
|
||||
{
|
||||
case 0:
|
||||
dwKey |= POV_UP;
|
||||
break;
|
||||
case 90:
|
||||
dwKey |= POV_RIGHT;
|
||||
break;
|
||||
case 180:
|
||||
dwKey |= POV_DOWN;
|
||||
break;
|
||||
case 270:
|
||||
dwKey |= POV_LEFT;
|
||||
break;
|
||||
case 45:
|
||||
dwKey |= POV_UP;
|
||||
dwKey |= POV_RIGHT;
|
||||
break;
|
||||
case 135:
|
||||
dwKey |= POV_DOWN;
|
||||
dwKey |= POV_RIGHT;
|
||||
break;
|
||||
case 225:
|
||||
dwKey |= POV_DOWN;
|
||||
dwKey |= POV_LEFT;
|
||||
break;
|
||||
case 315:
|
||||
dwKey |= POV_UP;
|
||||
dwKey |= POV_LEFT;
|
||||
break;
|
||||
}
|
||||
|
||||
return dwKey;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CInputJoystick::StartForceFeedback(long lForceX, long lForceY, unsigned long dwTick)
|
||||
{
|
||||
CInputDevice* pInputDevice = CInputDevice::GetInstance();
|
||||
|
||||
if (pInputDevice->GetForceFeedBack())
|
||||
{
|
||||
LONG rglDirection[2] = { 0, 0 };
|
||||
|
||||
DICONSTANTFORCE cf;
|
||||
|
||||
if( pInputDevice->GetNumForceFeedbackAxis() == 1 )
|
||||
{
|
||||
cf.lMagnitude = lForceX;
|
||||
rglDirection[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rglDirection[0] = lForceX;
|
||||
rglDirection[1] = lForceY;
|
||||
cf.lMagnitude = (unsigned long)sqrt((double)(lForceX*lForceX + lForceY*lForceY));
|
||||
}
|
||||
|
||||
DIEFFECT eff;
|
||||
ZeroMemory( &eff, sizeof(eff) );
|
||||
eff.dwSize = sizeof(DIEFFECT);
|
||||
eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS;
|
||||
eff.cAxes = CInputDevice::GetInstance()->GetNumForceFeedbackAxis();
|
||||
eff.rglDirection = rglDirection;
|
||||
eff.lpEnvelope = 0;
|
||||
eff.cbTypeSpecificParams = sizeof(DICONSTANTFORCE);
|
||||
eff.lpvTypeSpecificParams = &cf;
|
||||
eff.dwStartDelay = 0;
|
||||
eff.dwDuration = dwTick*1000;
|
||||
|
||||
pInputDevice->m_lpdiEffect->SetParameters( &eff, DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS | DIEP_DURATION | DIEP_START );
|
||||
|
||||
pInputDevice->m_pDIDeviceJoystick->Acquire();
|
||||
|
||||
pInputDevice->m_lpdiEffect->Start(1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void CInputJoystick::StopForceFeedback()
|
||||
{
|
||||
CInputDevice* pInputDevice = CInputDevice::GetInstance();
|
||||
|
||||
if (pInputDevice->GetForceFeedBack())
|
||||
{
|
||||
pInputDevice->m_lpdiEffect->Stop();
|
||||
}
|
||||
}
|
||||
|
||||
long CInputJoystick::GetX()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
return pdijs2->lX / GetSensitivity();
|
||||
}
|
||||
|
||||
long CInputJoystick::GetY()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
return pdijs2->lY / GetSensitivity();
|
||||
}
|
||||
|
||||
long CInputJoystick::GetZ()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
return pdijs2->lZ / GetSensitivity();
|
||||
}
|
||||
|
||||
long CInputJoystick::GetRotationZ()
|
||||
{
|
||||
DIJOYSTATE2* pdijs2 = CInputDevice::GetInstance()->GetJoyState();
|
||||
|
||||
return pdijs2->lRz / GetSensitivity();
|
||||
}
|
||||
62
Client/CharacterActionControl/InputJoystick.h
Normal file
62
Client/CharacterActionControl/InputJoystick.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
\class CInputJoystick
|
||||
<09><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
|
||||
class CInputJoystick
|
||||
{
|
||||
public:
|
||||
|
||||
static CInputJoystick* GetInstance();
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ<EFBFBD><C6BD> <20>Է<EFBFBD><D4B7><EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD> üũ<C3BC>ϴ<EFBFBD> <20>Լ<EFBFBD>.
|
||||
bool GetCheckInputJoystick(void);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD>Ű <20>Է<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
unsigned long GetPOV(void);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><>ư <20>Է<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
bool GetJoyButton(unsigned char ucKey);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ X <20><>.
|
||||
long GetX(void);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Y <20><>.
|
||||
long GetY(void);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Z <20><>.
|
||||
long GetZ(void);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ ȸ<><C8B8> Z <20><>.
|
||||
long GetRotationZ();
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
void SetSensitivity(unsigned char cFactor) { m_Sensitivity = (cFactor > 1) ? cFactor : 1; }
|
||||
unsigned char GetSensitivity() { return m_Sensitivity; }
|
||||
|
||||
/*!
|
||||
\brief <09><><EFBFBD>̽<EFBFBD>ƽ Force Feedback <20><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>.
|
||||
\param lForceX <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
\param lForceY <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD> 2<><32><EFBFBD>϶<EFBFBD> <20><><EFBFBD><EFBFBD>).
|
||||
\param dwTick <09><><EFBFBD><EFBFBD> <20>ð<EFBFBD>(<28><><EFBFBD><EFBFBD> : Tick).
|
||||
*/
|
||||
void StartForceFeedback(long lForceX, long lForceY, unsigned long dwTick);
|
||||
|
||||
//! <20><><EFBFBD>̽<EFBFBD>ƽ Force Feedback <20><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>.
|
||||
void StopForceFeedback(void);
|
||||
|
||||
enum Const
|
||||
{
|
||||
POV_LEFT = 0x01,
|
||||
POV_RIGHT = 0x02,
|
||||
POV_UP = 0x04,
|
||||
POV_DOWN = 0x08
|
||||
};
|
||||
|
||||
unsigned char m_Sensitivity; // <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CInputJoystick();
|
||||
~CInputJoystick();
|
||||
};
|
||||
28
Client/CharacterActionControl/InputKeyboard.cpp
Normal file
28
Client/CharacterActionControl/InputKeyboard.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "InputDevice.h"
|
||||
#include "InputKeyboard.h"
|
||||
|
||||
CInputKeyboard::CInputKeyboard()
|
||||
{
|
||||
}
|
||||
|
||||
CInputKeyboard::~CInputKeyboard()
|
||||
{
|
||||
}
|
||||
|
||||
CInputKeyboard* CInputKeyboard::GetInstance()
|
||||
{
|
||||
static CInputKeyboard inputKeyboard;
|
||||
return &inputKeyboard;
|
||||
}
|
||||
|
||||
bool CInputKeyboard::GetKeyPress(unsigned char ucKey)
|
||||
{
|
||||
unsigned char* pKey = CInputDevice::GetInstance()->GeteyboardState();
|
||||
|
||||
if (pKey[ucKey] & 0x80)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
19
Client/CharacterActionControl/InputKeyboard.h
Normal file
19
Client/CharacterActionControl/InputKeyboard.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
\class CInputKeyboard
|
||||
Ű<><C5B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
|
||||
class CInputKeyboard
|
||||
{
|
||||
public:
|
||||
|
||||
static CInputKeyboard* GetInstance();
|
||||
|
||||
//! Ű <20>Է<EFBFBD> <20>Լ<EFBFBD>
|
||||
bool GetKeyPress(unsigned char ucKey);
|
||||
|
||||
CInputKeyboard();
|
||||
~CInputKeyboard();
|
||||
};
|
||||
61
Client/CharacterActionControl/InputMouse.cpp
Normal file
61
Client/CharacterActionControl/InputMouse.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
#include "InputDevice.h"
|
||||
#include "InputMouse.h"
|
||||
|
||||
CInputMouse::CInputMouse()
|
||||
{
|
||||
}
|
||||
|
||||
CInputMouse::~CInputMouse()
|
||||
{
|
||||
}
|
||||
|
||||
CInputMouse* CInputMouse::GetInstance()
|
||||
{
|
||||
static CInputMouse inputMouse;
|
||||
return &inputMouse;
|
||||
}
|
||||
|
||||
bool CInputMouse::GetLButtonDown()
|
||||
{
|
||||
DIMOUSESTATE2* pdms = CInputDevice::GetInstance()->GetMouseState();
|
||||
|
||||
if (pdms->rgbButtons[0])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CInputMouse::GetRButtonDown()
|
||||
{
|
||||
DIMOUSESTATE2* pdms = CInputDevice::GetInstance()->GetMouseState();
|
||||
|
||||
if (pdms->rgbButtons[1])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int CInputMouse::GetMousePosX()
|
||||
{
|
||||
DIMOUSESTATE2* pdms = CInputDevice::GetInstance()->GetMouseState();
|
||||
|
||||
return pdms->lX;
|
||||
}
|
||||
|
||||
int CInputMouse::GetMousePosY()
|
||||
{
|
||||
DIMOUSESTATE2* pdms = CInputDevice::GetInstance()->GetMouseState();
|
||||
|
||||
return pdms->lY;
|
||||
}
|
||||
|
||||
int CInputMouse::GetMouseWheelPos()
|
||||
{
|
||||
DIMOUSESTATE2* pdms = CInputDevice::GetInstance()->GetMouseState();
|
||||
|
||||
return pdms->lZ;
|
||||
}
|
||||
31
Client/CharacterActionControl/InputMouse.h
Normal file
31
Client/CharacterActionControl/InputMouse.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
\class CInputJoystick
|
||||
<09><><EFBFBD>콺 <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
|
||||
class CInputMouse
|
||||
{
|
||||
public:
|
||||
|
||||
static CInputMouse* GetInstance();
|
||||
|
||||
//! <20><><EFBFBD>콺<EFBFBD><ECBDBA> <20>̵<EFBFBD><CCB5><EFBFBD> <20><>ŭ<EFBFBD><C5AD> <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
int GetMousePosX(void);
|
||||
|
||||
//! <20><><EFBFBD>콺<EFBFBD><ECBDBA> <20>̵<EFBFBD><CCB5><EFBFBD> <20><>ŭ<EFBFBD><C5AD> <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
int GetMousePosY(void);
|
||||
|
||||
//! <20><><EFBFBD>콺<EFBFBD><ECBDBA> <20><> <20>̵<EFBFBD><CCB5><EFBFBD> <20><>ŭ<EFBFBD><C5AD> <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
int GetMouseWheelPos(void);
|
||||
|
||||
//! <20><><EFBFBD>콺<EFBFBD><ECBDBA> L <20><>ư<EFBFBD><C6B0> <20>ٿ<EFBFBD><D9BF><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
bool GetLButtonDown(void);
|
||||
|
||||
//! <20><><EFBFBD>콺<EFBFBD><ECBDBA> R <20><>ư<EFBFBD><C6B0> <20>ٿ<EFBFBD><D9BF><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD> <20>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
bool GetRButtonDown(void);
|
||||
|
||||
CInputMouse();
|
||||
~CInputMouse();
|
||||
};
|
||||
3931
Client/CharacterActionControl/RYLCharacterControl.cpp
Normal file
3931
Client/CharacterActionControl/RYLCharacterControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
66
Client/CharacterActionControl/RYLCharacterControl.h
Normal file
66
Client/CharacterActionControl/RYLCharacterControl.h
Normal file
@@ -0,0 +1,66 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLCharacterControl.h
|
||||
// Desc : ij<><C4B3><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_CHARACTERCONTROL_H__
|
||||
#define __RYL_CHARACTERCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
|
||||
class CRYLCharacterControl
|
||||
{
|
||||
private :
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
RYLCreature* m_lpCreature;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
BOOL m_bLeftMousePress;
|
||||
BOOL m_bRightMousePress;
|
||||
BOOL m_bClickPlayerAndNpc;
|
||||
BOOL m_bClickSkill;
|
||||
|
||||
unsigned long m_dwNormalTargetID;
|
||||
unsigned long m_dwSpecialTargetID;
|
||||
|
||||
BOOL m_bLeftClickDown;
|
||||
bool m_bKeyPress;
|
||||
|
||||
public :
|
||||
|
||||
CRYLCharacterControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLCharacterControl() ;
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int nMouseX = 0,int nMouseY = 0 ) ;
|
||||
|
||||
VOID MouseClickModeSelfCharacterUpdate( BOOL bKeyAble, BOOL bEdge, int nMouseX, int nMouseY ) ;
|
||||
RYLCreature* MouseClickModeSelectSpecialTarget( RYLCreature* pCreature, int nMouseX, int nMouseY );
|
||||
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
VOID RestoreCamera() ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpCreature; }
|
||||
CCharacterControl *GetCreatureControl() { return m_lpObjControl; }
|
||||
VOID SetCreature( RYLCreature* pCreature ) { m_lpCreature = pCreature; }
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
} ;
|
||||
|
||||
#endif //__RYL_CHARACTERCONTROL_H__
|
||||
264
Client/CharacterActionControl/RYLCharacterDataManager.cpp
Normal file
264
Client/CharacterActionControl/RYLCharacterDataManager.cpp
Normal file
@@ -0,0 +1,264 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLCharacterDataManager.cpp
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: contain and manage characters's data
|
||||
//
|
||||
// Date: 2004. 3. 26. ( Fri )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#include "RYLCharacterDataManager.h"
|
||||
#include <algorithm>
|
||||
#include "GMMemory.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// functors
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// ftDeleteCharDataMemory() : Container <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
static void ftDeleteCharDataMemory( CharDataNode* pObject )
|
||||
{
|
||||
delete pObject;
|
||||
pObject = NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// FindFreedNode() : Cantainer<65><72> <20><><EFBFBD>ҵ<EFBFBD> <20>߿<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD> ã<><C3A3>
|
||||
static bool ftFindFreeNode( const CharDataNode* node )
|
||||
{
|
||||
if( !node->m_bIsUsingNode )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// class ftFindCharDataByID : ID<49><44> CharData list<73><74><EFBFBD><EFBFBD> node ã<><C3A3>
|
||||
class ftFindCharDataByID
|
||||
{
|
||||
private:
|
||||
unsigned long m_ulCharID;
|
||||
|
||||
public:
|
||||
ftFindCharDataByID( unsigned long ulCharID ) : m_ulCharID( ulCharID )
|
||||
{
|
||||
}
|
||||
|
||||
bool operator()( const CharDataNode* node ) const
|
||||
{
|
||||
if( node->m_ulCharID == m_ulCharID )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLCharacterDataManager
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
RYLCharacterDataManager* RYLCharacterDataManager::m_pInstance = NULL; // initialize static member variable
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// constructor, destructor
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
RYLCharacterDataManager::RYLCharacterDataManager( unsigned int unCharPoolMax )
|
||||
{
|
||||
m_ulCharCount = 0;
|
||||
|
||||
InitCharDataManager( unCharPoolMax );
|
||||
}
|
||||
|
||||
RYLCharacterDataManager::~RYLCharacterDataManager()
|
||||
{
|
||||
DeleteAllCharData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// member functions
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::InitCharDataManager()
|
||||
void RYLCharacterDataManager::InitCharDataManager( unsigned int unMaxCash )
|
||||
{
|
||||
// clear pool
|
||||
if( !m_lstCharData.empty() )
|
||||
{
|
||||
for_each( m_lstCharData.begin(), m_lstCharData.end(), ftDeleteCharDataMemory );
|
||||
}
|
||||
|
||||
// allocate pool
|
||||
m_unMaxCash = unMaxCash;
|
||||
/*for( unsigned int i = 0 ; i < m_unMaxCash ; ++i )
|
||||
{
|
||||
CharDataNode* pNode = new CharDataNode;
|
||||
m_lstCharData.push_back( pNode );
|
||||
}*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::AddCharData()
|
||||
CharDataNode* RYLCharacterDataManager::AddCharData( CharDataNode* pNode )
|
||||
{
|
||||
// if added character is already exist in list, return it's node ID
|
||||
list<CharDataNode*>::iterator iter = find_if( m_lstCharData.begin(), m_lstCharData.end(), ftFindCharDataByID( pNode->m_ulCharID ) );
|
||||
|
||||
if( iter != m_lstCharData.end() )
|
||||
{
|
||||
delete pNode;
|
||||
pNode = NULL;
|
||||
|
||||
(*iter)->m_bIsUsingNode = true;
|
||||
|
||||
return (*iter);
|
||||
}
|
||||
|
||||
++m_ulCharCount;
|
||||
pNode->m_ulNodeID = m_ulCharCount;
|
||||
pNode->m_bIsUsingNode = true; // turn on 'using flag'
|
||||
|
||||
// find free node
|
||||
iter = find_if( m_lstCharData.begin(), m_lstCharData.end(), ftFindFreeNode );
|
||||
|
||||
if( iter != m_lstCharData.end() )
|
||||
{
|
||||
// if free node exist
|
||||
*(*iter) = *pNode;
|
||||
|
||||
delete pNode ;
|
||||
pNode = NULL ;
|
||||
pNode = (*iter) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lstCharData.push_back( pNode );
|
||||
}
|
||||
|
||||
return pNode;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::DeleteCharData()
|
||||
void RYLCharacterDataManager::DeleteCharData( unsigned long ulCharID )
|
||||
{
|
||||
list<CharDataNode*>::iterator iter = find_if( m_lstCharData.begin(), m_lstCharData.end(), ftFindCharDataByID( ulCharID ) );
|
||||
|
||||
if( iter != m_lstCharData.end() )
|
||||
{
|
||||
if( m_lstCharData.size() > m_unMaxCash )
|
||||
{
|
||||
ftDeleteCharDataMemory( (*iter) );
|
||||
m_lstCharData.erase( iter );
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->m_bIsUsingNode = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::GetCharData()
|
||||
CharDataNode* RYLCharacterDataManager::GetCharData( unsigned long ulCharID )
|
||||
{
|
||||
list<CharDataNode*>::iterator iter = find_if( m_lstCharData.begin(), m_lstCharData.end(), ftFindCharDataByID( ulCharID ) );
|
||||
|
||||
if( iter != m_lstCharData.end() && (*iter)->m_bIsUsingNode )
|
||||
return (*iter);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CharDataNode* RYLCharacterDataManager::GetCharData( char* szName )
|
||||
{
|
||||
list<CharDataNode*>::iterator pos = m_lstCharData.begin();
|
||||
list<CharDataNode*>::iterator end = m_lstCharData.end();
|
||||
|
||||
for(; pos!=end; ++pos)
|
||||
{
|
||||
if(strcmp((*pos)->m_strName.c_str(), szName)==0)
|
||||
return (*pos);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::InitCharData()
|
||||
CharDataNode* RYLCharacterDataManager::InitCharData( unsigned long ulCharID, char cRace )
|
||||
{
|
||||
CharDataNode* pData = GetCharData( ulCharID ) ;
|
||||
|
||||
if ( NULL == pData )
|
||||
{
|
||||
return NULL ;
|
||||
}
|
||||
|
||||
pData->m_strName.clear() ;
|
||||
pData->m_cSex = 1 ;
|
||||
pData->m_cHair = 2 ;
|
||||
pData->m_cFace = 1 ;
|
||||
pData->m_cNation = 0 ;
|
||||
pData->m_cRace = cRace ;
|
||||
pData->m_usClass = 0 ;
|
||||
|
||||
if ( 0 == cRace )
|
||||
{
|
||||
pData->m_cNation = 1 ;
|
||||
pData->m_usClass = 1 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pData->m_cNation = 2 ;
|
||||
pData->m_usClass = 17 ;
|
||||
}
|
||||
|
||||
pData->m_ulFame = 0 ;
|
||||
pData->m_ulMileage = 0 ;
|
||||
pData->m_ulGuildID = 0 ;
|
||||
pData->m_ulPartyID = 0 ;
|
||||
pData->m_ulTeamID = 0 ;
|
||||
|
||||
pData->m_cLevel = 0 ;
|
||||
pData->m_lCurrHP = 0 ;
|
||||
pData->m_lCurrMP = 0 ;
|
||||
pData->m_ulMaxHP = 0 ;
|
||||
pData->m_ulMaxMP = 0 ;
|
||||
|
||||
pData->m_bPeaceMode = false ;
|
||||
pData->m_nChrPattern = 0 ;
|
||||
pData->m_strChatMessage.clear() ;
|
||||
|
||||
pData->m_ulTargetCharID = 0xFFFFFFFF ;
|
||||
pData->m_ulSummonMasterCharID = 0xFFFFFFFF ;
|
||||
pData->m_strStreetStallName.clear() ;
|
||||
|
||||
return pData ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::DeleteAllCharData()
|
||||
void RYLCharacterDataManager::DeleteAllCharData()
|
||||
{
|
||||
for_each( m_lstCharData.begin(), m_lstCharData.end(), ftDeleteCharDataMemory );
|
||||
m_lstCharData.clear();
|
||||
|
||||
m_pSelfData = NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::SwapPartyID()
|
||||
void RYLCharacterDataManager::SwapPartyID( unsigned long ulOldPartyID, unsigned long ulNewPartyID )
|
||||
{
|
||||
for( list<CharDataNode*>::iterator iter = m_lstCharData.begin() ; iter != m_lstCharData.end() ; ++iter )
|
||||
{
|
||||
if( (*iter)->m_ulPartyID == ulOldPartyID )
|
||||
(*iter)->m_ulPartyID = ulNewPartyID;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLCharacterDataManager::
|
||||
196
Client/CharacterActionControl/RYLCharacterDataManager.h
Normal file
196
Client/CharacterActionControl/RYLCharacterDataManager.h
Normal file
@@ -0,0 +1,196 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLCharacterDataManager.h
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: contain and manage characters's data
|
||||
//
|
||||
// Date: 2004. 3. 26. ( Fri )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __ZRYL_CHARACTER_DATA_MANAGER_H__
|
||||
#define __ZRYL_CHARACTER_DATA_MANAGER_H__
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums, Structs
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
struct CharDataNode
|
||||
{
|
||||
unsigned long m_ulCharID; // character ID
|
||||
unsigned long m_ulNodeID; // node ID in list
|
||||
|
||||
string m_strName; // name
|
||||
char m_cSex; // sex
|
||||
char m_cHair; // hair style
|
||||
char m_cFace; // face style
|
||||
char m_cNation; // Carterant : 0, Mercadia : 1
|
||||
char m_cRace; // Human : 0, Akhan : 1
|
||||
unsigned short m_usClass; // class( job? )
|
||||
|
||||
unsigned long m_ulFame; // famous
|
||||
unsigned long m_ulMileage; // mileage
|
||||
unsigned long m_ulGuildID; // guild id
|
||||
unsigned long m_ulPartyID; // party id
|
||||
unsigned long m_ulTempGID; // <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
unsigned long m_ulTeamID; // team id
|
||||
|
||||
char m_cLevel; // level
|
||||
long m_lCurrHP; // current HP
|
||||
long m_lCurrMP; // current MP
|
||||
unsigned long m_ulMaxHP; // max hp
|
||||
unsigned long m_ulMaxMP; // max mp
|
||||
|
||||
bool m_bPeaceMode; // peace mode setting
|
||||
int m_nChrPattern; // pattern
|
||||
string m_strChatMessage; // stall chat message
|
||||
|
||||
bool m_bIsUsingNode; // using state
|
||||
|
||||
unsigned long m_ulTargetCharID; // target character id
|
||||
|
||||
unsigned long m_ulSummonMasterCharID; // summon matser id
|
||||
|
||||
string m_strStreetStallName; // stall name
|
||||
|
||||
unsigned int m_dwPlayTime; // PlayTime
|
||||
|
||||
CharDataNode()
|
||||
: m_ulCharID(0), m_ulNodeID(0xFFFFFFFF), m_cSex(0), m_cHair(0), m_cFace(0), m_cNation(0), m_cRace(0), m_usClass(0),
|
||||
m_ulFame(0), m_ulMileage(0), m_ulGuildID(0), m_ulPartyID(0), m_ulTeamID(0), m_ulTempGID(0),
|
||||
m_cLevel(0), m_lCurrHP(0), m_lCurrMP(0), m_ulMaxHP(0), m_ulMaxMP(0), m_bPeaceMode(0), m_nChrPattern(0),
|
||||
m_bIsUsingNode(false), m_ulTargetCharID(0xFFFFFFFF), m_ulSummonMasterCharID(0xFFFFFFFF), m_dwPlayTime(0)
|
||||
{
|
||||
m_strName.reserve( 128 );
|
||||
m_strName.clear();
|
||||
|
||||
m_strChatMessage.reserve( 128 );
|
||||
m_strChatMessage.clear();
|
||||
|
||||
m_strStreetStallName.reserve( 128 );
|
||||
m_strStreetStallName.clear();
|
||||
}
|
||||
|
||||
~CharDataNode()
|
||||
{
|
||||
m_strName.clear();
|
||||
m_strChatMessage.clear();
|
||||
m_strStreetStallName.clear();
|
||||
}
|
||||
|
||||
void operator=( const CharDataNode& node )
|
||||
{
|
||||
m_ulCharID = node.m_ulCharID;
|
||||
m_ulNodeID = node.m_ulNodeID;
|
||||
|
||||
m_strName = node.m_strName;
|
||||
m_cSex = node.m_cSex;
|
||||
m_cHair = node.m_cHair;
|
||||
m_cFace = node.m_cFace;
|
||||
m_cNation = node.m_cNation;
|
||||
m_cRace = node.m_cRace;
|
||||
m_usClass = node.m_usClass;
|
||||
|
||||
m_ulFame = node.m_ulFame;
|
||||
m_ulMileage = node.m_ulMileage;
|
||||
m_ulGuildID = node.m_ulGuildID;
|
||||
m_ulPartyID = node.m_ulPartyID;
|
||||
m_ulTempGID = node.m_ulTempGID;
|
||||
m_ulTeamID = node.m_ulTeamID;
|
||||
|
||||
m_cLevel = node.m_cLevel;
|
||||
m_lCurrHP = node.m_lCurrHP;
|
||||
m_lCurrMP = node.m_lCurrMP;
|
||||
m_ulMaxHP = node.m_ulMaxHP;
|
||||
m_ulMaxMP = node.m_ulMaxMP;
|
||||
|
||||
m_bPeaceMode = node.m_bPeaceMode;
|
||||
m_nChrPattern = node.m_nChrPattern;
|
||||
m_strChatMessage = node.m_strChatMessage;
|
||||
|
||||
m_bIsUsingNode = node.m_bIsUsingNode;
|
||||
|
||||
m_ulTargetCharID = node.m_ulTargetCharID;
|
||||
|
||||
m_ulSummonMasterCharID = node.m_ulSummonMasterCharID;
|
||||
|
||||
m_strStreetStallName = node.m_strStreetStallName;
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Consts
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Classes
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLCharacterDataManager
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class RYLCharacterDataManager
|
||||
{
|
||||
private:
|
||||
CharDataNode* m_pSelfData;
|
||||
|
||||
list<CharDataNode*> m_lstCharData;
|
||||
unsigned long m_ulCharCount;
|
||||
unsigned int m_unMaxCash;
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Constructor, Destructor
|
||||
RYLCharacterDataManager( unsigned int unMaxCash = 30 );
|
||||
~RYLCharacterDataManager();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Init Manager
|
||||
void InitCharDataManager( unsigned int unCharPoolMax );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// character list dealing functions
|
||||
void SetSelfData( CharDataNode* pNode ) { m_pSelfData = pNode; }
|
||||
CharDataNode* GetSelfData() { return m_pSelfData; }
|
||||
|
||||
CharDataNode* AddCharData( CharDataNode* node );
|
||||
CharDataNode* GetCharData( unsigned long ulCharID );
|
||||
CharDataNode* GetCharData( char* szName );
|
||||
|
||||
CharDataNode* InitCharData( unsigned long ulCharID, char cRace ) ;
|
||||
|
||||
void DeleteAllCharData();
|
||||
void DeleteCharData( unsigned long ulCharID );
|
||||
|
||||
inline void SetMaxCash( unsigned int unMaxCash ) { m_unMaxCash = unMaxCash; }
|
||||
inline unsigned int GetMaxCash() { return m_unMaxCash; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> data <20><><EFBFBD><EFBFBD>
|
||||
void SwapPartyID( unsigned long ulOldPartyID, unsigned long ulNewPartyID );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// singletone
|
||||
private:
|
||||
static RYLCharacterDataManager* m_pInstance;
|
||||
|
||||
public:
|
||||
static RYLCharacterDataManager* Instance()
|
||||
{
|
||||
if( !m_pInstance )
|
||||
{
|
||||
m_pInstance = new RYLCharacterDataManager;
|
||||
}
|
||||
|
||||
return m_pInstance;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __ZRYL_CHARACTER_DATA_MANAGER_H__
|
||||
3913
Client/CharacterActionControl/RYLCreature.cpp
Normal file
3913
Client/CharacterActionControl/RYLCreature.cpp
Normal file
File diff suppressed because it is too large
Load Diff
569
Client/CharacterActionControl/RYLCreature.h
Normal file
569
Client/CharacterActionControl/RYLCreature.h
Normal file
@@ -0,0 +1,569 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLCreature.h
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: base class for Creature
|
||||
//
|
||||
// Date: 2004. 3. 25. ( Tue )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __RYL_CREATURE_H__
|
||||
#define __RYL_CREATURE_H__
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <Network/Broadcast/BroadcastCharacterData.h>
|
||||
#include <Creature/Siege/SiegeConstants.h>
|
||||
#include <Item/ItemConstants.h>
|
||||
|
||||
#include "Z3DGeneralChrModel.h"
|
||||
#include "Z3DBoundingVolumeObject.h"
|
||||
#include "SceneManager.h"
|
||||
|
||||
#include "RYLCreatureEffect.h"
|
||||
#include "RYLDamageEffect.h"
|
||||
|
||||
//#include "RYLCreatureCommon.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class CRYLLabel ;
|
||||
class CRYLListBox ;
|
||||
class CRYLPicture ;
|
||||
class CCharacterControl ;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums, Structs
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
typedef struct CharActionNode
|
||||
{
|
||||
unsigned long m_ulLowerChrAction;
|
||||
unsigned long m_ulUpperChrAction;
|
||||
float m_fDirection;
|
||||
vector3 m_vecNextPosition;
|
||||
float m_fVec;
|
||||
unsigned short m_usAniNum;
|
||||
unsigned short m_usAniNumCount;
|
||||
unsigned long m_ulFrame;
|
||||
|
||||
CharActionNode()
|
||||
{
|
||||
m_ulLowerChrAction = 0;
|
||||
m_ulUpperChrAction = 0;
|
||||
m_fDirection = 0;
|
||||
|
||||
m_vecNextPosition.x = 0;
|
||||
m_vecNextPosition.y = 0;
|
||||
m_vecNextPosition.z = 0;
|
||||
|
||||
m_fVec = 0;
|
||||
m_usAniNum = 0;
|
||||
m_usAniNumCount = 0;
|
||||
m_ulFrame = 0;
|
||||
}
|
||||
|
||||
void operator=( const CharActionNode& node )
|
||||
{
|
||||
m_ulLowerChrAction = node.m_ulLowerChrAction;
|
||||
m_ulUpperChrAction = node.m_ulUpperChrAction;
|
||||
m_fDirection = node.m_fDirection;
|
||||
m_vecNextPosition = node.m_vecNextPosition;
|
||||
m_fVec = node.m_fVec;
|
||||
m_usAniNum = node.m_usAniNum;
|
||||
m_usAniNumCount = node.m_usAniNumCount;
|
||||
m_ulFrame = node.m_ulFrame;
|
||||
}
|
||||
|
||||
} CharActionNode;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Classes
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLCreature
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class RYLCreature
|
||||
{
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// friend class
|
||||
friend class RYLCreatureEffect;
|
||||
friend class RYLCreatureManager;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// member variables
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// unique creature ID
|
||||
unsigned long m_ulCharID; // special identifier allocated this creature
|
||||
|
||||
static unsigned long m_ulAddedOrder; //
|
||||
unsigned long m_ulAddedID; //
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// creature type
|
||||
unsigned long m_ulCreatureType; // creature type
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// is used?
|
||||
bool m_bUsed;
|
||||
bool m_bFirstPositionSend;
|
||||
bool m_bMemoryReusable;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// data for basic rendering
|
||||
string m_strCharName; // creature name
|
||||
CRYLLabel* m_pCharStreetStallNameLabel ; // creature street stall name label
|
||||
CRYLLabel* m_pCharNameLabel ; // creature name label
|
||||
CRYLLabel* m_pCharTempGuildNameLabel;
|
||||
CRYLLabel* m_pCharJobNameLabel ;
|
||||
CRYLLabel* m_pCharChatMsgLabel ;
|
||||
CRYLPicture* m_pSignpostImg ;
|
||||
|
||||
CZ3DGeneralChrModel* m_pCharModel; // creature model data
|
||||
|
||||
string m_strGCMDSName; // modeling data file name
|
||||
string m_strFaceType; // model face type
|
||||
string m_strHairType; // model hair type
|
||||
|
||||
unsigned short m_usShape[Item::EquipmentPos::MAX_EQUPMENT_POS]; // save the creature shape data ( for identifier )
|
||||
const char* m_strShape[Item::EquipmentPos::MAX_EQUPMENT_POS]; // save the creature shape data ( for name )
|
||||
|
||||
Broadcast2nd::CNetworkEquipGrade m_EquipGrade; // <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7B7>̵庰 <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>
|
||||
|
||||
vector3 m_vecPosition; // position
|
||||
vector3 m_vecNamePosition; // name position
|
||||
float m_fDirection; // direction
|
||||
|
||||
unsigned long m_dwLastUpdateActionTimer; //
|
||||
|
||||
unsigned long m_ulWeaponPos; //
|
||||
unsigned char m_ucRideFlag; //
|
||||
|
||||
unsigned char m_ucEnableRide; // <20><><EFBFBD>̵带 ź<><C5BA><EFBFBD>´<EFBFBD>
|
||||
|
||||
unsigned char m_ucRace; // 0 : Human, 1 : Akhan
|
||||
unsigned short m_usClass; // character Class
|
||||
|
||||
float m_fScale; // Creature scale
|
||||
float m_fFixAngle; //
|
||||
|
||||
unsigned char m_cGMModelFlag; // GM <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
unsigned char m_cRealmPoint; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ.
|
||||
|
||||
unsigned char m_cTactics; // <20>뺴 <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with skill action : <20><><EFBFBD><EFBFBD> <20>Ⱦ<EFBFBD><C8BE>̱ⶫ<CCB1><E2B6AB> <20>׳<EFBFBD> public<69><63><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> -_-;;
|
||||
unsigned long m_ulAttackCombo;
|
||||
unsigned long m_ulSkillComboCount;
|
||||
bool m_bNoneComboAttackMode;
|
||||
bool m_bSkillCombo;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// chatting timer : <20>̰͵<CCB0> <20><><EFBFBD><EFBFBD>...(-_-)
|
||||
float m_fChatTimer;
|
||||
|
||||
static unsigned long m_ulRunFactorTimer; // Run Ÿ<><C5B8>. m_dwRunFactorTimer = CFrameTimer::Regist(200.0f);
|
||||
|
||||
private:
|
||||
float m_fRunFactor; //
|
||||
vector3 m_vecJumpAttackVector; //
|
||||
|
||||
float m_fSelfCharLens; // Lens
|
||||
bool m_bViewName; // <20><><EFBFBD><EFBFBD> ȭ<><C8AD> <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD>߱<EFBFBD> <20>ɼ<EFBFBD>( <20><><EFBFBD><EFBFBD> Creature )
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// creature action
|
||||
unsigned long m_ulUpperCharActionID; // upper action identifier
|
||||
unsigned long m_ulLowerCharActionID; // lower action identifier
|
||||
bool m_bUpperActing; // is upper part acting?
|
||||
bool m_bLowerActing; // is lower part acting?
|
||||
bool m_bUpperAble; // is upper action available?
|
||||
bool m_bLowerAble; // is lower action available?
|
||||
|
||||
CharActionNode m_Action;
|
||||
|
||||
list<CharActionNode*>::iterator m_iterBeforeAction; // <20>ܺο<DCBA><CEBF><EFBFBD> list <20><>ȸ<EFBFBD><C8B8> <20><><EFBFBD>Ҷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȸ<EFBFBD><C8B8> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ִٰ<D6B4> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>Ѱ<EFBFBD><D1B0>ش<EFBFBD>.
|
||||
|
||||
queue<CharActionNode*> m_queActionData; // Action Queue
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with "DEAD" process
|
||||
float m_fDeadTimer; //
|
||||
bool m_bFirstDead; // True<75><65> <20><> Dead Action <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> SetAction<6F><6E> <20><><EFBFBD>ؼ<EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD>.
|
||||
bool m_bCharDead; // died?
|
||||
|
||||
bool m_bStillCasting;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// flags for current creature state
|
||||
bool m_bFlying; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD>?
|
||||
DWORD m_dwFlyingTick;
|
||||
|
||||
bool m_bSitMode; // not sitting down?
|
||||
bool m_bFlyFirstCheck;
|
||||
|
||||
//-----------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool m_bSkillAttacked;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with slide character
|
||||
CEffScript::CEffExt6 m_effSlideValue; //
|
||||
bool m_bSlide; //
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with collision
|
||||
unsigned char m_ucCDTType; // collision check type
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with creature effect
|
||||
RYLCreatureEffect* m_pCreatureEffect; //
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with damage effect
|
||||
RYLDamageEffect* m_pDamageEffect; //
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned long m_dwCampOrCastleID; // <20><><EFBFBD><EFBFBD> = <20><><EFBFBD><EFBFBD>(ķ<><C4B7>) ID, <20><> = <20><>ID
|
||||
unsigned long m_dwOwnerID; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = <20><><EFBFBD><EFBFBD> CID, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> = <20><><EFBFBD><EFBFBD> CID
|
||||
unsigned short m_wObjectType; // Siege::SiegeObjectType <20><><EFBFBD><EFBFBD>
|
||||
unsigned char m_cState; // Siege::State
|
||||
unsigned char m_cSubState; // Siege::State
|
||||
unsigned char m_cUpgradeStep; // <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD> <20>ܰ<EFBFBD>
|
||||
unsigned char m_cUpgradeType; // <20><>¡<EFBFBD><C2A1><EFBFBD><EFBFBD> <20>ش<EFBFBD>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD> <20><><EFBFBD><EFBFBD> )
|
||||
unsigned long m_dwDoorBlockrate; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ش<EFBFBD>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
||||
|
||||
bool m_bOBBEnable; // OBB <20><><EFBFBD><EFBFBD>
|
||||
CZ3DOBB* m_pZ3DOBB; // OBB
|
||||
|
||||
DWORD m_dwRiderID[Siege::AIRSHIP_RIDER_NUM]; // <20><><EFBFBD><EFBFBD> ź <20><><EFBFBD><EFBFBD> ID ( 0 <20><>°<EFBFBD><C2B0> <20><><EFBFBD><EFBFBD>, 1-9 <20><> <20>մ<EFBFBD> )
|
||||
bool m_bRideEnable; // ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD> ž<><C5BE><EFBFBD>ϰ<EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
BOOL m_bRepairFullHP; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
unsigned char m_cRealmWarFlag; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
unsigned char m_cGuildWarFlag; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// member functions
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Constructor, Destructor
|
||||
RYLCreature();
|
||||
RYLCreature( unsigned long ulCharID, const char* pstrName, const char* pstrGCMDSName,
|
||||
vector3 vecCharPos, float fDirection );
|
||||
RYLCreature( unsigned long ulCharID, const char* pstrName, const char* pstrGCMDSName,
|
||||
const char* pstrFaceType, const char* pstrHairType, const char** pstrShape,
|
||||
unsigned char ucRace, vector3 vecCharPos, float fDirection );
|
||||
RYLCreature( unsigned long ulCharID, vector3 vecPosition );
|
||||
virtual ~RYLCreature();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Init Creature
|
||||
void InitCreature( bool bRespawn = false );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// get creature id
|
||||
unsigned long GetCharID( void ) { return m_ulCharID; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// get creature type
|
||||
unsigned long GetCreatureType( void ) { return m_ulCreatureType; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// set creature used or not( ManagerŬ<72><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> creature pool <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> )
|
||||
inline void SetIsUsed( bool bUsed ) { m_bUsed = bUsed; }
|
||||
inline bool GetIsUsed( void ) { return m_bUsed; }
|
||||
|
||||
inline void SetMemoryReusable( bool bReusable ) { m_bMemoryReusable = bReusable; }
|
||||
inline bool GetMemoryReusable( void ) { return m_bMemoryReusable; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with rendering data
|
||||
inline void SetCharModel( CZ3DGeneralChrModel* pCharModel ) { m_pCharModel = pCharModel; }
|
||||
inline CZ3DGeneralChrModel* GetCharModel( void ) { return m_pCharModel; }
|
||||
inline void SetAlphaLevel( float fAlphaFactor ) { m_pCharModel->SetAlphaLevel( fAlphaFactor ); }
|
||||
|
||||
//void SetPosition( float fPosX, float fPosY, float fPosZ );
|
||||
void SetPosition( vector3 &vecPos );
|
||||
vector3* GetPosition( void );
|
||||
vector3* GetNamePosition( void );
|
||||
|
||||
void SetDirection( float fDirection );
|
||||
float GetDirection( void );
|
||||
|
||||
inline void SetWeaponPos( unsigned long ulWeaponPos ) { m_ulWeaponPos = ulWeaponPos; }
|
||||
inline unsigned long GetWeaponPos( void ) { return m_ulWeaponPos; }
|
||||
|
||||
inline void SetRideFlag( unsigned char cRideFlag ) { m_ucRideFlag = cRideFlag; }
|
||||
inline unsigned char GetRideFlag( void ) { return m_ucRideFlag; }
|
||||
|
||||
|
||||
inline void SetFixAngle( float fFixAngle ) { m_fFixAngle = fFixAngle; }
|
||||
inline float GetFixAngle( void ) { return m_fFixAngle; }
|
||||
|
||||
inline void SetScale( float fScale ) { m_fScale = fScale; }
|
||||
inline float GetScale( void ) { return m_fScale; }
|
||||
|
||||
inline void SetRunFactor( float fRunFactor ) { m_fRunFactor = fRunFactor; }
|
||||
inline float GetRunFactor( void ) { return m_fRunFactor; }
|
||||
|
||||
inline void SetJumpAttackVector( vector3 vecJumpAttackVector ) { m_vecJumpAttackVector = vecJumpAttackVector; }
|
||||
inline vector3 GetJumpAttackVector( void ) { return m_vecJumpAttackVector; }
|
||||
|
||||
inline void SetSelfLens( float fCharLens) { m_fSelfCharLens = fCharLens; }
|
||||
inline float GetSelfLens( void ) { return m_fSelfCharLens; }
|
||||
|
||||
inline void SetViewName( bool bViewName ) { m_bViewName = bViewName; }
|
||||
inline bool GetViewName( void ) { return m_bViewName; }
|
||||
|
||||
inline void SetModelFileName( const char* pstrGCMDSName ) { m_strGCMDSName = pstrGCMDSName; }
|
||||
inline string* GetModelFileName( void ) { return &m_strGCMDSName; }
|
||||
inline void SetFaceType( const char* pstrFaceType ) { m_strFaceType = pstrFaceType; }
|
||||
inline string* GetFaceType( void ) { return &m_strFaceType; }
|
||||
inline void SetHairType( const char* pstrHairType ) { m_strHairType = pstrHairType; }
|
||||
inline string* GetHairType( void ) { return &m_strHairType; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// setting action
|
||||
void SetActionID( unsigned long* pulActionID, const char* pstrAction );
|
||||
void SetActionString( const unsigned long ulActionID, char* pstrAction );
|
||||
bool SetAction( unsigned long ulUpperAction, unsigned long ulLowerAction );
|
||||
bool SetAction( const char* pstrUpperAction, const char* pstrLowerAction );
|
||||
|
||||
inline void SetCurrentAction( CharActionNode pAction ) { m_Action = pAction; }
|
||||
inline CharActionNode* GetCurrentAction( void ) { return &m_Action; }
|
||||
|
||||
void UpdatePlayerAction();
|
||||
void UpdateMonsterAction();
|
||||
|
||||
inline void SetGMModelFlag(unsigned char cGMModelFlag) { m_cGMModelFlag = cGMModelFlag; }
|
||||
inline unsigned char GetGMModelFlag(void) { return m_cGMModelFlag; }
|
||||
|
||||
inline void SetRealmPoint(unsigned char cRealmPoint) { m_cRealmPoint = cRealmPoint; }
|
||||
inline unsigned char GetRealmPoint(void) { return m_cRealmPoint; }
|
||||
|
||||
inline void SetTactics(unsigned char cTactics) { m_cTactics = cTactics; }
|
||||
inline unsigned char GetTactics(void) { return m_cTactics; }
|
||||
|
||||
public:
|
||||
void AddActionData( CharActionNode* pAction );
|
||||
|
||||
private:
|
||||
bool SetActionSub( unsigned long ulUpperAction, const char* pstrUpperAction, unsigned long ulLowerAction, const char* pstrLowerAction );
|
||||
public:
|
||||
inline unsigned long GetLowerActionID( void ) { return m_ulLowerCharActionID; }
|
||||
inline unsigned long GetUpperActionID( void ) { return m_ulUpperCharActionID; }
|
||||
|
||||
inline void SetUpperAble( bool bAble ) { m_bUpperAble = bAble; }
|
||||
inline bool GetUpperAble( void ) { return m_bUpperAble; }
|
||||
inline void SetLowerAble( bool bAble ) { m_bLowerAble = bAble; }
|
||||
inline bool GetLowerAble( void ) { return m_bLowerAble; }
|
||||
|
||||
inline void SetUpperActing( bool bActing ) { m_bUpperActing = bActing; }
|
||||
inline bool GetUpperActing( void ) { return m_bUpperActing; }
|
||||
inline void SetLowerActing( bool bActing ) { m_bLowerActing = bActing; }
|
||||
inline bool GetLowerActing( void ) { return m_bLowerActing; }
|
||||
|
||||
public:
|
||||
inline void SetShape( bool bForceChange = false ) { SetShape( m_strShape, m_EquipGrade, bForceChange ); }
|
||||
void SetShape( const char** strShape, const Broadcast2nd::CNetworkEquipGrade& equipGrade, bool bForceChange = false );
|
||||
inline const char** GetShapeString( void ) { return m_strShape; }
|
||||
|
||||
Broadcast2nd::CNetworkEquipGrade GetEquipGrade(void);
|
||||
|
||||
void InitCharAction( void ); // initialize action
|
||||
void InitWeapon( unsigned long ulEquip ); // initialize character weapon(?)
|
||||
bool IsCancelAction( unsigned long ulPart );
|
||||
|
||||
void Respawn( void );
|
||||
bool Landing( CCharacterControl* lpObjControl );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// do action funcions
|
||||
enum { MOVE_FOWARD = 0, MOVE_RIGHT, MOVE_BACK, MOVE_LEFT }; // Direction Identifier
|
||||
|
||||
void Walk( unsigned char ucDirection, float fRunFactor = 0.0f ); // move forward, back, left, right
|
||||
void Dead( void ); // set dead motion
|
||||
void Wait( void );
|
||||
void ToggleCrouch( void ); // Toggle "Crouch" <-> "Stand up"
|
||||
|
||||
bool Dash( unsigned char ucDirection );
|
||||
bool Jump( void );
|
||||
|
||||
void BeginCast( const char* pstrMotion );
|
||||
bool Casting( unsigned long ulUpperAct = 0xFFFFFFFF, unsigned long ulLowerAct = 0xFFFFFFFF );
|
||||
|
||||
void CancelSkill( void );
|
||||
void EndSkill( const char* pstrMotion );
|
||||
void SkillAttack( unsigned long ulUpperAct, unsigned long unLowerAct );
|
||||
|
||||
bool Attack( unsigned long ulUpperAct = 0xFFFFFFFF, unsigned long ulLowerAct = 0xFFFFFFFF );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// slide
|
||||
inline void SetSlideValue( CEffScript::CEffExt6 effValue ) { m_effSlideValue = effValue; m_bSlide = true;}
|
||||
void PlaySlide( void );
|
||||
void RenderSlide( float fBx, float fBy, float fBz, float fNx, float fNy, float fNz, float fUnitSize );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// get dead state
|
||||
inline void SetIsDead( bool bCharDead ) { m_bCharDead = bCharDead; }
|
||||
inline bool GetIsDead( void ) { return m_bCharDead; }
|
||||
|
||||
inline void SetDeadTimer( float fDeadTimer ) { m_fDeadTimer = fDeadTimer; }
|
||||
inline float GetDeadTimer( void ) { return m_fDeadTimer; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><>ų <20><><EFBFBD><EFBFBD>
|
||||
inline bool GetStillCasting( void ) { return m_bStillCasting; }
|
||||
inline void SetStillCasting( bool bStillCasting ) { m_bStillCasting = bStillCasting; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// creature current state
|
||||
inline void SetFlying( bool bFlying )
|
||||
{
|
||||
m_bFlying = bFlying;
|
||||
m_dwFlyingTick = timeGetTime();
|
||||
}
|
||||
|
||||
inline bool GetFlying( bool bTimeCheck = false )
|
||||
{
|
||||
// edtih 2009.08.12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20>Ұ<EFBFBD> <20><EFBFBD>Ʈ <20>ϴ<EFBFBD> <20><>ƾ.
|
||||
if(bTimeCheck && m_bFlying)
|
||||
{
|
||||
if(abs((long)timeGetTime()-(long)m_dwFlyingTick) > 3000)
|
||||
{
|
||||
m_bFlying = false;
|
||||
}
|
||||
}
|
||||
return m_bFlying;
|
||||
}
|
||||
|
||||
inline void SetSitMode( bool bSitMode ) { m_bSitMode = bSitMode; }
|
||||
inline bool GetSitMode( void ) { return m_bSitMode; }
|
||||
|
||||
inline void SetFlyFirstCheck( bool bFlyFirstCheck ) { m_bFlyFirstCheck = bFlyFirstCheck; }
|
||||
inline bool GetFlyFirstCheck( void ) { return m_bFlyFirstCheck; }
|
||||
|
||||
bool IsInSafetyZone( void );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Collision type
|
||||
inline void SetCDTType( unsigned char ucCDTType ) { m_ucCDTType = ucCDTType; }
|
||||
inline unsigned char GetCDTType( void ) { return m_ucCDTType; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// clear self object
|
||||
void ClearCreature( void );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// get creature effect
|
||||
inline RYLCreatureEffect* GetEffect( void ) { return m_pCreatureEffect; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// get damage effect
|
||||
inline RYLDamageEffect* GetDamageEffect( void ) { return m_pDamageEffect; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
float AttackWeaponRun( float fRunFactor );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
unsigned long GetCampID( void ) { return m_dwCampOrCastleID ; }
|
||||
unsigned long GetCastleID( void ) { return m_dwCampOrCastleID ; }
|
||||
void SetCampID( unsigned long dwCampID ) { m_dwCampOrCastleID = dwCampID ; }
|
||||
void SetCastleID( unsigned long dwCastleID ) { m_dwCampOrCastleID = dwCastleID ; }
|
||||
void SetCampOrCastleID( unsigned long dwCampOrCastleID ) { m_dwCampOrCastleID = dwCampOrCastleID ; }
|
||||
|
||||
unsigned long GetOwnerID( void ) { return m_dwOwnerID ; }
|
||||
void SetOwnerID( unsigned long dwOwnerID ) { m_dwOwnerID = dwOwnerID ; }
|
||||
|
||||
unsigned short GetObjectType( void ) { return m_wObjectType ; }
|
||||
void SetObjectType( unsigned short wObjectType ) { m_wObjectType = wObjectType ; }
|
||||
|
||||
unsigned char GetState( void ) { return m_cState ; }
|
||||
void SetState( unsigned char cState ) { m_cState = cState ; }
|
||||
|
||||
unsigned char GetSubState( void ) { return m_cSubState ; }
|
||||
void SetSubState( unsigned char cSubState ) { m_cSubState = cSubState ; }
|
||||
|
||||
unsigned char GetUpgradeStep( void ) { return m_cUpgradeStep ; }
|
||||
void SetUpgradeStep( unsigned char cUpgradeStep ) { m_cUpgradeStep = cUpgradeStep ; }
|
||||
|
||||
unsigned char GetUpgradeType( void ) { return m_cUpgradeType ; }
|
||||
void SetUpgradeType( unsigned char cUpgradeType ) { m_cUpgradeType = cUpgradeType ; }
|
||||
|
||||
CZ3DOBB* GetOBB( void ) { return m_pZ3DOBB; }
|
||||
void SetOBB( CZ3DOBB* pZ3DOBB ) { m_pZ3DOBB = pZ3DOBB; }
|
||||
|
||||
bool GetOBBEnable( void ) { return m_bOBBEnable ; }
|
||||
void SetOBBEnable( bool bOBBEnable ) { m_bOBBEnable = bOBBEnable ; }
|
||||
|
||||
unsigned long GetDoorBlockrate( void ) { return m_dwDoorBlockrate ; }
|
||||
void SetDoorBlockrate( unsigned long dwDoorBlockrate ) { m_dwDoorBlockrate = dwDoorBlockrate ; }
|
||||
|
||||
bool GetIsCastleObject( void ) ;
|
||||
bool GetIsCastleNPC( void ) ;
|
||||
bool GetIsSiegeArms( void ) ;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> ID
|
||||
DWORD GetRiderID( int iIndex ) { return m_dwRiderID[ iIndex ] ; }
|
||||
void AddRiderID( DWORD dwRiderID ) ;
|
||||
void DeleteRiderID( DWORD dwRiderID ) ;
|
||||
void SetRiders( DWORD* pdwRiders ) ;
|
||||
|
||||
bool GetRideEnable( void ) { return m_bRideEnable ; }
|
||||
void SetRideEnable( bool bRide ) { m_bRideEnable = bRide ; }
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
unsigned long GetCastleDoorUpgradePrice( void ) ;
|
||||
unsigned long GetCastleDoorUpgradeTime( void ) ;
|
||||
unsigned long GetCastleDoorRepairPrice( void ) ;
|
||||
unsigned long GetCastleDoorRecoveryPrice( void ) ;
|
||||
unsigned long GetCastleDoorRecoveryTime( void ) ;
|
||||
unsigned short GetRealObjType( bool bEmblemEnable = false ) ;
|
||||
|
||||
unsigned long GetCastleArmsDevelopePrice( DWORD dwArmsType ) ;
|
||||
unsigned long GetCastleArmsDevelopeTime( DWORD dwArmsType ) ;
|
||||
unsigned long GetCastleArmsRepairPrice() ;
|
||||
unsigned long GetCastleArmsRepairTime() ;
|
||||
|
||||
BOOL GetRepairFullHP() const { return m_bRepairFullHP ; }
|
||||
void SetRepairFullHP( BOOL bFull ) { m_bRepairFullHP = bFull ; }
|
||||
|
||||
CRYLLabel* GetCharStreetStallNameLabel() { return m_pCharStreetStallNameLabel ; }
|
||||
CRYLLabel* GetCharNameLabel() { return m_pCharNameLabel ; }
|
||||
CRYLLabel* GetCharTeampGuildNameLabel() { return m_pCharTempGuildNameLabel; }
|
||||
CRYLLabel* GetCharJobNameLabel() { return m_pCharJobNameLabel ; }
|
||||
CRYLLabel* GetCharChatMsgLabel() { return m_pCharChatMsgLabel ; }
|
||||
void MakeSignpostImg( char* pszText, bool bNPC = true ) ;
|
||||
CRYLPicture* GetSignpostImg() { return m_pSignpostImg ; }
|
||||
void DeleteSignpostImg() ;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
unsigned char GetGuildWarFlag( void ) const { return m_cGuildWarFlag ; }
|
||||
unsigned char GetRealmWarFlag( void ) const { return m_cRealmWarFlag ; }
|
||||
void SetGuildWarFlag( unsigned char cFlag ) { m_cGuildWarFlag = cFlag ; }
|
||||
void SetRealmWarFlag( unsigned char cFlag ) { m_cRealmWarFlag = cFlag ; }
|
||||
};
|
||||
|
||||
#endif // __RYL_CREATURE_H__
|
||||
172
Client/CharacterActionControl/RYLCreatureCommon.h
Normal file
172
Client/CharacterActionControl/RYLCreatureCommon.h
Normal file
@@ -0,0 +1,172 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: ZCreatureCommon.h
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: const variables which is using commonly in several files that concerned with character control
|
||||
//
|
||||
// Date: 2004. 3. 25. ( Thu )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __ZCREATURE_COMMON_H__
|
||||
#define __ZCREATURE_COMMON_H__
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// enum CHAR_ACT_ENUM : ij<><C4B3><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><EFBFBD> <20>Ѱ谪<D1B0><E8B0AA> 255<35><35>.
|
||||
enum CHAR_ACT_ENUM
|
||||
{
|
||||
CA_WAIT = 0,
|
||||
CA_RUN = 1,
|
||||
CA_ATTACK = 2,
|
||||
CA_MOVEATTACK = 3,
|
||||
CA_WALKBACK = 4,
|
||||
CA_WALKLEFT = 5,
|
||||
CA_WALKRIGHT = 6,
|
||||
CA_BASH = 7,
|
||||
CA_WALK = 8,
|
||||
CA_FALLDOWN = 9,
|
||||
CA_REST = 10,
|
||||
CA_SITDOWN = 11,
|
||||
CA_STANDUP = 12,
|
||||
CA_ATTACKADVANCE = 13,
|
||||
CA_ATTACKLEFT = 14,
|
||||
CA_ATTACKRIGHT = 15,
|
||||
CA_ATTACKRETREAT = 16,
|
||||
CA_ATTACK2 = 17,
|
||||
CA_ATTACK3 = 18,
|
||||
CA_ATTACK4 = 19,
|
||||
CA_RESPAWN = 20,
|
||||
CA_JUMP = 21,
|
||||
CA_LEFTDASH = 22,
|
||||
CA_RIGHTDASH = 23,
|
||||
CA_CASTING = 24,
|
||||
CA_FIRE1 = 25,
|
||||
CA_FIRE2 = 26,
|
||||
CA_COMBINATIONBLOW = 27,
|
||||
CA_BACKSTAB = 28,
|
||||
CA_AIMEDSHOT2 = 29,
|
||||
CA_ATTACK5 = 30,
|
||||
CA_ATTACK6 = 31,
|
||||
CA_BACKDASH = 32,
|
||||
CA_AIMEDSHOT1 = 33,
|
||||
CA_JUMPATTACK = 34,
|
||||
CA_JUMPATTACK2 = 35,
|
||||
CA_FRONTDASH = 36,
|
||||
CA_LAND = 37,
|
||||
CA_FORWARDJUMP = 38,
|
||||
CA_BACKJUMP = 40,
|
||||
CA_SHOT = 41,
|
||||
CA_JUMPSHOT = 42,
|
||||
CA_OVERBASH1 = 43,
|
||||
CA_OVERBASH2 = 44,
|
||||
CA_OVERBASH3 = 45,
|
||||
CA_OVERBASH4 = 46,
|
||||
CA_OVERBASH5 = 47,
|
||||
CA_POWERDRAIN = 48,
|
||||
CA_TURNPUNCH1 = 49,
|
||||
CA_TURNPUNCH2 = 50,
|
||||
CA_TURNPUNCH3 = 51,
|
||||
CA_JUMPATTACK3 = 52,
|
||||
CA_AIMEDSHOT3 = 53,
|
||||
CA_STUN = 54,
|
||||
CA_ROUNDSWING = 55,
|
||||
CA_SUMMON = 56,
|
||||
CA_HIT1 = 57,
|
||||
CA_WAITH1 = 58,
|
||||
CA_HIT2 = 59,
|
||||
CA_WAITH2 = 60,
|
||||
CA_ADVANCE = 61,
|
||||
CA_SWIM = 100,
|
||||
CA_FORWARD = 101, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD>
|
||||
CA_BACKWARD = 102, // <20><><EFBFBD><EFBFBD> <20>ڷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD>
|
||||
|
||||
CA_GATHERSTART = 111,
|
||||
CA_GATHER01 = 111,
|
||||
CA_GATHER02 = 112,
|
||||
CA_GATHER03 = 113,
|
||||
CA_GATHER04 = 114,
|
||||
CA_GATHER05 = 115,
|
||||
CA_GATHER06 = 116,
|
||||
CA_GATHER07 = 117,
|
||||
CA_GATHER08 = 118,
|
||||
CA_GATHER09 = 119,
|
||||
CA_GATHER10 = 120,
|
||||
CA_GATHEREND = 120,
|
||||
|
||||
CA_SOCIALSTART = 151,
|
||||
CA_SOCIAL_LAUGH = 151,
|
||||
CA_SOCIAL_DESPAIR = 152,
|
||||
CA_SOCIAL_SHY = 153,
|
||||
CA_SOCIAL_SURPRISE = 154,
|
||||
CA_SOCIAL_ROAR = 155,
|
||||
CA_SOCIAL_WAVE = 156,
|
||||
CA_SOCIAL_THANK = 157,
|
||||
CA_SOCIAL_SORRY = 158,
|
||||
CA_SOCIAL_SALUTE = 159,
|
||||
CA_SOCIAL_CHEER = 160,
|
||||
CA_SOCIAL_NOD = 161,
|
||||
CA_SOCIAL_NO = 162,
|
||||
CA_SOCIAL_CHARGE = 163,
|
||||
CA_SOCIAL_COMFORT = 164,
|
||||
CA_SOCIAL_TALK = 165,
|
||||
CA_SOCIALEND = 165,
|
||||
|
||||
CA_ACTIONEND = 165,
|
||||
|
||||
CA_MAX = 255,
|
||||
};
|
||||
|
||||
|
||||
//enum CHANT_ENUM
|
||||
//{
|
||||
// CHANT_BATTLE_SONG = 1,
|
||||
// CHANT_MAINTENANCE_CHANT = 2,
|
||||
// CHANT_ACCELERATION_CHANT = 3,
|
||||
// CHANT_LIFE_AURA = 4,
|
||||
//
|
||||
// CHANT_STRENGTH = 12,
|
||||
// CHANT_SLOW = 13,
|
||||
// CHANT_ARMOR_BROKEN = 14,
|
||||
// CHANT_BLAZE = 15,
|
||||
// CHANT_CHARGING = 16,
|
||||
// CHANT_STEALTH = 17,
|
||||
// CHANT_MANASHELL = 18,
|
||||
// CHANT_ENCOURAGE = 19,
|
||||
// CHANT_ENCHANT_WEAPON = 20,
|
||||
// CHANT_BRIGHT_ARMOR = 21,
|
||||
// CHANT_HARD_SKIN = 22,
|
||||
// CHANT_FLEXIBILITY = 23,
|
||||
// CHANT_GUARD = 24,
|
||||
// CHANT_HOLD = 25,
|
||||
// CHANT_STUN = 26,
|
||||
// CHANT_FROZEN = 27,
|
||||
// CHANT_POISONED = 28,
|
||||
// CHANT_LOWERSTRENGTH = 29,
|
||||
//
|
||||
// CHANT_INVINCIBLE = 30,
|
||||
//
|
||||
// CHANT_HIDE = 31,
|
||||
//
|
||||
// CHANT_MAX
|
||||
//};
|
||||
|
||||
enum Damage_Type
|
||||
{
|
||||
Type_Front = 0, Type_Side = 1, Type_Back = 2,
|
||||
Type_Guard = 3, Type_Critical = 4, Type_Heal = 5,
|
||||
Type_ManaHeal = 6, Type_Chant = 7, Type_Enchant = 8,
|
||||
Type_Disenchant = 9, Type_Evade = 10, Type_Resist = 11,
|
||||
Type_ManaShell = 12, Type_Poisoned = 13, Type_NonShow = 14,
|
||||
Type_Miss = 15, Type_Fired = 20, Type_MAX = 21
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Consts
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#endif //__ZCREATURE_COMMON_H__
|
||||
1837
Client/CharacterActionControl/RYLCreatureEffect.cpp
Normal file
1837
Client/CharacterActionControl/RYLCreatureEffect.cpp
Normal file
File diff suppressed because it is too large
Load Diff
250
Client/CharacterActionControl/RYLCreatureEffect.h
Normal file
250
Client/CharacterActionControl/RYLCreatureEffect.h
Normal file
@@ -0,0 +1,250 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLCreatureEffect.h
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: single Creature's effect management class
|
||||
//
|
||||
// Date: 2004. 4. 8. ( Thu )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __RYL_CREATURE_EFFECT_H__
|
||||
#define __RYL_CREATURE_EFFECT_H__
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#include "SceneManager.h"
|
||||
#include <Creature/CreatureStructure.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums, Structs
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// struct RYLBodyEffect : Creature <20><><EFBFBD><EFBFBD> <20>ٴ<EFBFBD> Effect
|
||||
struct RYLBodyEffect
|
||||
{
|
||||
CEffScript* m_pBodyEffScript;
|
||||
|
||||
bool m_bPivotRot;
|
||||
int m_nPivotIndex;
|
||||
string m_strPivotName;
|
||||
string m_strEffName;
|
||||
bool m_bIsUseEff;
|
||||
unsigned long m_ulEffID;
|
||||
|
||||
D3DXVECTOR3 m_D3DVecEffPos;
|
||||
|
||||
RYLBodyEffect()
|
||||
{
|
||||
m_pBodyEffScript= NULL;
|
||||
m_bPivotRot = false;
|
||||
m_nPivotIndex = -1;
|
||||
m_strPivotName.reserve( 128 );
|
||||
m_strEffName.reserve( 128 );
|
||||
m_bIsUseEff = false;
|
||||
m_ulEffID = 0;
|
||||
|
||||
m_D3DVecEffPos.x = m_D3DVecEffPos.y = m_D3DVecEffPos.z = 0.0f;
|
||||
}
|
||||
|
||||
~RYLBodyEffect()
|
||||
{
|
||||
m_strPivotName.clear();
|
||||
m_strEffName.clear();
|
||||
|
||||
if( m_pBodyEffScript )
|
||||
{
|
||||
if( !CSceneManager::m_EffectManager.CheckNullScript( m_pBodyEffScript ) )
|
||||
{
|
||||
m_pBodyEffScript->SetAllLoopOff();
|
||||
m_pBodyEffScript->SetVisibility( false );
|
||||
m_pBodyEffScript = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// struct RYLArrowEffect
|
||||
struct RYLArrowEffect
|
||||
{
|
||||
CEffScript* m_pArrowEffScript;
|
||||
string m_strPivotName;
|
||||
|
||||
RYLArrowEffect()
|
||||
{
|
||||
m_pArrowEffScript = NULL;
|
||||
m_strPivotName.clear();
|
||||
}
|
||||
|
||||
~RYLArrowEffect()
|
||||
{
|
||||
m_strPivotName.clear();
|
||||
|
||||
if( m_pArrowEffScript )
|
||||
{
|
||||
if( !CSceneManager::m_EffectManager.CheckNullScript( m_pArrowEffScript ) )
|
||||
{
|
||||
m_pArrowEffScript->SetAllLoopOff();
|
||||
m_pArrowEffScript->SetVisibility( false );
|
||||
m_pArrowEffScript = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// struct RYLWeaponEffect : Weapon<6F><6E> <20>ٴ<EFBFBD> effect
|
||||
struct RYLWeaponEffect
|
||||
{
|
||||
CEffScript* m_pWeaponEffScript;
|
||||
string m_strEffectName;
|
||||
|
||||
int m_nWeaponEffectNum; //effect<63><74> <20><><EFBFBD><EFBFBD>
|
||||
int m_nWeaponPosNum; //effect<63><74> <20><><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD> <20><> effect <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ
|
||||
|
||||
RYLWeaponEffect()
|
||||
{
|
||||
m_pWeaponEffScript = NULL;
|
||||
m_strEffectName.clear();
|
||||
|
||||
m_nWeaponEffectNum = 0;
|
||||
m_nWeaponPosNum = 0;
|
||||
}
|
||||
|
||||
~RYLWeaponEffect()
|
||||
{
|
||||
if( m_pWeaponEffScript )
|
||||
{
|
||||
if( !CSceneManager::m_EffectManager.CheckNullScript( m_pWeaponEffScript ) )
|
||||
{
|
||||
m_pWeaponEffScript->SetAllLoopOff();
|
||||
m_pWeaponEffScript->SetVisibility( false );
|
||||
m_pWeaponEffScript = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Consts
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Classes
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// pre-defined class
|
||||
class RYLCreature;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLCreatureEffect
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class RYLCreatureEffect
|
||||
{
|
||||
private:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Effect <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> mother creature <20><>ü<EFBFBD><C3BC> pointer( <20>Ҵ<EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>! )
|
||||
RYLCreature* m_pMotherCreature;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with chant effect
|
||||
EnchantInfo m_EnchantInfo; // current chant status
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Body Effect
|
||||
list<RYLBodyEffect*> m_lstBodyEff;
|
||||
bool m_bBodyEffExist;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Arrow Effect
|
||||
list<RYLArrowEffect*> m_lstArrowEff;
|
||||
bool m_bArrowEffExist;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Weapon Effect
|
||||
list<RYLWeaponEffect*> m_lstWeaponEff;
|
||||
bool m_bWeaponEffExist;
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Constructor, Destructor
|
||||
RYLCreatureEffect( RYLCreature* pMotherCreature );
|
||||
~RYLCreatureEffect();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// set effect visibility
|
||||
void SetEffectVisibility( bool bVisible );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Body Effect
|
||||
// ij<><C4B3> pos <20><> effect <20><><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD>
|
||||
void AddBodyEffect( string strScriptFile, unsigned long ulEffID = 0, bool bMine = true, bool bVisibility = true );
|
||||
// pivot <20>ϳ<EFBFBD><CFB3><EFBFBD> effect <20><><EFBFBD><EFBFBD> ( pivot name<6D><65><EFBFBD><EFBFBD>.. )
|
||||
void AddBodyEffect( string strScriptFile, string strPivot, bool bRot = false, unsigned long ulEffID = 0 );
|
||||
// pivot <20>ϳ<EFBFBD><CFB3><EFBFBD> effect <20><><EFBFBD><EFBFBD> ( pivot id<69><64>.. )
|
||||
void AddBodyEffect( string strScriptFile, int nPivotID, bool bRot = false, unsigned long ulEffID = 0 );
|
||||
|
||||
void DeleteBodyEffect(); // <20><> effect delete
|
||||
void DeleteBodyEffect( string strPivot ); // <20><> pivot<6F><74> <20><><EFBFBD><EFBFBD> effect delete
|
||||
void DeleteBodyEffect( const unsigned long ulEffID ); // effect id<69><64> delete
|
||||
void DeleteBodyEffectName( string strScriptFile ); // effect script <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD> delete
|
||||
|
||||
// all creature update
|
||||
void BodyEffectUpdate();
|
||||
// single creature update
|
||||
void BodyEffectUpdate( list<RYLBodyEffect*>::iterator& iterEffect, bool bAllUpdate = false );
|
||||
|
||||
void SetEffect(); // monster <20><><EFBFBD><EFBFBD> GCMDS<44><53><EFBFBD><EFBFBD> effect <20>ҷ<EFBFBD> <20><><EFBFBD>̴<EFBFBD> <20>ڵ<EFBFBD>
|
||||
|
||||
// Monster
|
||||
void MonsterEffectProcess( const char* pstrFileName, int nEffectValue );
|
||||
|
||||
// chant
|
||||
inline EnchantInfo& GetChantStatus() { return m_EnchantInfo; }
|
||||
bool GetChantStatus( unsigned long ulChantKind );
|
||||
void SetChantEffect( bool bSelf, bool bGoodChantEffectShow, bool bBadChantEffectShow );
|
||||
void SetChantEffect( const EnchantInfo& Info, bool bSelf, bool bGoodChantEffectShow, bool bBadChantEffectShow );
|
||||
void SetChantEffect( unsigned long ulChant, bool bToggle, bool bSelf, bool bGoodChantEffectShow, bool bBadChantEffectShow );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// support body effect
|
||||
private:
|
||||
bool CheckInBodyEffect( string strScriptFile ); // <20><><EFBFBD><EFBFBD> body effect list<73>ȿ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD><CFB4><EFBFBD> <20>˻<EFBFBD>
|
||||
void RenderSnap( float fBeforex, float fBeforey, float fBeforez,
|
||||
float fNowx, float fNowy, float fNowz,
|
||||
float fUnitsize, const char *pstrEffName );
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Arrow Effect
|
||||
// pivot<6F><74> arrow <20><><EFBFBD>̱<EFBFBD>
|
||||
void AddArrow( const char *pstrPivotName, D3DXQUATERNION Quat, int nDiv = 0 );
|
||||
|
||||
// all arrow update
|
||||
void ArrowUpdate();
|
||||
// single arrow update
|
||||
void ArrowUpdate( const unsigned int unIndex );
|
||||
|
||||
void DeleteArrow( int nIndex );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with Weapon Effect
|
||||
void AddWeaponEffect( string strEsfName, int nEffectNum, bool bVisible );
|
||||
|
||||
void DeleteWeaponEffect(); //<2F><> weapon effect delete
|
||||
void DeleteWeaponEffect(string strEsfName, int nEffNum ); //esfname<6D><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> effect delete
|
||||
|
||||
void WeaponEffectUpdate();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// clear self object
|
||||
void ClearEffect();
|
||||
};
|
||||
|
||||
#endif //__RYL_CREATURE_EFFECT_H__
|
||||
1593
Client/CharacterActionControl/RYLCreatureManager.cpp
Normal file
1593
Client/CharacterActionControl/RYLCreatureManager.cpp
Normal file
File diff suppressed because it is too large
Load Diff
205
Client/CharacterActionControl/RYLCreatureManager.h
Normal file
205
Client/CharacterActionControl/RYLCreatureManager.h
Normal file
@@ -0,0 +1,205 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLCreatureManager.h
|
||||
//
|
||||
// Programmer: RYLergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: Creature Managerment Class
|
||||
//
|
||||
// Date: 2004. 4. 7. ( Wen )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __RYLCREATURE_MANAGER_H__
|
||||
#define __RYLCREATURE_MANAGER_H__
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#include "RYLCreature.h"
|
||||
|
||||
class CCharacterControl;
|
||||
class CZ3DGeneralChrModel;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums, Structs
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
struct CharModelNode
|
||||
{
|
||||
CZ3DGeneralChrModel* m_pCharModel;
|
||||
string m_strGCMDSName;
|
||||
unsigned long m_ulUsedCharID;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Consts
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Classes
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLCreatureManager
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class RYLCreatureManager
|
||||
{
|
||||
private:
|
||||
|
||||
typedef map<unsigned long, unsigned long> ArmsMap;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// creature list
|
||||
RYLCreature* m_pSelfCreature; // self creature
|
||||
map<unsigned long,RYLCreature*> m_mapCreature; // creature map
|
||||
list<CharModelNode*> m_lstCharModel; // model data list
|
||||
|
||||
map<unsigned long,RYLCreature*>::iterator m_iterBeforeCreature; // <20>ܺο<DCBA><CEBF><EFBFBD> map <20><>ȸ<EFBFBD><C8B8> <20><><EFBFBD>Ҷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȸ<EFBFBD><C8B8> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ִٰ<D6B4> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>Ѱ<EFBFBD><D1B0>ش<EFBFBD>.
|
||||
list<CharModelNode*>::iterator m_iterBeforeModel; // <20>ܺο<DCBA><CEBF><EFBFBD> map <20><>ȸ<EFBFBD><C8B8> <20><><EFBFBD>Ҷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȸ<EFBFBD><C8B8> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ִٰ<D6B4> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>Ѱ<EFBFBD><D1B0>ش<EFBFBD>.
|
||||
|
||||
|
||||
|
||||
ArmsMap m_ArmsMap;
|
||||
|
||||
unsigned int m_unMaxCash; // cash size
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// CCharacterControl
|
||||
CCharacterControl* m_pObjControl;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// concerned with effect
|
||||
bool m_bGoodChantEffectShow; // good effect show?
|
||||
bool m_bBadChantEffectShow; // bad effect show?
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Constructor, Destructor
|
||||
RYLCreatureManager( unsigned int unMaxCash = 30 );
|
||||
~RYLCreatureManager();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Binding functions
|
||||
static char* (*GetMotionSheet)( char* pstrWeaponName, char* pstrShieldName, unsigned short usClass );
|
||||
static unsigned long (*GetWeaponType)( char* strWeaponName );
|
||||
static unsigned long (*GetClientIdentity)( unsigned long dwChrID ) ;
|
||||
static unsigned long (*GetClientEnemyType)( unsigned long dwChrID) ;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
void SetObjectControl( CCharacterControl* pObjControl ) { m_pObjControl = pObjControl; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// creature managing
|
||||
unsigned long AddCreature( unsigned long ulCharID, const char* pstrName, const char* pstrGCMDSName,
|
||||
vector3 vecPosition, float fDirection, bool bCollision, unsigned long dwNation = 0,
|
||||
int iValue = -1, CZ3DGeneralChrModel **ppOld = NULL,bool bHouse = false,int iHouseType = -1,
|
||||
D3DXVECTOR3 vecPos = D3DXVECTOR3(0.0f,0.0f,0.0f) ) ;
|
||||
|
||||
unsigned long AddCreature( unsigned long ulCharID, const char* pstrName, const char* pstrGCMDSName,
|
||||
const char* pstrFaceType, const char* pstrHairType,
|
||||
const char** pstrShape, const Broadcast2nd::CNetworkEquipGrade& equipGrade,
|
||||
unsigned char ucRace, vector3 vecPosition, float fDirection, bool bCollision,
|
||||
int iValue = -1, CZ3DGeneralChrModel **ppOld = NULL,bool bHouse = false,int iHouseType = -1,
|
||||
D3DXVECTOR3 vecPos = D3DXVECTOR3(0.0f,0.0f,0.0f) ) ;
|
||||
|
||||
unsigned long AddCreature( unsigned long ulCharID, vector3 vecPosition,
|
||||
int iValue = -1, CZ3DGeneralChrModel **ppOld = NULL,
|
||||
bool bHouse = false, int iHouseType = -1,
|
||||
D3DXVECTOR3 vecPos = D3DXVECTOR3(0.0f,0.0f,0.0f) );
|
||||
|
||||
// Special Case : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> Switching <20>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
RYLCreature* AddSiegeCreature( RYLCreature* pSiegeCreature, unsigned long ulCharID, const char* pstrName, vector3 vecPosition, float fDirection, const char* pstrType );
|
||||
|
||||
void DeleteCreature( unsigned long ulCharID, BOOL bForceDelete = FALSE );
|
||||
void SwitchCreature( RYLCreature* pNode1, RYLCreature* pNode2 ) ;
|
||||
|
||||
// Creature<72><65> <20><><EFBFBD><EFBFBD>Ʈ <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.( Creature<72><65> <20>״<EFBFBD><D7B4><EFBFBD> <20><><EFBFBD><EFBFBD> ä <20>ּҸ<D6BC> <20><><EFBFBD><EFBFBD>... )
|
||||
void AddCreatureList( RYLCreature* pCreature );
|
||||
RYLCreature* DeleteCreatureList( unsigned long ulCharID );
|
||||
|
||||
RYLCreature* GetCreature( CZ3DGeneralChrModel *pModel );
|
||||
RYLCreature* GetCreature( unsigned long ulCharID );
|
||||
RYLCreature* GetCreature( char* szName );
|
||||
|
||||
|
||||
RYLCreature* GetCreatureByAddedOrder( unsigned long ulAddedOrder );
|
||||
|
||||
inline RYLCreature* GetSelfCreature() { return m_pSelfCreature; }
|
||||
inline void SetSelfCreature( RYLCreature* pSelfCreature ) { m_pSelfCreature = pSelfCreature; }
|
||||
|
||||
void SortCreatureMap();
|
||||
|
||||
void GetCharIDArray( vector<unsigned long>& vtCharID ); // ij<><C4B3><EFBFBD><EFBFBD> ID<49><44> <20><><EFBFBD>Ƽ<EFBFBD> <20>迭<EFBFBD><E8BFAD>...
|
||||
|
||||
const char* GetCreatureName( unsigned long ulCharID ); // ij<><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD><C7B4><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>( NULL<4C≯<EFBFBD> <20><>ȿ )
|
||||
|
||||
RYLCreature* GetCreatureListHead();
|
||||
RYLCreature* GetCreatureListNext();
|
||||
|
||||
CZ3DGeneralChrModel* GetModelListHead();
|
||||
CZ3DGeneralChrModel* GetModelListNext();
|
||||
|
||||
inline void SetMaxCash( unsigned int unMaxCash ) { m_unMaxCash = unMaxCash; }
|
||||
inline unsigned int GetMaxCash() { return m_unMaxCash; }
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// model memory managing
|
||||
CZ3DGeneralChrModel* AllocModel( RYLCreature* pCreature, bool bHouse = false, int iHouseType = -1, D3DXVECTOR3 vecPos = D3DXVECTOR3(0.0f, 0.0f, 0.0f) );
|
||||
CZ3DGeneralChrModel* AllocTransformModel( unsigned long ulCharID, const char* pstrGCMDSName, bool bHouse = false, int iHouseType = -1, D3DXVECTOR3 vecPos = D3DXVECTOR3(0.0f, 0.0f, 0.0f) );
|
||||
void FreeModel( CZ3DGeneralChrModel* pModel, BOOL bForceDelete = FALSE );
|
||||
CharModelNode* CheckUsableModelNode( const char* pstrGCMDSName );
|
||||
bool CheckExistModel( CZ3DGeneralChrModel* pModel );
|
||||
// 2005.06.20, yundi, PC<50><43> 0<><30><EFBFBD>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> GMij<4D><C4B3><EFBFBD>ͷ<EFBFBD> <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
CZ3DGeneralChrModel* ReplaceModel( RYLCreature* pCreature, const char* pstrGCMDSName );
|
||||
|
||||
//---------------------------------------------------------------- ----------------------------------------------------------
|
||||
// get character list
|
||||
void GetSendCharacterChatList( list<unsigned long>& lstChar );
|
||||
void GetSendCharacterAroundList( list<unsigned long>& lstChar, unsigned long ulSummonID = 0, bool bSummonAttacked = false );
|
||||
void GetSendCharacterAroundList( list<unsigned long>& lstChar, unsigned long ulSummonID[ 10 ] );
|
||||
void GetSendCharacterList( list<unsigned long>& lstChar );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// clear self object
|
||||
void ClearCreatureManager();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// add action node to single creature
|
||||
void AddAction( unsigned long ulCharID, unsigned long ulUpperAni, unsigned long ulLowerAni,
|
||||
float fDirection, vector3 &vecNextPosition,
|
||||
float fVec = 0.0f, unsigned short usAniNum = 0, unsigned long ulFrame = 0 );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Transformation
|
||||
void Transformation( unsigned long ulCharID, const char* pstrGCMDSName = NULL );
|
||||
|
||||
void AddArmsCreature(unsigned long dwCID, unsigned long dwArmsCID);
|
||||
void DeleteArmsCreature(unsigned long dwCID);
|
||||
unsigned long IsArmsCreature(unsigned long dwCID);
|
||||
void DeleteAllArmsCreature(void);
|
||||
|
||||
private:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// singleton
|
||||
static RYLCreatureManager* m_pInstance;
|
||||
|
||||
public:
|
||||
static VOID Release()
|
||||
{
|
||||
if( m_pInstance )
|
||||
{
|
||||
delete m_pInstance;
|
||||
m_pInstance = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static RYLCreatureManager* Instance()
|
||||
{
|
||||
if( !m_pInstance )
|
||||
{
|
||||
m_pInstance = new RYLCreatureManager;
|
||||
}
|
||||
|
||||
return m_pInstance;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //__RYLCREATURE_MANAGER_H__
|
||||
585
Client/CharacterActionControl/RYLDamageEffect.cpp
Normal file
585
Client/CharacterActionControl/RYLDamageEffect.cpp
Normal file
@@ -0,0 +1,585 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLDamageEffect.cpp
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: single creature's damage management
|
||||
//
|
||||
// Date: 2004. 4. 10. ( Sat )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#include "FrameTimer.h"
|
||||
#include "../RYLClient/RYLClient/RYLTimer.h"
|
||||
#include "Texture.h"
|
||||
#include "SceneManager.h"
|
||||
|
||||
#include "RYLCreatureCommon.h"
|
||||
#include "RYLDamageEffect.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// functor
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
static void ftDeleteDamageEffect( RYLDamageNode* pNode )
|
||||
{
|
||||
delete pNode;
|
||||
pNode = NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLDamageEffect
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// constructor, destructor
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
RYLDamageEffect::RYLDamageEffect()
|
||||
{
|
||||
m_pNumberTexture = NULL;
|
||||
}
|
||||
|
||||
RYLDamageEffect::~RYLDamageEffect()
|
||||
{
|
||||
ClearDamageEffect();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// member functions
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLDamageEffect::RenderDamage()
|
||||
void RYLDamageEffect::RenderDamage( LPDIRECT3DDEVICE8 lpD3DDevice, bool bMovieVersion, vector3 vecPos, DAMAGE_TYPE type )
|
||||
{
|
||||
if( !m_lstDamageEffect.empty() )
|
||||
{
|
||||
float fUpdate = CFrameTimer::GetUpdateTimer( GRYLTimer.GetShowInterfaceTimerID( ) );
|
||||
short wAlpha;
|
||||
|
||||
list<RYLDamageNode*>::iterator iter = m_lstDamageEffect.begin();
|
||||
|
||||
while( iter != m_lstDamageEffect.end() )
|
||||
{
|
||||
wAlpha = ( (*iter)->sDamageLifeTime / 1500.0f * 255.0f );
|
||||
|
||||
if( wAlpha < 0 )
|
||||
{
|
||||
wAlpha = 0;
|
||||
}
|
||||
|
||||
unsigned short wMode = 0;
|
||||
float fRate = 0.0f;
|
||||
|
||||
if( !bMovieVersion )
|
||||
{
|
||||
fRate = (*iter)->fScale;
|
||||
|
||||
switch( (*iter)->usDamageType )
|
||||
{
|
||||
case Type_Front:
|
||||
case Type_Side:
|
||||
case Type_Back:
|
||||
case Type_Poisoned:
|
||||
case Type_Fired:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Heal:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_ManaHeal:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Guard:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 7;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Critical:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 6;
|
||||
if( (*iter)->sDamageLifeTime >= 1200 )
|
||||
{
|
||||
fRate = ( 5.0f - ( 1.0f - ( ( (*iter)->sDamageLifeTime - 1200.0f ) / 300.0f ) ) * 4.0f ) * (*iter)->fScale;
|
||||
}
|
||||
else
|
||||
{
|
||||
fRate = (*iter)->fScale;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 5;
|
||||
if( (*iter)->sDamageLifeTime >= 1200 )
|
||||
{
|
||||
fRate = ( 5.0f - ( 1.0f - ( ( (*iter)->sDamageLifeTime - 1200.0f ) / 300.0f ) ) * 4.0f ) * (*iter)->fScale;
|
||||
}
|
||||
else
|
||||
{
|
||||
fRate = (*iter)->fScale;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Evade:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 9;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 9;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Resist:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 10;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 10;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Type_Miss:
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case FRIENDLY_DAMAGE:
|
||||
{
|
||||
wMode = 11;
|
||||
}
|
||||
break;
|
||||
|
||||
case ENEMY_DAMAGE:
|
||||
{
|
||||
wMode = 12;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RenderDamageNumber( lpD3DDevice,
|
||||
vecPos.x, vecPos.y - ( 1.0f - (*iter)->sDamageLifeTime / 1500.0f ) * 90.0f,
|
||||
static_cast<unsigned char>( wAlpha ) * (*iter)->fScale, wMode, (*iter)->lDamageValue, fRate, (*iter)->dwAlign );
|
||||
|
||||
|
||||
(*iter)->sDamageLifeTime -= fUpdate * 2.0f;
|
||||
|
||||
if( (*iter)->sDamageLifeTime <= 0 )
|
||||
{
|
||||
delete (*iter) ;
|
||||
(*iter) = NULL ;
|
||||
m_lstDamageEffect.erase( iter );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLDamageEffect::RenderDamageNumber()
|
||||
void RYLDamageEffect::RenderDamageNumber( LPDIRECT3DDEVICE8 lpD3DDevice, short sPosX, short sPosY, unsigned char cAlpha, unsigned short wMode, long lValue, float fRate, unsigned long dwAlign )
|
||||
{
|
||||
if( !m_pNumberTexture )
|
||||
{
|
||||
m_pNumberTexture = new CTexture;
|
||||
CTexture::SetPath( INTERFACETEXTUREPATH );
|
||||
m_pNumberTexture->Load( "num.dds" );
|
||||
}
|
||||
lpD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
lpD3DDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA ) ;
|
||||
lpD3DDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ) ;
|
||||
|
||||
lpD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ) ;
|
||||
lpD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ) ;
|
||||
lpD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE ) ;
|
||||
lpD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ) ;
|
||||
lpD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE ) ;
|
||||
|
||||
char strNum[ 12 ];
|
||||
itoa( abs( lValue ), strNum, 10 );
|
||||
|
||||
switch( wMode )
|
||||
{
|
||||
case 5: // Critical
|
||||
case 6:
|
||||
if( strcmp( strNum, "" ) )
|
||||
{
|
||||
float fRealX = 23.0f * fRate;
|
||||
float fRealY = 29.0f * fRate;
|
||||
|
||||
int len = strlen( strNum );
|
||||
float fPosX;
|
||||
switch(dwAlign)
|
||||
{
|
||||
case RYLDamageNode::DN_Center:
|
||||
fPosX = sPosX - ( (len * fRealX) / 2.0f);
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Left:
|
||||
fPosX = sPosX - ( (len * fRealX) + (fRealX / 2.0f) );
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Right:
|
||||
fPosX = sPosX + (fRealX / 2.0f);
|
||||
break;
|
||||
}
|
||||
float fPosY = sPosY - ( ( fRealY - 29.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = ( 92 + ( ( wMode - 5 ) * 29.0f ) ) / 256.0f + 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = ( 92 + ( ( wMode - 5 ) * 29.0f + 29.0f ) ) / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
|
||||
for( int i = 0; i < len; i++ )
|
||||
{
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = ( ( strNum[ i ] - '0' ) * 23.0f ) / 256.0f + 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = ( ( strNum[ i ] - '0' ) * 23.0f + 23.0f ) / 256.0f - 0.0005f;
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
|
||||
pVertices[ 0 ].v.x += fRealX;
|
||||
pVertices[ 1 ].v.x += fRealX;
|
||||
pVertices[ 2 ].v.x += fRealX;
|
||||
pVertices[ 3 ].v.x += fRealX;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: // Block
|
||||
case 8:
|
||||
{
|
||||
float fRealX = 88.0f * fRate;
|
||||
float fRealY = 24.0f * fRate;
|
||||
|
||||
float fPosX = sPosX - fRealX / 2.0f;
|
||||
float fPosY = sPosY - ( ( fRealY - 24.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = 88 / 256.0f - 0.0005f;
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = ( 150 + ( ( wMode - 7 ) * 24.0f ) ) / 256.0f - 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = ( 150 + ( ( wMode - 7 ) * 24.0f + 24.0f ) ) / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case 9: // Evade
|
||||
{
|
||||
float fRealX = 110.0f * fRate;
|
||||
float fRealY = 25.0f * fRate;
|
||||
|
||||
float fPosX = sPosX - fRealX / 2.0f;
|
||||
float fPosY = sPosY - ( ( fRealY - 25.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = 110 / 256.0f - 0.0005f;
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = 198 / 256.0f - 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = 223 / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: // Resist
|
||||
{
|
||||
float fRealX = 105.0f * fRate;
|
||||
float fRealY = 27.0f * fRate;
|
||||
|
||||
float fPosX;
|
||||
switch(dwAlign)
|
||||
{
|
||||
case RYLDamageNode::DN_Center:
|
||||
fPosX = sPosX - fRealX / 2.0f;
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Left:
|
||||
fPosX = sPosX - ( fRealX + (fRealX / 6.0f) );
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Right:
|
||||
fPosX = sPosX + (fRealX / 6.0f);
|
||||
break;
|
||||
}
|
||||
float fPosY = sPosY - ( ( fRealY - 27.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = 105 / 256.0f - 0.0005f;
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = 223 / 256.0f - 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = 250 / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case 11: // Miss
|
||||
case 12:
|
||||
{
|
||||
float fRealX = 88.0f * fRate;
|
||||
float fRealY = 24.0f * fRate;
|
||||
|
||||
float fPosX = sPosX - fRealX / 2.0f;
|
||||
float fPosY = sPosY - ( ( fRealY - 24.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = 91 / 256.0f - 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = 163 / 256.0f - 0.0005f;
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = ( 150 + ( ( wMode - 11 ) * 24.0f ) ) / 256.0f - 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = ( 150 + ( ( wMode - 11 ) * 24.0f + 24.0f ) ) / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
}
|
||||
break;
|
||||
|
||||
default: // Normal
|
||||
if( strcmp( strNum, "" ) )
|
||||
{
|
||||
float fRealX = 21.0f * fRate;
|
||||
float fRealY = 23.0f * fRate;
|
||||
|
||||
int len = strlen( strNum );
|
||||
float fPosX;
|
||||
switch(dwAlign)
|
||||
{
|
||||
case RYLDamageNode::DN_Center:
|
||||
fPosX = sPosX - ( (len * fRealX) / 2.0f);
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Left:
|
||||
fPosX = sPosX - ( (len * fRealX) + (fRealX / 2.0f) );
|
||||
break;
|
||||
|
||||
case RYLDamageNode::DN_Right:
|
||||
fPosX = sPosX + (fRealX / 2.0f);
|
||||
break;
|
||||
}
|
||||
float fPosY = sPosY - ( ( fRealY - 23.0f ) / 2.0f );
|
||||
|
||||
TLVertex pVertices[ 4 ];
|
||||
pVertices[ 0 ].Diffuse.c = pVertices[ 1 ].Diffuse.c = pVertices[ 2 ].Diffuse.c = pVertices[ 3 ].Diffuse.c = 0xFFFFFFFF;
|
||||
pVertices[ 0 ].Diffuse.a = pVertices[ 1 ].Diffuse.a = pVertices[ 2 ].Diffuse.a = pVertices[ 3 ].Diffuse.a = cAlpha;
|
||||
pVertices[ 0 ].Specular.c = pVertices[ 1 ].Specular.c = pVertices[ 2 ].Specular.c = pVertices[ 3 ].Specular.c = 0;
|
||||
pVertices[ 0 ].w = pVertices[ 1 ].w = pVertices[ 2 ].w = pVertices[ 3 ].w = 0.1f;
|
||||
pVertices[ 0 ].v.z = pVertices[ 1 ].v.z = pVertices[ 2 ].v.z = pVertices[ 3 ].v.z = 0.1f;
|
||||
|
||||
pVertices[ 0 ].v.x = pVertices[ 1 ].v.x = fPosX - 0.5f;
|
||||
pVertices[ 2 ].v.x = pVertices[ 3 ].v.x = fPosX + fRealX - 0.5f;
|
||||
pVertices[ 0 ].v.y = pVertices[ 2 ].v.y = fPosY - 0.5f;
|
||||
pVertices[ 1 ].v.y = pVertices[ 3 ].v.y = fPosY + fRealY - 0.5f;
|
||||
|
||||
pVertices[ 0 ].tv = pVertices[ 2 ].tv = ( wMode * 23.0f ) / 256.0f + 0.0005f;
|
||||
pVertices[ 1 ].tv = pVertices[ 3 ].tv = ( wMode * 23.0f + 23.0f ) / 256.0f - 0.0005f;
|
||||
|
||||
lpD3DDevice->SetVertexShader( NULL );
|
||||
lpD3DDevice->SetVertexShader( TLVERTEXFVF );
|
||||
lpD3DDevice->SetTexture( 1, NULL );
|
||||
lpD3DDevice->SetTexture( 0, m_pNumberTexture->GetTexture() );
|
||||
|
||||
for( int i = 0; i < len; i++ )
|
||||
{
|
||||
pVertices[ 0 ].tu = pVertices[ 1 ].tu = ( ( strNum[ i ] - '0' ) * 21.0f ) / 256.0f + 0.0005f;
|
||||
pVertices[ 2 ].tu = pVertices[ 3 ].tu = ( ( strNum[ i ] - '0' ) * 21.0f + 21.0f ) / 256.0f - 0.0005f;
|
||||
lpD3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, pVertices, sizeof( TLVertex ) );
|
||||
|
||||
pVertices[ 0 ].v.x += fRealX;
|
||||
pVertices[ 1 ].v.x += fRealX;
|
||||
pVertices[ 2 ].v.x += fRealX;
|
||||
pVertices[ 3 ].v.x += fRealX;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLDamageEffect::ClearDamageEffect()
|
||||
void RYLDamageEffect::ClearDamageEffect()
|
||||
{
|
||||
for_each( m_lstDamageEffect.begin(), m_lstDamageEffect.end(), ftDeleteDamageEffect );
|
||||
m_lstDamageEffect.clear();
|
||||
|
||||
if( m_pNumberTexture )
|
||||
{
|
||||
delete m_pNumberTexture;
|
||||
m_pNumberTexture = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// RYLDamageEffect::
|
||||
93
Client/CharacterActionControl/RYLDamageEffect.h
Normal file
93
Client/CharacterActionControl/RYLDamageEffect.h
Normal file
@@ -0,0 +1,93 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// File Name: RYLDamageEffect.h
|
||||
//
|
||||
// Programmer: Zergra( Park Jongtae ) in GamaSoft corp.
|
||||
//
|
||||
// File Desciption: single creature's damage management
|
||||
//
|
||||
// Date: 2004. 3. 10. ( Sat )
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#ifndef __RYL_DAMAGE_EFFECT_H__
|
||||
#define __RYL_DAMAGE_EFFECT_H__
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Headers
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
#include "Z3DGeneralChrModel.h"
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
class CTexture;
|
||||
class CRYLGameData;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Enums, Structs
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
struct RYLDamageNode
|
||||
{
|
||||
short sDamageLifeTime;
|
||||
long lDamageValue;
|
||||
unsigned short usDamageType;
|
||||
float fScale;
|
||||
long dwAlign; // 0 : Center, 1 : Left, 2 : Right
|
||||
|
||||
enum
|
||||
{
|
||||
DN_Center = 0,
|
||||
DN_Left,
|
||||
DN_Right
|
||||
};
|
||||
|
||||
RYLDamageNode()
|
||||
{
|
||||
sDamageLifeTime = 0;
|
||||
lDamageValue = 0;
|
||||
usDamageType = 0;
|
||||
fScale = 0.0f;
|
||||
dwAlign = DN_Center;
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Consts
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Classes
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class RYLDamageEffect
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class RYLDamageEffect
|
||||
{
|
||||
private:
|
||||
CTexture* m_pNumberTexture;
|
||||
list<RYLDamageNode*> m_lstDamageEffect;
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Constructor, Destructor
|
||||
RYLDamageEffect();
|
||||
~RYLDamageEffect();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// add damage effect
|
||||
inline void AddDamage( RYLDamageNode* pNode ) { m_lstDamageEffect.push_back( pNode ); }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// damage rendering
|
||||
enum DAMAGE_TYPE { FRIENDLY_DAMAGE = 0, ENEMY_DAMAGE = 1 };
|
||||
void RenderDamage( LPDIRECT3DDEVICE8 lpD3DDevice, bool bMovieVersion, vector3 vecPos, DAMAGE_TYPE type );
|
||||
private:
|
||||
void RenderDamageNumber( LPDIRECT3DDEVICE8 lpD3DDevice, short sPosX, short sPosY, unsigned char cAlpha, unsigned short wMode, long lValue, float fRate, unsigned long dwAlign );
|
||||
|
||||
public:
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// clear self object
|
||||
void ClearDamageEffect();
|
||||
};
|
||||
|
||||
|
||||
#endif // __RYL_DAMAGE_EFFECT_H__
|
||||
1446
Client/CharacterActionControl/RYLDropshipControl.cpp
Normal file
1446
Client/CharacterActionControl/RYLDropshipControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
76
Client/CharacterActionControl/RYLDropshipControl.h
Normal file
76
Client/CharacterActionControl/RYLDropshipControl.h
Normal file
@@ -0,0 +1,76 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLDropshipControl.h
|
||||
// Desc : <20><><EFBFBD>ۼ<EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_DROPSHIPCONTROL_H__
|
||||
#define __RYL_DROPSHIPCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
#include "RYLLongAttackWeaponControl.h"
|
||||
|
||||
class CRYLDropshipControl
|
||||
{
|
||||
private :
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
CZ3DObject* m_lpWingObject ;
|
||||
|
||||
RYLCreature* m_lpSiegeModel; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_byVelocity[ 228 ] ;
|
||||
unsigned int m_iVelocityControl ;
|
||||
CRYLEaseOutDivideInterpolation m_EaseOutDivideInterpolation ;
|
||||
|
||||
long m_lVelocityUpdate ;
|
||||
long m_lTireAngleUpdate ;
|
||||
long m_lRealAngleUpdate ;
|
||||
|
||||
public :
|
||||
|
||||
FLOAT m_fTireSpeed ;
|
||||
LONG m_lRealTireRotateUpdate ; // Update Time
|
||||
FLOAT m_fRealTireAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lTireRotateUpdate ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> Update time
|
||||
FLOAT m_fTireAngle ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
FLOAT m_fBodyAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8>
|
||||
float m_fVelocity ;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
CRYLDropshipControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLDropshipControl() ;
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
|
||||
VOID SetModifySkileton() ;
|
||||
VOID SetSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection ) ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpSiegeModel ; }
|
||||
void SetCreature( RYLCreature* pCreature ) { m_lpSiegeModel = pCreature ; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
} ;
|
||||
|
||||
#endif //__RYL_DROPSHIPCONTROL_H__
|
||||
2197
Client/CharacterActionControl/RYLGMCharacterControl.cpp
Normal file
2197
Client/CharacterActionControl/RYLGMCharacterControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
59
Client/CharacterActionControl/RYLGMCharacterControl.h
Normal file
59
Client/CharacterActionControl/RYLGMCharacterControl.h
Normal file
@@ -0,0 +1,59 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLGMCharacterControl.h
|
||||
// Desc : GM ij<><C4B3><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2005. 04. 18
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_GMCHARACTERCONTROL_H__
|
||||
#define __RYL_GMCHARACTERCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
|
||||
class CRYLGMCharacterControl
|
||||
{
|
||||
private :
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
RYLCreature* m_lpCreature;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
BOOL m_bLeftMousePress;
|
||||
BOOL m_bRightMousePress;
|
||||
BOOL m_bClickPlayerAndNpc;
|
||||
BOOL m_bClickSkill;
|
||||
|
||||
unsigned long m_dwNormalTargetID;
|
||||
unsigned long m_dwSpecialTargetID;
|
||||
|
||||
BOOL m_bLeftClickDown;
|
||||
bool m_bKeyPress;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
CRYLGMCharacterControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLGMCharacterControl() ;
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int nMouseX = 0,int nMouseY = 0 ) ;
|
||||
|
||||
VOID MouseClickModeSelfCharacterUpdate( BOOL bKeyAble, BOOL bEdge, int nMouseX, int nMouseY ) ;
|
||||
RYLCreature* MouseClickModeSelectSpecialTarget( RYLCreature* pCreature, int nMouseX, int nMouseY );
|
||||
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
VOID RestoreCamera() ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpCreature; }
|
||||
CCharacterControl *GetCreatureControl() { return m_lpObjControl; }
|
||||
VOID SetCreature( RYLCreature* pCreature ) { m_lpCreature = pCreature; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
} ;
|
||||
|
||||
#endif //__RYL_GMCHARACTERCONTROL_H__
|
||||
1784
Client/CharacterActionControl/RYLLongAttackWeaponControl.cpp
Normal file
1784
Client/CharacterActionControl/RYLLongAttackWeaponControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
174
Client/CharacterActionControl/RYLLongAttackWeaponControl.h
Normal file
174
Client/CharacterActionControl/RYLLongAttackWeaponControl.h
Normal file
@@ -0,0 +1,174 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLLongAttackWeaponControl.h
|
||||
// Desc : <20><><EFBFBD>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_LONGATTACKWEAPONCONTROLL_H__
|
||||
#define __RYL_LONGATTACKWEAPONCONTROLL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
|
||||
typedef struct __SDiffuseVertex
|
||||
{
|
||||
D3DXVECTOR3 Position ;
|
||||
DWORD Color;
|
||||
} SDiffuseVertex;
|
||||
|
||||
#define FVF_VERTEX (D3DFVF_XYZ | D3DFVF_DIFFUSE)
|
||||
|
||||
class CRYLEaseOutShiftInterpolation
|
||||
{
|
||||
private :
|
||||
int _value ;
|
||||
int _target ;
|
||||
int _shift ;
|
||||
|
||||
public :
|
||||
bool Setup( int from, int to, int shift )
|
||||
{
|
||||
if ( shift <= 0 )
|
||||
{
|
||||
return false ;
|
||||
}
|
||||
|
||||
_value = from ;
|
||||
_target = to ;
|
||||
_shift = shift ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
// <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool Interpolate()
|
||||
{
|
||||
int oldValue = _value ;
|
||||
if ( _shift > 0 )
|
||||
{
|
||||
_value = ( _value * ( ( 1 << _shift ) - 1 ) + _target ) >> _shift ;
|
||||
}
|
||||
|
||||
return ( _value == oldValue ) ;
|
||||
}
|
||||
|
||||
int GetValue()
|
||||
{
|
||||
return _value ;
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
//=================================================================================
|
||||
class CRYLEaseOutDivideInterpolation : public CRYLEaseOutShiftInterpolation
|
||||
{
|
||||
public :
|
||||
float _value ;
|
||||
float _target ;
|
||||
float _divisor ;
|
||||
|
||||
public :
|
||||
bool Setup( float from, float to, float divisor )
|
||||
{
|
||||
if ( divisor <= 0 )
|
||||
{
|
||||
return false ;
|
||||
}
|
||||
|
||||
_value = from ;
|
||||
_target = to ;
|
||||
_divisor = divisor ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
// <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool Interpolate()
|
||||
{
|
||||
float oldValue = _value ;
|
||||
|
||||
if ( _divisor > 0 )
|
||||
{
|
||||
_value = ( _value * ( _divisor - 1.0f ) + _target ) / _divisor ;
|
||||
}
|
||||
|
||||
return ( _value == oldValue ) ;
|
||||
}
|
||||
|
||||
float GetValue()
|
||||
{
|
||||
return _value ;
|
||||
}
|
||||
} ;
|
||||
|
||||
class CRYLLongAttackWeaponControl
|
||||
{
|
||||
private :
|
||||
|
||||
CZ3DObject* m_lpLeftTireObject ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpRightTireObject ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpBodyObject ;
|
||||
FLOAT m_fBodyAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8>
|
||||
float m_fVelocity ;
|
||||
|
||||
RYLCreature* m_lpSiegeModel;
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
CRYLEaseOutDivideInterpolation m_EaseOutDivideInterpolation ;
|
||||
|
||||
FLOAT m_fTireSpeed ;
|
||||
LONG m_lRealTireRotateUpdate ; // Update Time
|
||||
FLOAT m_fRealTireAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lTireRotateUpdate ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> Update time
|
||||
FLOAT m_fTireAngle ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lFlowLine ;
|
||||
D3DXVECTOR3 m_v3BombPos[ 100 ] ;
|
||||
SDiffuseVertex m_DiffuseVertex[ 100 ] ;
|
||||
LPDIRECT3DVERTEXBUFFER8 m_pVertexBuffer ;
|
||||
CEffScript *test_script ;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
long m_lTireUpdate ;
|
||||
long m_lVelocityUpdate ;
|
||||
long m_lTireAngleUpdate ;
|
||||
long m_lBodyAngleUpdate ;
|
||||
long m_lRealAngleUpdate ;
|
||||
|
||||
public :
|
||||
|
||||
CRYLLongAttackWeaponControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLLongAttackWeaponControl() ;
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
void Render( LPDIRECT3DDEVICE8 pd3dDevice ) ;
|
||||
|
||||
VOID SetModifySkileton() ;
|
||||
VOID SetSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection ) ;
|
||||
|
||||
HRESULT CreateBombLine( vector3& v3Start, vector3& v3Dest) ;
|
||||
double CalcBi_n( INT n, INT i, DOUBLE u ) ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpSiegeModel ; }
|
||||
void SetCreature( RYLCreature* pCreature ) { m_lpSiegeModel = pCreature ; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
} ;
|
||||
|
||||
#endif //__RYL_LONGATTACKWEAPONCONTROLL_H__
|
||||
1267
Client/CharacterActionControl/RYLLongDefenceWeaponControl.cpp
Normal file
1267
Client/CharacterActionControl/RYLLongDefenceWeaponControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
65
Client/CharacterActionControl/RYLLongDefenceWeaponControl.h
Normal file
65
Client/CharacterActionControl/RYLLongDefenceWeaponControl.h
Normal file
@@ -0,0 +1,65 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLLongDefenceWeaponControl.h
|
||||
// Desc : <20><><EFBFBD>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_LONGDEFENCEWEAPONCONTROL_H__
|
||||
#define __RYL_LONGDEFENCEWEAPONCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
#include "RYLLongAttackWeaponControl.h"
|
||||
|
||||
class CRYLLongDefenceWeaponControl
|
||||
{
|
||||
private :
|
||||
|
||||
CRYLEaseOutDivideInterpolation m_EaseOutDivideInterpolation ;
|
||||
CZ3DObject* m_lpWingObject ;
|
||||
CZ3DObject* m_lpLeftTireObject ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpRightTireObject ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
FLOAT m_fTireSpeed ;
|
||||
LONG m_lRealTireRotateUpdate ; // Update Time
|
||||
FLOAT m_fRealTireAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lTireRotateUpdate ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> Update time
|
||||
FLOAT m_fTireAngle ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
RYLCreature* m_lpSiegeModel ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD>
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
CRYLLongDefenceWeaponControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLLongDefenceWeaponControl() ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpSiegeModel ; }
|
||||
void SetCreature( RYLCreature* pCreature ) { m_lpSiegeModel = pCreature ; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
|
||||
VOID SetModifySkileton() ;
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
|
||||
VOID SetSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection ) ;
|
||||
} ;
|
||||
|
||||
#endif //__RYL_LONGDEFENCEWEAPONCONTROL_H__
|
||||
2296
Client/CharacterActionControl/RYLObjectControl.cpp
Normal file
2296
Client/CharacterActionControl/RYLObjectControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
298
Client/CharacterActionControl/RYLObjectControl.h
Normal file
298
Client/CharacterActionControl/RYLObjectControl.h
Normal file
@@ -0,0 +1,298 @@
|
||||
// CharacterControl.h: interface for the CCharacterControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_)
|
||||
#define AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define TARGET_SELF 10001
|
||||
#define TARGET_SELECTCHAR 10000
|
||||
|
||||
#include "Z3DGeneralChrModel.h"
|
||||
#include "SceneManager.h"
|
||||
#include "RYLCreatureCommon.h"
|
||||
#include "RYLCreatureManager.h"
|
||||
#include "RYLCharacterDataManager.h"
|
||||
|
||||
#include "CreatureSize.h"
|
||||
#include "CameraControl.h"
|
||||
#include "..\\Effect\\CEffscript.h"
|
||||
#include <Skill/Spell/SpellKind.h>
|
||||
|
||||
|
||||
//===============================================================================
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
class CRYLCharacterControl ;
|
||||
class CRYLShortAttackWeaponControl ;
|
||||
class CRYLLongAttackWeaponControl ;
|
||||
class CRYLShortDefenceWeaponControl ;
|
||||
class CRYLLongDefenceWeaponControl ;
|
||||
class CRYLDropshipControl ;
|
||||
|
||||
#define ATTACKABLE_RANGE 150.0f
|
||||
#define TARGETNEAR_RANGE 100.0f
|
||||
#define PLAYERTARGETNEAR_RANGE 1000.0f
|
||||
|
||||
enum CONTROL_KIND
|
||||
{
|
||||
CHARACTER_CONTROL = 0, // ij<><C4B3><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
LONG_ATTACKWEAPON_CONTROL = 1, // <20><><EFBFBD>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
SHORT_ATTACKWEAPON_CONTROL = 2, // <20>ٰŸ<D9B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
LONG_DEFENCEWEAPON_CONTROL = 3, // <20><><EFBFBD>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
SHORT_DEFENCEWEAPON_CONTROL = 4, // <20>ٰŸ<D9B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
DROPSHIP_CONTROL = 5, // <20><><EFBFBD>ۼ<EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
} ;
|
||||
|
||||
extern int MAXCHRLOAD;
|
||||
|
||||
unsigned char KeyPressed(unsigned char key);
|
||||
bool CylinderOBBIntersection( vector3 vecPos, vector3 vecDir, float fArcAngle,vector3 vecMax, vector3 vecMin, float fRad );
|
||||
|
||||
class CCharacterControl
|
||||
{
|
||||
public :
|
||||
class CAttackedNode
|
||||
{
|
||||
public :
|
||||
DWORD m_dwSrcChrID ;
|
||||
DWORD m_dwTarChrID ;
|
||||
DWORD m_dwWeaponType ;
|
||||
};
|
||||
|
||||
class ChrCashNode
|
||||
{
|
||||
public :
|
||||
CZ3DGeneralChrModel* m_lpChrModel ;
|
||||
CHAR m_strGCMDSName[ MAX_PATH ] ;
|
||||
INT m_nUsedChrID;
|
||||
};
|
||||
|
||||
BOOL m_bSkillExecuted ; // <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
DWORD m_dwStartSkillTick ; // <20><>ų <20>ߵ<EFBFBD>( <20><><EFBFBD><EFBFBD> ) Tick
|
||||
DWORD m_dwCastingSkillTick ; // <20><>ų <20>ɽ<EFBFBD><C9BD><EFBFBD> Tick
|
||||
DWORD m_dwCastingSkillGrade ; // <20><>ų <20><EFBFBD><D7B7>̵<EFBFBD>
|
||||
|
||||
// ------------------------------------------------
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ( <20><><EFBFBD><EFBFBD><EFBFBD>丵 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> )
|
||||
|
||||
vector3 m_vecPrePosition ; // <20>ڽ<EFBFBD><DABD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ(NPC <20>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
BOOL m_bAttackable ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
DWORD m_dwMaxCombo ; // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><> <20><EFBFBD><DEBA><EFBFBD>
|
||||
|
||||
// ------------------------------------------------
|
||||
// <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
BOOL m_bSummon ; // <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD>
|
||||
BOOL m_bSummonCmd ; // <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD>
|
||||
unsigned char m_cSummonCmd ; // <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŀ<>ǵ<EFBFBD>
|
||||
|
||||
CEffScript* m_lpDuelReady ; // Duel <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD> Ready Effect
|
||||
BOOL m_bComboSuccess ; // <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
map< unsigned long, unsigned char > m_lstPreDuelTargetID ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Fight<68><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>ִٰ<D6B4>, (ID, VSType)
|
||||
map< unsigned long, unsigned char > m_lstDuelTargetID ; // Fight<68><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PreDuelTargetID<49><44> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. (ID, VSType)
|
||||
|
||||
DWORD m_dwRunFactorTimer ; // Run Ÿ<><C5B8>. m_dwRunFactorTimer = CFrameTimer::Regist(200.0f);
|
||||
DWORD m_dwNormalTargetMonsterID ; // Target<65><74> MONSTER ID
|
||||
DWORD m_dwNormalTargetID ; // Target<65><74> PC ID
|
||||
DWORD m_dwSpecialTargetID ; // SpecialTarget ID
|
||||
BOOL m_bAttackResult ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
BOOL m_bAutoFollowMode ; // AutoFollowMode <20><><EFBFBD><EFBFBD>
|
||||
DWORD m_dwAutoFollowChrID ; // <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
float m_fRunSpeed ; // Run Speed
|
||||
float m_fWalkSpeed ; // Walk Speed
|
||||
float m_fSkillLength ; // Skill Length
|
||||
float m_fCameraSpeed ; // Camera Speed
|
||||
|
||||
BOOL m_bFreelook ; // /Neo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Freelook <20><><EFBFBD><EFBFBD>
|
||||
vector3 m_vecCameraPos ; // ī<><EFBFBD> <20><>ġ
|
||||
float m_fCameraDir ; // ī<><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
int m_nCharMovingPacketTimerID ; // UDP<44><50> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20>۽ð<DBBD>
|
||||
int m_SkillAttackValue ; // Skill <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<><C5B8> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
unsigned long m_dwSlideTick ; // <20><><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> ƽ
|
||||
int m_MouseClickMode ; // <20><><EFBFBD>콺 Ŭ<><C5AC> <20><><EFBFBD><EFBFBD>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
||||
int m_nCameraAnimation ; // ī<><EFBFBD> <20>ִϸ<D6B4><CFB8>̼<EFBFBD>
|
||||
BOOL m_bCharacterTargetNear ; // Character Target Near
|
||||
DWORD m_nSelectItem ; // <20><><EFBFBD>õ<EFBFBD> Item
|
||||
bool m_bSkillAttack ; // <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
bool m_bGoodChantEffectShow[4] ; // GooodChant Effect Show <20><><EFBFBD><EFBFBD> <09><>Ƽ, <20>Ʊ<EFBFBD>, <20>߸<EFBFBD>, <20><><EFBFBD><EFBFBD>
|
||||
bool m_bBadChantEffectShow[4] ; // BadChant Effect Show <20><><EFBFBD><EFBFBD> <09><>Ƽ, <20>Ʊ<EFBFBD>, <20>߸<EFBFBD>, <20><><EFBFBD><EFBFBD>
|
||||
|
||||
long m_lAutoRunCounter ; // AutoRun()<29><> Ȱ<><C8B0><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD> ī<><C4AB><EFBFBD><EFBFBD>
|
||||
unsigned long m_dwAutoTargetID ; // Auto Target ID
|
||||
bool m_bAutoTargetAttack ; // Auto Target <20><><EFBFBD><EFBFBD>
|
||||
|
||||
vector3 m_vecClickPos ; // click pos
|
||||
bool m_bClickMove ; // Ŭ<><C5AC> <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool m_bClickAttack ; // Ŭ<><C5AC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
DWORD m_dwClickModeAttackTargetID ; // <20><><EFBFBD>콺<EFBFBD><ECBDBA><EFBFBD>忡<EFBFBD><E5BFA1> <20><><EFBFBD><EFBFBD> Ÿ<><C5B8> ID
|
||||
std::vector<CAttackedNode> m_AttackedList ; // <20><><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
||||
|
||||
bool m_bClientUsed ; // Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CCameraControl m_Camera ; // ī<><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
CCreatureSize m_CreatureSize ; // ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CTexture* m_SimpleHumanTexture[ 4 ] ;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
CCharacterControl();
|
||||
virtual ~CCharacterControl();
|
||||
|
||||
// ------------------------------------------------
|
||||
// DuelTarget
|
||||
|
||||
void SetPreDuelTarget( unsigned long dwDuelTargetID, unsigned char cVSType ) ;
|
||||
void SetDuelTarget( void ) ;
|
||||
void DeleteDuelTarget( unsigned long dwDuelTargetID ) ;
|
||||
void InitDuelTarget( void ) ;
|
||||
unsigned char GetIsDuelTarget( unsigned long dwChrID ) ;
|
||||
|
||||
|
||||
char* GetCreatureName( unsigned long dwChrID ) ;
|
||||
void InitGlobalAction( void ) ;
|
||||
BOOL GetAttacking( void ) ;
|
||||
BOOL CheckMonsterForward( void ) ;
|
||||
void MakeVisualAttackInfo() ;
|
||||
void MakeAttackInfo( DWORD dwEnemyChrID ) ;
|
||||
void PlaySound( int nMethod,vector3 vecPos ) ;
|
||||
|
||||
void PlayerProcessOperation( BOOL bKeyAble ) ;
|
||||
void SetDirectionforMouse( vector3 &vecDirection ) ;
|
||||
|
||||
void CheckCameraShakeTiming() ;
|
||||
void CheckAttackedTiming() ;
|
||||
|
||||
void RegistAttacked( DWORD dwSrcChrID,DWORD dwTarChrID, unsigned long dwWeaponType = 0 ) ;
|
||||
void MakeAttacked( DWORD dwChrID, unsigned long dwWeaponType ) ;
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
vector3* GetFindChrPos( unsigned long dwChrID ) ;
|
||||
void MouseModeChange() ;
|
||||
void SetCameraToCharDir() ;
|
||||
|
||||
////////////// Network Bind Function ///////////////
|
||||
static vector3 ( *GetMonsterMinBox ) ( unsigned long dwChrID ) ;
|
||||
static vector3 ( *GetMonsterMaxBox ) ( unsigned long dwChrID ) ;
|
||||
static bool ( *IsExistToList ) ( unsigned short List_In, DWORD CharID_In ) ;
|
||||
static bool ( *CharAddressRequireInfo ) ( DWORD SenderID_In, DWORD CharID_In ) ;
|
||||
static BOOL ( *SendMovingPacket ) ( unsigned long dwUpperAni, unsigned long dwLowerAni, float fDir, vector3 &vecMove ) ;
|
||||
static BOOL ( *SendCharRespawn ) ( unsigned long dwChrID ) ;
|
||||
static BOOL ( *SendMoveUpdatePacket ) ( float fDir, vector3 &vecPosition ) ;
|
||||
static BOOL ( *SendCharAttack ) ( vector3 &vecPos, float fDir, unsigned short wType, bool bCasting,
|
||||
unsigned char cSkillLock, unsigned char cSkillLevel,
|
||||
unsigned char cAtCount, unsigned short wDefenserNum,
|
||||
unsigned long dwDefenser[ 10 ],
|
||||
bool bMissileAttack, vector3 &vecDstPos ) ;
|
||||
static bool ( *PickItem ) ( DWORD nItemID ) ;
|
||||
static BOOL ( *CheckAttackable ) ( void ) ;
|
||||
static BOOL ( *SendSummonAttack ) ( unsigned long dwTargetID ) ;
|
||||
static void ( *SetChangeWeapon ) ( BOOL bChangeWeapon ) ;
|
||||
static void ( *SetAutoRun ) ( BOOL bAutoRun ) ;
|
||||
static BOOL ( *GetAutoRun ) ( void ) ;
|
||||
static char* ( *GetMotionSheet ) ( char *strWeaponName, char *strShieldName, unsigned short wClass ) ;
|
||||
static unsigned long ( *GetWeaponType ) ( char *strWeaponName ) ;
|
||||
static void ( *CheckTargetLength ) ( unsigned long &dwTargetID ) ;
|
||||
static void ( *CheckTargetforSkill ) ( unsigned long &dwTargetID, BOOL bCheckLength ) ;
|
||||
static BOOL ( *CheckSkillStart ) ( BOOL bDown ) ;
|
||||
static BOOL ( *CheckStillCasting ) ( unsigned long &dwFunction ) ;
|
||||
static void ( *ChangeWeapon ) ( void ) ;
|
||||
static void ( *SetKillCounter ) ( long lKillCounter ) ;
|
||||
static void ( *SetClientExitCounter ) ( long lExitCounter ) ;
|
||||
static void ( *SetLogoutCounter ) ( long lLogoutCounter ) ;
|
||||
static void ( *SetPortalCounter ) ( long lPortalCounter ) ;
|
||||
static void ( *SetSkillUseCounter ) ( long lSkillUseCounter ) ;
|
||||
static unsigned long ( *GetClientIdentity ) ( unsigned long dwChrID ) ;
|
||||
static unsigned long ( *GetClientEnemyType ) ( unsigned long dwChrID) ;
|
||||
static unsigned short ( *GetEnchantLevel ) ( unsigned long lID );
|
||||
static unsigned long ( *GetEnchantTime ) ( unsigned long lID );
|
||||
static unsigned short ( *GetSkillIDbyChantID ) ( unsigned char cChant );
|
||||
static void ( *UpdateCamp ) ( RYLCreature* pCreature );
|
||||
|
||||
void WrapSendCharAttack( vector3 &vecPos, float fDir, unsigned short wAtType, bool bCasting,
|
||||
unsigned char cSkillLock, unsigned char cSkillLevel, unsigned char cAtCount,
|
||||
unsigned short wDefenserNum, unsigned long lpAtNode[ 10 ],
|
||||
bool bMissileAttack = false, vector3 &vecDstPos = vector3( 0.0f, 0.0f, 0.0f ) ) ;
|
||||
void WrapSendMoveUpdatePacket( float fDir,vector3 vecPos ) ;
|
||||
BOOL WrapSendCharRespawn( DWORD dwChrID ) ;
|
||||
void WrapSendMovingPacket( DWORD dwUpperAction,DWORD dwLowerAction,float fDir,vector3 vecPos ) ;
|
||||
|
||||
unsigned long GetClientSummon( unsigned long dwChrID, BOOL bNation = FALSE, BOOL bForSkill = FALSE ) ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void UpdateMonster( RYLCreature* pCreature, float fUpdateTime );
|
||||
void UpdatePlayer( RYLCreature* pCreature, float fUpdateTime );
|
||||
void UpdateMonster( unsigned long cChr, float fUpdateTime ) ;
|
||||
void UpdatePlayer( unsigned long cChr, float fUpdateTime ) ;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
BOOL GetIsExistChar( unsigned long dwChrID ) ;
|
||||
void AddActionData( unsigned long dwChrID, unsigned long dwUpperAni,
|
||||
unsigned long dwLowerAni, float fDirection,
|
||||
vector3 &vecNextPosition, float fVec = 0.0f,
|
||||
unsigned short wAniNum = 0, unsigned long dwFrame = 0 ) ;
|
||||
void Create( void ) ;
|
||||
void DeleteAllCharacter( void ) ;
|
||||
|
||||
void SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
void MakeShake( int nChrID ) ;
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
void MouseMove( int MouseX, int MouseY ) ;
|
||||
unsigned long GetScreenPosChr( POINT &Point, int nMode = 0, float fLength = 0 ) ;
|
||||
|
||||
void SelfCharacterUpdate() ;
|
||||
|
||||
public :
|
||||
|
||||
// ------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CRYLCharacterControl* m_pRYLCharacterControl ;
|
||||
CRYLShortAttackWeaponControl* m_pRYLShortAttackWeaponControl ;
|
||||
CRYLLongAttackWeaponControl* m_pRYLLongAttackWeaponControl ;
|
||||
CRYLShortDefenceWeaponControl* m_pRYLShortDefenceWeaponControl ;
|
||||
CRYLLongDefenceWeaponControl* m_pRYLLongDefenceWeaponControl ;
|
||||
CRYLDropshipControl* m_pRYLDropshipControl ;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>
|
||||
CONTROL_KIND m_WeaponControlKind ;
|
||||
|
||||
VOID SetWeaponControlKind( CONTROL_KIND Control ) ;
|
||||
CONTROL_KIND GetWeaponControlKind() { return m_WeaponControlKind ; }
|
||||
VOID ChangeSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection, const char* szType ) ;
|
||||
VOID UpdateCreatureControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
|
||||
void Update( float fUpdateTime ) ;
|
||||
void Render( LPDIRECT3DDEVICE8 pd3dDevice ) ;
|
||||
|
||||
void SwapElement( RYLCreature* pNode1, RYLCreature* pNode2 ) ;
|
||||
|
||||
HRESULT SwitchModel( unsigned long dwCID,
|
||||
unsigned short wObjectType,
|
||||
unsigned char cState,
|
||||
unsigned char cUpgradeType,
|
||||
unsigned char cUpgradeStep ) ;
|
||||
|
||||
VOID SetNationToCastleNPC( unsigned long dwCastleID, unsigned char cNation ) ;
|
||||
VOID CharRespawn() ;
|
||||
} ;
|
||||
|
||||
#endif // !defined(AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_)
|
||||
1601
Client/CharacterActionControl/RYLShortAttackWeaponControl.cpp
Normal file
1601
Client/CharacterActionControl/RYLShortAttackWeaponControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
83
Client/CharacterActionControl/RYLShortAttackWeaponControl.h
Normal file
83
Client/CharacterActionControl/RYLShortAttackWeaponControl.h
Normal file
@@ -0,0 +1,83 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLShortAttackWeaponControl.h
|
||||
// Desc : <20>ٰŸ<D9B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_SHORTATTACKWEAPONCONTROL_H__
|
||||
#define __RYL_SHORTATTACKWEAPONCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
#include "RYLLongAttackWeaponControl.h"
|
||||
|
||||
class CCreture ;
|
||||
|
||||
class CRYLShortAttackWeaponControl
|
||||
{
|
||||
private :
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
CZ3DObject* m_lpLeftTireObject ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpRightTireObject ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpTailTireObject ; // <20><> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpBodyObject ; // <20><> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
RYLCreature* m_lpSiegeModel; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_byVelocity[ 228 ] ;
|
||||
unsigned int m_iVelocityControl ;
|
||||
CRYLEaseOutDivideInterpolation m_EaseOutDivideInterpolation ;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
FLOAT m_fTireSpeed ;
|
||||
LONG m_lRealTireRotateUpdate ; // Update Time
|
||||
FLOAT m_fRealTireAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lTireRotateUpdate ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> Update time
|
||||
FLOAT m_fTireAngle ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
FLOAT m_fBodyAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8>
|
||||
float m_fVelocity ;
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
long m_lTireUpdate ;
|
||||
long m_lVelocityUpdate ;
|
||||
long m_lTireAngleUpdate ;
|
||||
long m_lBodyAngleUpdate ;
|
||||
long m_lRealAngleUpdate ;
|
||||
|
||||
public :
|
||||
|
||||
CRYLShortAttackWeaponControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLShortAttackWeaponControl() ;
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
|
||||
VOID SetModifySkileton() ;
|
||||
VOID SetSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection ) ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpSiegeModel ; }
|
||||
void SetCreature( RYLCreature* pCreature ) { m_lpSiegeModel = pCreature ; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
} ;
|
||||
|
||||
#endif //__RYL_SHORTATTACKWEAPONCONTROL_H__
|
||||
1284
Client/CharacterActionControl/RYLShortDefenceWeaponControl.cpp
Normal file
1284
Client/CharacterActionControl/RYLShortDefenceWeaponControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
66
Client/CharacterActionControl/RYLShortDefenceWeaponControl.h
Normal file
66
Client/CharacterActionControl/RYLShortDefenceWeaponControl.h
Normal file
@@ -0,0 +1,66 @@
|
||||
//================================================================
|
||||
//
|
||||
// Name : RYLShortDefenceWeaponControl.h
|
||||
// Desc : <20>ٰŸ<D9B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
// Date : 2004. 05. 17
|
||||
//
|
||||
//================================================================
|
||||
#ifndef __RYL_SHORTDEFENCEWEAPONCONTROL_H__
|
||||
#define __RYL_SHORTDEFENCEWEAPONCONTROL_H__
|
||||
|
||||
#include "RYLObjectControl.h"
|
||||
#include "RYLLongAttackWeaponControl.h"
|
||||
|
||||
class CRYLShortDefenceWeaponControl
|
||||
{
|
||||
private :
|
||||
|
||||
CRYLEaseOutDivideInterpolation m_EaseOutDivideInterpolation ;
|
||||
CZ3DObject* m_lpWingObject ;
|
||||
CZ3DObject* m_lpLeftTireObject ; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CZ3DObject* m_lpRightTireObject ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
FLOAT m_fTireSpeed ;
|
||||
LONG m_lRealTireRotateUpdate ; // Update Time
|
||||
FLOAT m_fRealTireAngle ; // <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
LONG m_lTireRotateUpdate ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> Update time
|
||||
FLOAT m_fTireAngle ; // <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>̾<EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CCharacterControl* m_lpObjControl ;
|
||||
RYLCreature* m_lpSiegeModel ; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD>
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode m_pCharacterDataNode ;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
CRYLShortDefenceWeaponControl( CCharacterControl* lpObjControl ) ;
|
||||
~CRYLShortDefenceWeaponControl() ;
|
||||
|
||||
VOID SetModifySkileton() ;
|
||||
|
||||
RYLCreature* GetCreature() { return m_lpSiegeModel ; }
|
||||
void SetCreature( RYLCreature* pCreature ) { m_lpSiegeModel = pCreature ; }
|
||||
|
||||
CCharacterLightShadowManager::CCharacterDataNode* GetCharacterDataNode() { return &m_pCharacterDataNode ; }
|
||||
void SetCharacterDataNode( CCharacterLightShadowManager::CCharacterDataNode pCharacterDataNode )
|
||||
{
|
||||
m_pCharacterDataNode = pCharacterDataNode ;
|
||||
}
|
||||
|
||||
HRESULT UpdateControl( BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX = 0,int MouseY = 0 ) ;
|
||||
VOID SetCamera( int dx = 0, int dy = 0, int dz = 0 ) ;
|
||||
|
||||
bool MakeAttackInfo( unsigned short wSkill = 0, unsigned char cSkillLock = 0,
|
||||
unsigned char cSkillLevel = 0, unsigned char cAtCount = 1,
|
||||
float fAttackAngle = 0.0f, float fAttackRate = 0.0f,
|
||||
BOOL bAngle = TRUE, BOOL bGod = TRUE ) ;
|
||||
|
||||
bool MakeSkillAttackInfo( unsigned long dwTargetID, unsigned short wSkill = 0,
|
||||
unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0,
|
||||
unsigned char cAtCount = 1, BOOL bGod = TRUE, BOOL bDead = FALSE ) ;
|
||||
|
||||
VOID SetSiegeModel( unsigned long dwChrID, const char *strName, vector3 vecChrPos, float fDirection ) ;
|
||||
} ;
|
||||
|
||||
#endif //__RYL_SHORTDEFENCEWEAPONCONTROL_H__
|
||||
21
Client/CharacterActionControl/ReadMe.txt
Normal file
21
Client/CharacterActionControl/ReadMe.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
========================================================================
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF> : CharacterActionControl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
========================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><> CharacterActionControl <20><><EFBFBD>̺귯<CCBA><EAB7AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
CharacterActionControl.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++<2B><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><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><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> "TODO:" <20>ּ<EFBFBD><D6BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
61
Client/DummyClient/ChangeNameDlg.cpp
Normal file
61
Client/DummyClient/ChangeNameDlg.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
// ChangeNameDlg.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
#include "ChangeNameDlg.h"
|
||||
#include "CharacterData.h"
|
||||
#include "MainFrm.h"
|
||||
#include <Network/ClientSocket/Send/SendEtc.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
|
||||
// CChangeNameDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
IMPLEMENT_DYNAMIC(CChangeNameDlg, CDialog)
|
||||
CChangeNameDlg::CChangeNameDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CChangeNameDlg::IDD, pParent)
|
||||
, m_szOldName(_T(""))
|
||||
, m_szNewName(_T(""))
|
||||
{
|
||||
}
|
||||
|
||||
CChangeNameDlg::~CChangeNameDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CChangeNameDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Text(pDX, IDC_OLD_NAME, m_szOldName);
|
||||
DDV_MaxChars(pDX, m_szOldName, 15);
|
||||
DDX_Text(pDX, IDC_NEW_NAME, m_szNewName);
|
||||
DDV_MaxChars(pDX, m_szNewName, 15);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CChangeNameDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CChangeNameDlg <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
void CChangeNameDlg::OnOK()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
UpdateData(true);
|
||||
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
CCharacterData* lpCharacterData = characterDataMgr.GetByCharName(m_szOldName);
|
||||
|
||||
if(0 != lpCharacterData)
|
||||
{
|
||||
SendPacket::CharNameChange(
|
||||
&lpCharacterData->GetClientSocket().GetHandler(ClientSocket::GameEventHandler),
|
||||
lpCharacterData->GetUID(), lpCharacterData->GetCID(), m_szNewName);
|
||||
}
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
26
Client/DummyClient/ChangeNameDlg.h
Normal file
26
Client/DummyClient/ChangeNameDlg.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CChangeNameDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
class CChangeNameDlg : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CChangeNameDlg)
|
||||
|
||||
public:
|
||||
CChangeNameDlg(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
virtual ~CChangeNameDlg();
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
enum { IDD = IDD_CHANGE_NAME };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
CString m_szOldName;
|
||||
CString m_szNewName;
|
||||
protected:
|
||||
virtual void OnOK();
|
||||
};
|
||||
276
Client/DummyClient/CharacterData.cpp
Normal file
276
Client/DummyClient/CharacterData.cpp
Normal file
@@ -0,0 +1,276 @@
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "DummyClient.h"
|
||||
#include "DummyAuthHandler.h"
|
||||
#include "CharacterData.h"
|
||||
#include "LoginDlg.h"
|
||||
|
||||
#include <Network/ClientNetwork/SessionMgr.h>
|
||||
#include <Network/ClientNetwork/TCPSession.h>
|
||||
#include <Network/ClientNetwork/UDPSession.h>
|
||||
#include <Network/ClientSocket/Send/SendEtc.h>
|
||||
#include <Utility/Math/Math.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
|
||||
CCharacterData::CCharacterData()
|
||||
{
|
||||
memset(m_szAccount, 0, sizeof(char) * MAX_ACCOUNT_LEN);
|
||||
memset(m_szPassword, 0, sizeof(char) * MAX_PASSWORD_LEN);
|
||||
memset(m_szCharName, 0, sizeof(char) * CHAR_INFOST::MAX_NAME_LEN);
|
||||
|
||||
m_dwCheckSum = 0;
|
||||
m_dwClientVersion = 0;
|
||||
|
||||
m_dwUID = 0;
|
||||
m_dwCID = 0;
|
||||
m_dwSessionID = 0;
|
||||
m_dwServerID = 0;
|
||||
|
||||
m_cAgentServerType = 0;
|
||||
m_cFirstLogin = 0;
|
||||
}
|
||||
|
||||
CCharacterData::~CCharacterData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CCharacterData::Login(const char* szAuthServerIP, const char* szAccount, const char* szPassword,
|
||||
unsigned long dwCheckSum, unsigned long dwClientVersion)
|
||||
|
||||
{
|
||||
if(!m_ClientSocket.IsConnected(ClientSocket::AuthEventHandler))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>õ<EFBFBD>
|
||||
m_dwCheckSum = dwCheckSum;
|
||||
m_dwClientVersion = dwClientVersion;
|
||||
|
||||
strncpy(m_szAccount, szAccount, MAX_ACCOUNT_LEN);
|
||||
m_szAccount[MAX_ACCOUNT_LEN - 1] = 0;
|
||||
|
||||
strncpy(m_szPassword, szPassword, MAX_PASSWORD_LEN);
|
||||
m_szPassword[MAX_PASSWORD_LEN - 1] = 0;
|
||||
|
||||
return m_ClientSocket.Open(szAuthServerIP, ClientSocket::DEFAULT_AUTH_TCP_PORT, new CDummyAuthHandler(*this));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCharacterData::Login(CWnd* lpParentWnd)
|
||||
{
|
||||
if(!m_ClientSocket.IsConnected(ClientSocket::AuthEventHandler))
|
||||
{
|
||||
CLoginDlg loginDlg(lpParentWnd);
|
||||
|
||||
if(IDOK == loginDlg.DoModal())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>õ<EFBFBD>
|
||||
m_dwCheckSum = loginDlg.GetCheckSum();
|
||||
m_dwClientVersion = loginDlg.GetClientVersion();
|
||||
|
||||
strncpy(m_szAccount, loginDlg.GetAccount(), MAX_ACCOUNT_LEN);
|
||||
m_szAccount[MAX_ACCOUNT_LEN - 1] = 0;
|
||||
|
||||
strncpy(m_szPassword, loginDlg.GetPassword(), MAX_PASSWORD_LEN);
|
||||
m_szPassword[MAX_PASSWORD_LEN - 1] = 0;
|
||||
|
||||
return m_ClientSocket.Open(loginDlg.GetAuthServerIP(),
|
||||
ClientSocket::DEFAULT_AUTH_TCP_PORT, new CDummyAuthHandler(*this));
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CCharacterData::SetCharView(CHAR_VIEW* lpCharView, unsigned int nViewNum)
|
||||
{
|
||||
if(0 != lpCharView)
|
||||
{
|
||||
// WORK_LIST 3.2 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 5<><35><EFBFBD><EFBFBD> <20>ø<EFBFBD><C3B8><EFBFBD>
|
||||
memcpy(m_charView, lpCharView, sizeof(CHAR_VIEW) * min(nViewNum, MAX_CHAR_VIEW));
|
||||
}
|
||||
}
|
||||
|
||||
// WORK_LIST 3.1 RcaeBase <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>
|
||||
void CCharacterData::SetCharGuildData(sGuildData* lpGuildData, unsigned int nNum)
|
||||
{
|
||||
if(0 != lpGuildData)
|
||||
{
|
||||
memcpy(m_charGuildData, lpGuildData, sizeof(sGuildData) * min(nNum, MAX_CHAR_VIEW));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CCharacterDataMgr::CCharacterDataMgr()
|
||||
{
|
||||
m_CharDataVector.reserve(100);
|
||||
}
|
||||
|
||||
CCharacterDataMgr::~CCharacterDataMgr()
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
delete (*pos);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
bool CCharacterDataMgr::AddByAccount(CCharacterData* lpCharacterData)
|
||||
{
|
||||
if(0 != lpCharacterData && 0 == GetByAccount(lpCharacterData->GetAccount()))
|
||||
{
|
||||
m_CharDataVector.push_back(lpCharacterData);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* CCharacterDataMgr::GetByAccount(const char* szAccount)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(0 == strcmp(szAccount, lpCharacterData->GetAccount()))
|
||||
{
|
||||
return *pos;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// UID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* CCharacterDataMgr::GetByUID(unsigned long dwUID)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(dwUID == lpCharacterData->GetUID())
|
||||
{
|
||||
return lpCharacterData;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCharacterData* CCharacterDataMgr::GetByCharName(const char* szCharName)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(0 == strcmp(lpCharacterData->GetCharacterName(), szCharName))
|
||||
{
|
||||
return lpCharacterData;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* CCharacterDataMgr::GetByCID(unsigned long dwCID)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(dwCID == lpCharacterData->GetCID())
|
||||
{
|
||||
return lpCharacterData;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CCharacterDataMgr::RemoveByAccount(const char* szAccount)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(0 == strcmp(szAccount, lpCharacterData->GetAccount()))
|
||||
{
|
||||
m_CharDataVector.erase(pos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCharacterDataMgr::RemoveByUID(unsigned long dwUID)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(dwUID == lpCharacterData->GetUID())
|
||||
{
|
||||
m_CharDataVector.erase(pos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCharacterDataMgr::RemoveByCID(unsigned long dwCID)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
CCharacterData* lpCharacterData = (*pos);
|
||||
|
||||
if(dwCID == lpCharacterData->GetCID())
|
||||
{
|
||||
m_CharDataVector.erase(pos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CCharacterDataMgr::HandleEvents(unsigned long dwProcessPerCall)
|
||||
{
|
||||
CharDataVector::iterator pos = m_CharDataVector.begin();
|
||||
CharDataVector::iterator end = m_CharDataVector.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
(*pos)->GetClientSocket().HandleEvents(dwProcessPerCall);
|
||||
}
|
||||
}
|
||||
139
Client/DummyClient/CharacterData.h
Normal file
139
Client/DummyClient/CharacterData.h
Normal file
@@ -0,0 +1,139 @@
|
||||
#ifndef _RYL_DUMMYCLIENT_CHARACTER_DATA_H_
|
||||
#define _RYL_DUMMYCLIENT_CHARACTER_DATA_H_
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <DB/DBdefine.h>
|
||||
#include <Network/ClientSocket/ClientSocket.h>
|
||||
|
||||
namespace ClientNet
|
||||
{
|
||||
class CSessionMgr;
|
||||
}
|
||||
|
||||
class CDummyClientSocket : public ClientSocket
|
||||
{
|
||||
public:
|
||||
|
||||
CDummyClientSocket() { }
|
||||
virtual ~CDummyClientSocket() { }
|
||||
};
|
||||
|
||||
class CCharacterData
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_ACCOUNT_LEN = 16,
|
||||
MAX_PASSWORD_LEN = 33,
|
||||
|
||||
MAX_CHAR_VIEW = 5 // WORK_LIST 3.2 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 5<><35><EFBFBD><EFBFBD> <20>ø<EFBFBD><C3B8><EFBFBD>
|
||||
};
|
||||
|
||||
enum SessionType
|
||||
{
|
||||
AUTH_SESSION = 0,
|
||||
GAME_SESSION = 1,
|
||||
CHAT_SESSION = 2,
|
||||
UDP_SESSION = 3,
|
||||
MAX_SESSION = 4
|
||||
};
|
||||
|
||||
CCharacterData();
|
||||
~CCharacterData();
|
||||
|
||||
bool Login(const char* szAuthServerIP, const char* szAccount, const char* szPassword,
|
||||
unsigned long dwCheckSum, unsigned long dwClientVersion);
|
||||
|
||||
bool Login(CWnd* lpParentWnd);
|
||||
|
||||
ClientSocket& GetClientSocket() { return m_ClientSocket; }
|
||||
|
||||
char* GetAccount() { return m_szAccount; }
|
||||
char* GetPassword() { return m_szPassword; }
|
||||
|
||||
unsigned long GetCheckSum() const { return m_dwCheckSum; }
|
||||
unsigned long GetClientVersion() const { return m_dwClientVersion; }
|
||||
|
||||
unsigned long GetUID() const { return m_dwUID; }
|
||||
unsigned long GetCID() const { return m_dwCID; }
|
||||
unsigned long GetSessionID() const { return m_dwSessionID; }
|
||||
unsigned long GetServerID() const { return m_dwServerID; }
|
||||
const char* GetCharacterName() const { return m_szCharName; }
|
||||
|
||||
void SetUID(unsigned long dwUID) { m_dwUID = dwUID; }
|
||||
void SetCID(unsigned long dwCID) { m_dwCID = dwCID; } // SendPacket::CharSelect<63><74><EFBFBD><EFBFBD>, CID<49><44><EFBFBD><EFBFBD> <20>ʿ<EFBFBD>.
|
||||
void SetCharView(CHAR_VIEW* lpCharView, unsigned int nViewNum);
|
||||
// WORK_LIST 3.1 RcaeBase <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>
|
||||
void SetCharGuildData(sGuildData* lpGuildData, unsigned int nNum);
|
||||
void SetSessionID(unsigned long dwSessionID) { m_dwSessionID = dwSessionID; }
|
||||
void SetServerID(unsigned long dwServerID) { m_dwServerID = dwServerID; }
|
||||
void SetCharacterName(const char* szCharName)
|
||||
{
|
||||
strncpy(m_szCharName, szCharName, CHAR_INFOST::MAX_NAME_LEN);
|
||||
m_szCharName[CHAR_INFOST::MAX_NAME_LEN - 1] = 0;
|
||||
}
|
||||
|
||||
unsigned char GetAgentServerType() const { return m_cAgentServerType; }
|
||||
unsigned char GetFirstLogin() const { return m_cFirstLogin; }
|
||||
|
||||
void SetUnifiedLoginInfo(unsigned char cAgentServerType, unsigned char cFirstLogin)
|
||||
{
|
||||
m_cAgentServerType = cAgentServerType;
|
||||
m_cFirstLogin = cFirstLogin;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
char m_szAccount[MAX_ACCOUNT_LEN];
|
||||
char m_szPassword[MAX_PASSWORD_LEN];
|
||||
char m_szCharName[CHAR_INFOST::MAX_NAME_LEN];
|
||||
|
||||
unsigned long m_dwCheckSum;
|
||||
unsigned long m_dwClientVersion;
|
||||
|
||||
unsigned long m_dwUID;
|
||||
unsigned long m_dwCID;
|
||||
unsigned long m_dwSessionID;
|
||||
unsigned long m_dwServerID;
|
||||
|
||||
|
||||
|
||||
// WORK_LIST 3.1 RcaeBase <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>
|
||||
// WORK_LIST 3.2 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 5<><35><EFBFBD><EFBFBD> <20>ø<EFBFBD><C3B8><EFBFBD>
|
||||
CHAR_VIEW m_charView[MAX_CHAR_VIEW];
|
||||
sGuildData m_charGuildData[MAX_CHAR_VIEW];
|
||||
CDummyClientSocket m_ClientSocket;
|
||||
|
||||
unsigned char m_cAgentServerType;
|
||||
unsigned char m_cFirstLogin;
|
||||
};
|
||||
|
||||
|
||||
class CCharacterDataMgr
|
||||
{
|
||||
public:
|
||||
|
||||
CCharacterDataMgr();
|
||||
~CCharacterDataMgr();
|
||||
|
||||
bool AddByAccount(CCharacterData* lpCharacterData); // <20>߰<EFBFBD>
|
||||
CCharacterData* GetByAccount(const char* szAccount); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* GetByCharName(const char* szCharName); // ij<><C4B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* GetByUID(unsigned long dwUID); // UID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCharacterData* GetByCID(unsigned long dwCID); // <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
bool RemoveByAccount(const char* szAccount);
|
||||
bool RemoveByUID(unsigned long dwUID);
|
||||
bool RemoveByCID(unsigned long dwCID);
|
||||
|
||||
void HandleEvents(unsigned long dwProcessPerCall);
|
||||
|
||||
private:
|
||||
|
||||
typedef std::vector<CCharacterData*> CharDataVector;
|
||||
CharDataVector m_CharDataVector;
|
||||
};
|
||||
|
||||
#endif
|
||||
191
Client/DummyClient/CharacterSelectDlg.cpp
Normal file
191
Client/DummyClient/CharacterSelectDlg.cpp
Normal file
@@ -0,0 +1,191 @@
|
||||
// CharacterSelectDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
#include "CharacterSelectDlg.h"
|
||||
#include ".\characterselectdlg.h"
|
||||
|
||||
#include "MainFrm.h"
|
||||
#include "GuildManager.h"
|
||||
|
||||
#include "CharacterData.h"
|
||||
#include <Network/ClientSocket/Send/SendAuthServer.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
// CCharacterSelectDlg dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CCharacterSelectDlg, CDialog)
|
||||
CCharacterSelectDlg::CCharacterSelectDlg(CCharacterData& characterData, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CCharacterSelectDlg::IDD, pParent), m_CharacterData(characterData)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CCharacterSelectDlg::~CCharacterSelectDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_CTRL_CHARSELECT, m_ctrlCharacterSelect);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CCharacterSelectDlg, CDialog)
|
||||
ON_WM_NCDESTROY()
|
||||
ON_NOTIFY(NM_DBLCLK, IDC_CTRL_CHARSELECT, OnNMDblclkCtrlCharselect)
|
||||
ON_BN_CLICKED(IDOK, OnBnClickedOk)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CCharacterSelectDlg message handlers
|
||||
|
||||
BOOL CCharacterSelectDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
m_ctrlCharacterSelect.SetExtendedStyle( LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES );
|
||||
|
||||
m_ctrlCharacterSelect.InsertColumn( 0, _T( "<EFBFBD≯<EFBFBD>" ), LVCFMT_CENTER, 80 ) ;
|
||||
m_ctrlCharacterSelect.InsertColumn( 1, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 60 ) ;
|
||||
m_ctrlCharacterSelect.InsertColumn( 2, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 80 ) ;
|
||||
m_ctrlCharacterSelect.InsertColumn( 3, _T( "Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 80 ) ;
|
||||
m_ctrlCharacterSelect.InsertColumn( 4, _T( "UID"), LVCFMT_CENTER, 80);
|
||||
m_ctrlCharacterSelect.InsertColumn( 5, _T( "CID"), LVCFMT_CENTER, 80);
|
||||
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::InsertData(LPCTSTR lpszName,
|
||||
unsigned long dwUID, unsigned long dwCID,
|
||||
char cLevel, unsigned long dwFame, unsigned short wClass )
|
||||
{
|
||||
if(0 != dwUID && 0 != dwCID)
|
||||
{
|
||||
int iCnt = m_ctrlCharacterSelect.GetItemCount();
|
||||
CString str ;
|
||||
|
||||
m_ctrlCharacterSelect.InsertItem( iCnt, lpszName ) ;
|
||||
str.Format( "%d", cLevel ) ;
|
||||
m_ctrlCharacterSelect.SetItemText( iCnt, 1, str ) ;
|
||||
str.Format( "%d", dwFame ) ;
|
||||
m_ctrlCharacterSelect.SetItemText( iCnt, 2, str ) ;
|
||||
m_ctrlCharacterSelect.SetItemText( iCnt, 3, CGuildManager::GetClassName( wClass ) ) ;
|
||||
|
||||
str.Format( "%d", dwUID ) ;
|
||||
m_ctrlCharacterSelect.SetItemText( iCnt, 4, str) ;
|
||||
|
||||
str.Format( "%d", dwCID ) ;
|
||||
m_ctrlCharacterSelect.SetItemText( iCnt, 5, str) ;
|
||||
}
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::ClearData()
|
||||
{
|
||||
m_ctrlCharacterSelect.DeleteAllItems();
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::OnNcDestroy()
|
||||
{
|
||||
CDialog::OnNcDestroy();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
delete this;
|
||||
}
|
||||
|
||||
CCharacterSelectDlg* CCharacterSelectDlg::CreateSelectDlg(CCharacterData& characterData)
|
||||
{
|
||||
#include "GMUndefNew.h"
|
||||
CCharacterSelectDlg* lpCharSelectDlg =
|
||||
new CCharacterSelectDlg(characterData);
|
||||
#include "GMRedefNew.h"
|
||||
|
||||
if(0 != lpCharSelectDlg)
|
||||
{
|
||||
lpCharSelectDlg->Create(
|
||||
IDD_DLG_CHARSELECT, AfxGetMainWnd());
|
||||
}
|
||||
|
||||
return lpCharSelectDlg;
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::MoveToCenter()
|
||||
{
|
||||
CRect rcDlg, rcMain;
|
||||
|
||||
GetClientRect(&rcDlg);
|
||||
AfxGetMainWnd()->GetClientRect(&rcMain);
|
||||
|
||||
int x = ( rcMain.Width() - rcDlg.Width() ) / 2 ;
|
||||
int y = ( rcMain.Height() - rcDlg.Height() ) / 2 ;
|
||||
MoveWindow( x, y, rcDlg.Width(), rcDlg.Height() + 20 ) ;
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::OnNMDblclkCtrlCharselect(NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
*pResult = 0;
|
||||
|
||||
// <20><><EFBFBD>̾<EFBFBD><CCBE>α<CEB1> <20>ݰ<EFBFBD>, CharSelect<63><74> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
|
||||
if(NM_DBLCLK == pNMHDR->code)
|
||||
{
|
||||
POSITION pos = m_ctrlCharacterSelect.GetFirstSelectedItemPosition();
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
while (pos)
|
||||
{
|
||||
int nItem = m_ctrlCharacterSelect.GetNextSelectedItem(pos);
|
||||
|
||||
CString szUID = m_ctrlCharacterSelect.GetItemText(nItem, 4);
|
||||
CString szCID = m_ctrlCharacterSelect.GetItemText(nItem, 5);
|
||||
|
||||
unsigned long dwUID = atol(szUID.GetBuffer(0));
|
||||
unsigned long dwCID = atol(szCID.GetBuffer(0));
|
||||
|
||||
m_CharacterData.SetCID(dwCID);
|
||||
|
||||
SendPacket::CharSelect(
|
||||
&m_CharacterData.GetClientSocket().GetHandler(ClientSocket::AuthEventHandler), dwUID, dwCID);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OnOK();
|
||||
}
|
||||
}
|
||||
|
||||
void CCharacterSelectDlg::OnBnClickedOk()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
POSITION pos = m_ctrlCharacterSelect.GetFirstSelectedItemPosition();
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
while (pos)
|
||||
{
|
||||
int nItem = m_ctrlCharacterSelect.GetNextSelectedItem(pos);
|
||||
|
||||
CString szUID = m_ctrlCharacterSelect.GetItemText(nItem, 4);
|
||||
CString szCID = m_ctrlCharacterSelect.GetItemText(nItem, 5);
|
||||
|
||||
unsigned long dwUID = atol(szUID.GetBuffer(0));
|
||||
unsigned long dwCID = atol(szCID.GetBuffer(0));
|
||||
|
||||
m_CharacterData.SetCID(dwCID);
|
||||
|
||||
SendPacket::CharSelect(
|
||||
&m_CharacterData.GetClientSocket().GetHandler(ClientSocket::AuthEventHandler),
|
||||
dwUID, dwCID);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OnOK();
|
||||
}
|
||||
48
Client/DummyClient/CharacterSelectDlg.h
Normal file
48
Client/DummyClient/CharacterSelectDlg.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
#include "afxcmn.h"
|
||||
|
||||
|
||||
// CCharacterSelectDlg dialog
|
||||
|
||||
// forward decl.
|
||||
class CCharacterData;
|
||||
|
||||
class CCharacterSelectDlg : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CCharacterSelectDlg)
|
||||
|
||||
public:
|
||||
|
||||
static CCharacterSelectDlg* CreateSelectDlg(CCharacterData& characterData);
|
||||
|
||||
void InsertData(LPCTSTR lpszName,
|
||||
unsigned long dwUID, unsigned long dwCID,
|
||||
char cLevel, unsigned long dwFame, unsigned short wClass);
|
||||
|
||||
void ClearData();
|
||||
void MoveToCenter();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_DLG_CHARSELECT };
|
||||
|
||||
protected:
|
||||
|
||||
CCharacterSelectDlg(CCharacterData& characterData, CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CCharacterSelectDlg();
|
||||
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
// <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
virtual BOOL OnInitDialog();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
|
||||
CListCtrl m_ctrlCharacterSelect;
|
||||
CCharacterData& m_CharacterData;
|
||||
|
||||
afx_msg void OnNcDestroy();
|
||||
public:
|
||||
afx_msg void OnNMDblclkCtrlCharselect(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnBnClickedOk();
|
||||
};
|
||||
485
Client/DummyClient/DummyAuthHandler.cpp
Normal file
485
Client/DummyClient/DummyAuthHandler.cpp
Normal file
@@ -0,0 +1,485 @@
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "MainFrm.h"
|
||||
#include "CharacterSelectDlg.h"
|
||||
#include "LoginDlg.h"
|
||||
#include "DummyAuthHandler.h"
|
||||
#include "DummyGameHandler.h"
|
||||
#include "CharacterData.h"
|
||||
#include "UnifiedCharSelect.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <Network/ClientSocket/Send/SendAuthServer.h>
|
||||
#include <Network/ClientSocket/Send/SendLoginOut.h>
|
||||
#include <Network/ClientSocket/Parse/ParseAuthServer.h>
|
||||
#include <Network/ClientSocket/Parse/ParseLoginOut.h>
|
||||
|
||||
#include <Network/Packet/PacketBase.h>
|
||||
#include <Network/Packet/PacketCommand.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
bool ParseAuthAccount(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseUserLogin(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseCharSelect(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseCharCreate(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseCharDelete(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseAuthServerZone(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
|
||||
bool ParseUnifiedCharInfo(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseUnifiedCharSelectAck(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
|
||||
|
||||
|
||||
CDummyAuthHandler::CDummyAuthHandler(CCharacterData& characterData)
|
||||
: m_CharacterData(characterData)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
CDummyAuthHandler::~CDummyAuthHandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CDummyAuthHandler::OnOpen(int iErrorCode)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB> <20>Ѵ<EFBFBD>.
|
||||
if(0 != iErrorCode ||
|
||||
!SendPacket::AuthAccount(m_CharacterData.GetClientSocket(), m_CharacterData.GetAccount(),
|
||||
m_CharacterData.GetPassword(), m_CharacterData.GetClientVersion(), m_CharacterData.GetCheckSum(), 0))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_CharacterData.GetClientSocket().SetHandler(this, ClientSocket::AuthEventHandler);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDummyAuthHandler::OnClose()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
m_CharacterData.GetClientSocket().ResetHandler(this, ClientSocket::AuthEventHandler);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDummyAuthHandler::OnDispatch(PktBase* lpPktBase, INET_Addr& peerAddr)
|
||||
{
|
||||
bool rc = true;
|
||||
|
||||
switch(lpPktBase->GetCmd())
|
||||
{
|
||||
case CmdAuthAccount: rc = ParseAuthAccount(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdUserLogin: rc = ParseUserLogin(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdServerZone: rc = ParseAuthServerZone(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdCharSelect: rc = ParseCharSelect(this, lpPktBase, m_CharacterData); break;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD> ó<><C3B3> <20><> <20><>.
|
||||
case CmdCharCreate: rc = ParseCharCreate(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdCharDelete: rc = ParseCharDelete(this, lpPktBase, m_CharacterData); break;
|
||||
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
case CmdUnifiedCharInfo: rc = ParseUnifiedCharInfo(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdUnifiedCharSelect: rc = ParseUnifiedCharSelectAck(this, lpPktBase, m_CharacterData); break;
|
||||
}
|
||||
|
||||
if(!rc)
|
||||
{
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ParseAuthAccount(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
unsigned long dwUID = 0;
|
||||
unsigned char cAgentServerType = 0;
|
||||
unsigned char cFirstLogin = 0;
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleAuthAccount(lpPktBase, dwUID, cAgentServerType, cFirstLogin);
|
||||
|
||||
if(0 == dwError)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD>ID<49><44><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> UserLogin<69><6E><EFBFBD><EFBFBD>
|
||||
characterData.SetUID(dwUID);
|
||||
|
||||
// cAgentServerType, cFirstLogin <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ҵ<EFBFBD>,
|
||||
// <20><><EFBFBD>߿<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
characterData.SetUnifiedLoginInfo(cAgentServerType, cFirstLogin);
|
||||
|
||||
if (UnifiedConst::Part2 == cAgentServerType)
|
||||
{
|
||||
SendPacket::UserLogin(lpHandler, dwUID, FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
const char* szErrorString = "<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>";
|
||||
|
||||
switch (dwError)
|
||||
{
|
||||
case 3: szErrorString = "üũ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 4: szErrorString = "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ"; break;
|
||||
case 5: szErrorString = "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F>н<EFBFBD>"; break;
|
||||
case 6: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 7: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ο<EFBFBD> <20>ʰ<EFBFBD>"; break;
|
||||
case 8: szErrorString = "<EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 10: szErrorString = "<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
|
||||
case 11: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʰų<CAB0> <20><>ȣ<EFBFBD><C8A3> Ʋ<><C6B2>"; break;
|
||||
case 12: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD>"; break;
|
||||
case 13: szErrorString = "<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ƴϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||
case 14: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 15: szErrorString = "15<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> / <20><>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 12<31><32> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||
|
||||
case 20: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʰų<CAB0> <20><>ȣ<EFBFBD><C8A3> Ʋ<><C6B2>"; break;
|
||||
case 21: szErrorString = "UID <20><> <20>̻<EFBFBD>"; break;
|
||||
case 22: szErrorString = "<EFBFBD>̼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><>"; break;
|
||||
case 23: szErrorString = "<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 24: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ ī<><C4AB> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD>"; break;
|
||||
case 25: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>ų<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||
case 26: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 27: szErrorString = "<EFBFBD><EFBFBD>ȿ <20>Ⱓ <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 28: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 29: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ⱓ<EFBFBD><E2B0A3> <20><><EFBFBD>۵<EFBFBD><DBB5><EFBFBD> <20>ʾ<EFBFBD><CABE><EFBFBD>"; break;
|
||||
case 30: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ⱓ <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 31: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 40: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 41: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 42: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ŵ"; break;
|
||||
}
|
||||
|
||||
// AuthAccount : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEBD><EFBFBD> <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD>̾<EFBFBD><CCBE>α<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD>!
|
||||
std::string szErrMessage = "AuthAccount : ";
|
||||
szErrMessage += szErrorString;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseUserLogin(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
unsigned long UserID = 0, dwSessionID = 0, dwTabFlag = 0;
|
||||
unsigned short wAdminLevel = 0;
|
||||
unsigned char cBillingType = 0, cBillingUser = 0, cLoginType = 0;
|
||||
|
||||
int nPlayTime = 0;
|
||||
time_t ttCurrentTime = 0;
|
||||
|
||||
// WORK_LIST 3.2 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 5<><35><EFBFBD><EFBFBD> <20>ø<EFBFBD><C3B8><EFBFBD>
|
||||
// WORK_LIST 3.1 RcaeBase <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>
|
||||
// WORK_LIST 2.1 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
CHAR_VIEW aryCharView[CCharacterData::MAX_CHAR_VIEW];
|
||||
sGuildData aryCharGuildData[CCharacterData::MAX_CHAR_VIEW];
|
||||
unsigned char cAccountNation = 0;
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleUserLogin(lpPktBase, &dwSessionID,
|
||||
&UserID, aryCharView, aryCharGuildData, &cAccountNation, &ttCurrentTime, &nPlayTime, &wAdminLevel,
|
||||
&cBillingType, &cBillingUser, &cLoginType, &dwTabFlag);
|
||||
|
||||
if(0 == dwError)
|
||||
{
|
||||
// <20><><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD>̳<EFBFBD>, ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
// <20>˰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
characterData.SetCharView(aryCharView, CCharacterData::MAX_CHAR_VIEW);
|
||||
// WORK_LIST 3.1 RcaeBase <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>
|
||||
characterData.SetCharGuildData(aryCharGuildData, CCharacterData::MAX_CHAR_VIEW);
|
||||
characterData.SetSessionID(dwSessionID);
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
// (<28><><EFBFBD><EFBFBD> <20><><EFBFBD>ﶧ<EFBFBD><EFB6A7> PostMessage<67><65><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ѷ<EFBFBD><D1B7><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
||||
// <20><><EFBFBD><EFBFBD> LoginDlg<6C><67> <20><><EFBFBD><EFBFBD> ContinueModal<61><6C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> <20>ؼ<EFBFBD> theApp.OnIdle<6C><65> ȣ<><C8A3><EFBFBD>ǰ<EFBFBD> <20>ؾ<EFBFBD> <20>Ѵ<EFBFBD>.)
|
||||
|
||||
// â<><C3A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NCDestory<72><79><EFBFBD><EFBFBD> Delete<74>ϹǷ<CFB9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
// (<28>ٸ<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, NCDestory<72>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL<4C><4C> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20>ʿ<EFBFBD><CABF>ϴ<EFBFBD>).
|
||||
CCharacterSelectDlg* lpCharSelectDlg =
|
||||
CCharacterSelectDlg::CreateSelectDlg(characterData);
|
||||
|
||||
if(0 != lpCharSelectDlg)
|
||||
{
|
||||
lpCharSelectDlg->MoveToCenter();
|
||||
|
||||
for(int nCount = 0; nCount < CCharacterData::MAX_CHAR_VIEW; ++nCount)
|
||||
{
|
||||
CHAR_VIEW& charView = aryCharView[nCount];
|
||||
|
||||
lpCharSelectDlg->InsertData(charView.Name,
|
||||
characterData.GetUID(), charView.CID,
|
||||
charView.Level, charView.Fame, charView.Class);
|
||||
}
|
||||
|
||||
lpCharSelectDlg->ShowWindow(SW_SHOW);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* szErrorString = "<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>";
|
||||
|
||||
switch(dwError)
|
||||
{
|
||||
case 1: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>"; break;
|
||||
case 2: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>µ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."; break;
|
||||
case 3: szErrorString = "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>Դϴ<D4B4>. Ȩ<><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> <20><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>ֽʽÿ<CABD>."; break;
|
||||
case 4: szErrorString = "<EFBFBD>̹<EFBFBD> <20>α<EFBFBD><CEB1>ε<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>."; break;
|
||||
case 5: szErrorString = "<EFBFBD>αƿ<EFBFBD> <20><><EFBFBD>Դϴ<D4B4>. <20><><EFBFBD><EFBFBD> <20><> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>."; break;
|
||||
}
|
||||
|
||||
std::string szErrMessage = "UserLogin : ";
|
||||
szErrMessage += szErrorString;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseAuthServerZone(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
unsigned long dwServerID = 0;
|
||||
ClientSocket& clientSocket = characterData.GetClientSocket();
|
||||
|
||||
// <20><> <20>ȿ<EFBFBD><C8BF><EFBFBD> ClientSocket::MoveZoneAddr<64><72> <20>ּҸ<D6BC> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
unsigned long dwError = ParsePacket::HandleServerZone(lpPktBase, clientSocket, &dwServerID);
|
||||
|
||||
if (0 == dwError)
|
||||
{
|
||||
characterData.SetServerID(dwServerID);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݴ´<DDB4>.
|
||||
clientSocket.Disconnect(ClientSocket::AuthEventHandler);
|
||||
|
||||
// ClientSocket::MoveZoneAddr<64><72><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ּҰ<D6BC> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD>.
|
||||
ClientNet::CClientEventHandler* lpGameHandler = new CDummyGameHandler(characterData);
|
||||
|
||||
clientSocket.Open(clientSocket.GetAddressString(ClientSocket::MoveZoneAddr),
|
||||
clientSocket.GetAddressPort(ClientSocket::AddressType::MoveZoneAddr), lpGameHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* szErrorString = "<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>";
|
||||
|
||||
switch (dwError)
|
||||
{
|
||||
case 2: szErrorString = "ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߸<EFBFBD> <20>Ǿ<EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>";
|
||||
case 4: szErrorString = "<EFBFBD>ο<EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD>";
|
||||
case 5: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
}
|
||||
|
||||
std::string szErrMessage = "AuthServerZone : ";
|
||||
szErrMessage += szErrorString;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ParseCharSelect(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
// ack<63>Ƽ<DEBE> serveZone<6E><65><EFBFBD><EFBFBD>.
|
||||
|
||||
const unsigned int MAX_CHANNEL = 5;
|
||||
|
||||
unsigned short aryChannel[MAX_CHANNEL] = { 0, };
|
||||
unsigned char cZone = 0;
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleCharSelect(lpPktBase, &cZone, aryChannel);
|
||||
|
||||
if (0 == dwError)
|
||||
{
|
||||
unsigned long dwChannelCount = 0;
|
||||
|
||||
for (unsigned long i = 0; i < MAX_CHANNEL; i++)
|
||||
{
|
||||
if (aryChannel[i])
|
||||
{
|
||||
dwChannelCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == dwChannelCount)
|
||||
{
|
||||
// ä<><C3A4> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20>Ѹ<EFBFBD>
|
||||
|
||||
}
|
||||
else if (1 == dwChannelCount)
|
||||
{
|
||||
// ä<><C3A4><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD>, <20><><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD>.
|
||||
for (char cChannel = 0; cChannel < MAX_CHANNEL; ++cChannel)
|
||||
{
|
||||
if (aryChannel[cChannel])
|
||||
{
|
||||
SendPacket::ServerZone(lpHandler,
|
||||
static_cast<char>(cZone), cChannel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* szErrorString = "<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>";
|
||||
switch (dwError)
|
||||
{
|
||||
case 1: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 2: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȭ"; break;
|
||||
case 3: szErrorString = "ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 4: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ã<><C3A3> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 5: szErrorString = "ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
}
|
||||
|
||||
std::string szErrMessage = "CharSelect : ";
|
||||
szErrMessage += szErrorString;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ParseCharCreate(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
// ack<63>Ƽ<DEBE> view<65><77> <20>߰<EFBFBD><DFB0><EFBFBD>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseCharDelete(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
// ack<63>Ƽ<DEBE> view<65><77><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseUnifiedCharInfo(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ƽ<DEBE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ŀ<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
USER_INFO userInfo;
|
||||
UnifiedStoreInfo* lpUnifiedStoreInfo = 0;
|
||||
UnifiedCharData* lpUnifiedCharData = 0;
|
||||
unsigned long dwStoreInfoNum = 0;
|
||||
unsigned long dwCharDataNum = 0;
|
||||
unsigned char cRestrictedPart1ToPart2Level = 0 ;
|
||||
unsigned char cRemainCharTransferCount = 0 ;
|
||||
|
||||
unsigned long dwErrorCode = ParsePacket::HandleUnifiedCharInfo( lpPktBase,
|
||||
cRestrictedPart1ToPart2Level,
|
||||
cRemainCharTransferCount,
|
||||
userInfo,
|
||||
&lpUnifiedStoreInfo,
|
||||
dwStoreInfoNum,
|
||||
&lpUnifiedCharData,
|
||||
dwCharDataNum ) ;
|
||||
if (0 == dwErrorCode)
|
||||
{
|
||||
unsigned long dwCharNum = 0;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>׳<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD>ع<EFBFBD><D8B9><EFBFBD><EFBFBD><EFBFBD>.
|
||||
for(int nCount = 0; nCount < USER_INFO::MAX_CHAR_NUM; ++nCount)
|
||||
{
|
||||
if(0 != userInfo.CharID[nCount])
|
||||
{
|
||||
++dwCharNum;
|
||||
}
|
||||
}
|
||||
|
||||
if ((0 == dwStoreInfoNum ||
|
||||
(1 == dwStoreInfoNum && lpUnifiedStoreInfo->cOldServerGroupID == characterData.GetAgentServerType()))
|
||||
&& dwCharNum == dwCharDataNum)
|
||||
{
|
||||
UnifiedCharData* lpPos = lpUnifiedCharData;
|
||||
UnifiedCharData* lpEnd = lpUnifiedCharData + dwCharDataNum;
|
||||
|
||||
for(; lpPos != lpEnd; ++lpPos)
|
||||
{
|
||||
if(!userInfo.HasCharacter(lpPos->dwNewCID))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(lpPos == lpEnd)
|
||||
{
|
||||
SendPacket::UserLogin(lpHandler, characterData.GetUID(), FALSE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CUnifiedCharSelect* lpUnifiedCharSelect =
|
||||
CUnifiedCharSelect::CreateUnifiedCharSelect(characterData);
|
||||
|
||||
if(0 != lpUnifiedCharSelect)
|
||||
{
|
||||
lpUnifiedCharSelect->SetData(userInfo,
|
||||
lpUnifiedStoreInfo, dwStoreInfoNum,
|
||||
lpUnifiedCharData, dwCharDataNum);
|
||||
|
||||
lpUnifiedCharSelect->ShowWindow(SW_SHOW);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ParseUnifiedCharSelectAck(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڵ带, <20>ƴϸ<C6B4> UserLogin<69><6E> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleUnifiedCharSelectAck(lpPktBase);
|
||||
|
||||
if (0 == dwError)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> UserLogin<69><6E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
SendPacket::UserLogin(lpHandler, characterData.GetUID(), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* szErrorString = "<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>";
|
||||
switch (dwError)
|
||||
{
|
||||
case PktUnifiedCharSelectAck::SERVER_ERROR: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case PktUnifiedCharSelectAck::PACKET_ERROR: szErrorString = "<EFBFBD><EFBFBD>Ŷ <20><><EFBFBD><EFBFBD>"; break;
|
||||
case PktUnifiedCharSelectAck::PASSWORD_FAILED: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
|
||||
case PktUnifiedCharSelectAck::WRONG_STORE_SELECTED: szErrorString = "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD>(<28><> <20><><EFBFBD><EFBFBD> <20>ƴѰ<C6B4> <20><><EFBFBD><EFBFBD>)"; break;
|
||||
case PktUnifiedCharSelectAck::WRONG_CHAR_SELECTED: szErrorString = "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><> <20><><EFBFBD><EFBFBD> <20>ƴѰ<C6B4> <20><><EFBFBD><EFBFBD>. <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>)"; break;
|
||||
|
||||
case PktUnifiedCharSelectAck::UNIFIED_STORE_READ_ERROR: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20>б<EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case PktUnifiedCharSelectAck::UNIFIED_STORE_WRITE_ERROR: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
|
||||
case PktUnifiedCharSelectAck::UNIFIED_CHAR_WRITE_ERROR: szErrorString = "ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case PktUnifiedCharSelectAck::CHAR_VIEW_RELOAD_ERROR: szErrorString = "ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ε<EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
}
|
||||
|
||||
std::string szErrMessage = "UnifiedCharSelect : ";
|
||||
szErrMessage += szErrorString;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
29
Client/DummyClient/DummyAuthHandler.h
Normal file
29
Client/DummyClient/DummyAuthHandler.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef _DUMMY_AUTH_HANDLER_H_
|
||||
#define _DUMMY_AUTH_HANDLER_H_
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Network/ClientNetwork/ClientEventHandler.h>
|
||||
|
||||
// forward delc.
|
||||
class CCharacterData;
|
||||
class CSession;
|
||||
|
||||
class CDummyAuthHandler : public ClientNet::CClientEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
CDummyAuthHandler(CCharacterData& characterData);
|
||||
~CDummyAuthHandler();
|
||||
|
||||
private:
|
||||
|
||||
int OnOpen(int iErrorCode);
|
||||
int OnClose();
|
||||
int OnDispatch(PktBase* lpPktBase, INET_Addr& peerAddr);
|
||||
|
||||
CCharacterData& m_CharacterData;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
90
Client/DummyClient/DummyClient.cpp
Normal file
90
Client/DummyClient/DummyClient.cpp
Normal file
@@ -0,0 +1,90 @@
|
||||
// DummyClient.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#include "DummyClientDoc.h"
|
||||
#include "DummyClientView.h"
|
||||
#include ".\DummyClient.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CDummyClientApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDummyClientApp, CWinApp)
|
||||
// ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ʷ<EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
|
||||
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CDummyClientApp <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CDummyClientApp::CDummyClientApp()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// InitInstance<63><65> <20><><EFBFBD><EFBFBD> <20>߿<EFBFBD><DFBF><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CDummyClientApp <20><>ü<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CDummyClientApp theApp;
|
||||
|
||||
// CDummyClientApp <20>ʱ<EFBFBD>ȭ
|
||||
|
||||
BOOL CDummyClientApp::InitInstance()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ<E4BDBA><C6AE> ComCtl32.dll <20><><EFBFBD><EFBFBD> 6 <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>־<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>, Windows XP <20><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> InitCommonControls()<29><> <20>ʿ<EFBFBD><CABF>մϴ<D5B4>.
|
||||
// InitCommonControls()<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
InitCommonControls();
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
// OLE <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD>մϴ<D5B4>.
|
||||
if (!AfxOleInit())
|
||||
{
|
||||
AfxMessageBox(IDP_OLE_INIT_FAILED);
|
||||
return FALSE;
|
||||
}
|
||||
AfxEnableControlContainer();
|
||||
// ǥ<><C7A5> <20>ʱ<EFBFBD>ȭ
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<>⸦ <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> Ư<><C6AF> <20>ʱ<EFBFBD>ȭ <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Ű<><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// TODO: <20><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ȸ<><C8B8> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
SetRegistryKey(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>"));
|
||||
LoadStdProfileSettings(4); // MRU<52><55> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> ǥ<><C7A5> INI <20><><EFBFBD><EFBFBD> <20>ɼ<EFBFBD><C9BC><EFBFBD> <20>ε<EFBFBD><CEB5>մϴ<D5B4>.
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>մϴ<D5B4>.
|
||||
CSingleDocTemplate* pDocTemplate;
|
||||
pDocTemplate = new CSingleDocTemplate(
|
||||
IDR_MAINFRAME,
|
||||
RUNTIME_CLASS(CDummyClientDoc),
|
||||
RUNTIME_CLASS(CMainFrame), // <20><> SDI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<>Դϴ<D4B4>.
|
||||
RUNTIME_CLASS(CDummyClientView));
|
||||
if (!pDocTemplate)
|
||||
return FALSE;
|
||||
AddDocTemplate(pDocTemplate);
|
||||
// ǥ<><C7A5> <20><> <20><><EFBFBD><EFBFBD>, DDE, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>м<EFBFBD><D0BC>մϴ<D5B4>.
|
||||
CCommandLineInfo cmdInfo;
|
||||
ParseCommandLine(cmdInfo);
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ٿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> /RegServer, /Register, /Unregserver <20>Ǵ<EFBFBD> /Unregister<65><72> <20><><EFBFBD>۵<EFBFBD> <20><><EFBFBD><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
if (!ProcessShellCommand(cmdInfo))
|
||||
return FALSE;
|
||||
// â <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20≯<EFBFBD> ǥ<><C7A5><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
m_pMainWnd->ShowWindow(SW_SHOW);
|
||||
m_pMainWnd->UpdateWindow();
|
||||
// <20><><EFBFBD>̻簡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> DragAcceptFiles<65><73> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
// SDI <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ProcessShellCommand <20>Ŀ<EFBFBD> <20>̷<EFBFBD><CCB7><EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
33
Client/DummyClient/DummyClient.h
Normal file
33
Client/DummyClient/DummyClient.h
Normal file
@@ -0,0 +1,33 @@
|
||||
// DummyClient.h : DummyClient <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error PCH<43><48><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#include "resource.h" // <20><> <20><>ȣ
|
||||
|
||||
|
||||
// CDummyClientApp:
|
||||
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> DummyClient.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
//
|
||||
|
||||
class CDummyClientApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
|
||||
CDummyClientApp();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
};
|
||||
|
||||
extern CDummyClientApp theApp;
|
||||
525
Client/DummyClient/DummyClient.rc
Normal file
525
Client/DummyClient/DummyClient.rc
Normal file
@@ -0,0 +1,525 @@
|
||||
// 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><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
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\DummyClient.ico"
|
||||
IDR_DummyClientTYPE ICON "res\\DummyClientDoc.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Toolbar
|
||||
//
|
||||
|
||||
IDR_MAINFRAME TOOLBAR 16, 15
|
||||
BEGIN
|
||||
BUTTON ID_FILE_NEW
|
||||
BUTTON ID_FILE_OPEN
|
||||
BUTTON ID_FILE_SAVE
|
||||
SEPARATOR
|
||||
BUTTON ID_EDIT_CUT
|
||||
BUTTON ID_EDIT_COPY
|
||||
BUTTON ID_EDIT_PASTE
|
||||
SEPARATOR
|
||||
BUTTON ID_FILE_PRINT
|
||||
BUTTON ID_APP_ABOUT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MAINFRAME MENU
|
||||
BEGIN
|
||||
POPUP "<22><><EFBFBD><EFBFBD>(&F)"
|
||||
BEGIN
|
||||
MENUITEM "<22><> <20><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD>\tCtrl+N(&N)", ID_FILE_NEW
|
||||
MENUITEM "ij<><C4B3><EFBFBD><EFBFBD> <20≯<EFBFBD> <20>ٲٱ<D9B2>", ID_CHAR_NAME_CHANGE
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>...\tCtrl+O(&O)", ID_FILE_OPEN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>\tCtrl+S(&S)", ID_FILE_SAVE
|
||||
MENUITEM "<22>ٸ<EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(&A)...", ID_FILE_SAVE_AS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22>ֱٿ<D6B1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", ID_FILE_MRU_FILE1, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&X)", ID_APP_EXIT
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD>(&E)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>\tCtrl+Z(&U)", ID_EDIT_UNDO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22>߶<DFB6>\tCtrl+X(&T)", ID_EDIT_CUT
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>\tCtrl+C(&C)", ID_EDIT_COPY
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCtrl+V(&P)", ID_EDIT_PASTE
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD>(&V)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(&T)", ID_VIEW_TOOLBAR
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD>(&S)", ID_VIEW_STATUS_BAR
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&H)"
|
||||
BEGIN
|
||||
MENUITEM "DummyClient <20><><EFBFBD><EFBFBD>(&A)...", ID_APP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDR_MAINFRAME ACCELERATORS
|
||||
BEGIN
|
||||
"N", ID_FILE_NEW, VIRTKEY, CONTROL
|
||||
"O", ID_FILE_OPEN, VIRTKEY, CONTROL
|
||||
"S", ID_FILE_SAVE, VIRTKEY, CONTROL
|
||||
"Z", ID_EDIT_UNDO, VIRTKEY, CONTROL
|
||||
"X", ID_EDIT_CUT, VIRTKEY, CONTROL
|
||||
"C", ID_EDIT_COPY, VIRTKEY, CONTROL
|
||||
"V", ID_EDIT_PASTE, VIRTKEY, CONTROL
|
||||
VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT
|
||||
VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT
|
||||
VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL
|
||||
VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT
|
||||
VK_F6, ID_NEXT_PANE, VIRTKEY
|
||||
VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "DummyClient <20><><EFBFBD><EFBFBD>"
|
||||
FONT 9, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "DummyClient Version 1.0",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,178,7,50,16,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_UNIFIED_CHAR_SELECT DIALOGEX 0, 0, 451, 246
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "UnifiedCharSelect"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,258,225,50,14
|
||||
PUSHBUTTON "<22><><EFBFBD><EFBFBD>",IDCANCEL,394,225,50,14
|
||||
CONTROL "",IDC_UNIFIED_STORE_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,213,83
|
||||
CONTROL "",IDC_UNIFIED_CHAR_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,97,213,100
|
||||
EDITTEXT IDC_UNIFIED_PASSWORD,54,203,158,14,ES_AUTOHSCROLL
|
||||
LTEXT "Password : ",IDC_STATIC,14,205,38,8
|
||||
CONTROL "",IDC_SELECTED_CHAR,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,226,97,218,100
|
||||
EDITTEXT IDC_SELECTED_STORE,298,79,146,14,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
END
|
||||
|
||||
IDD_CHANGE_NAME DIALOGEX 0, 0, 228, 46
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,171,7,50,14
|
||||
PUSHBUTTON "<22><><EFBFBD><EFBFBD>",IDCANCEL,171,25,50,14
|
||||
EDITTEXT IDC_NEW_NAME,67,25,99,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_OLD_NAME,67,7,99,14,ES_AUTOHSCROLL
|
||||
LTEXT "Old Name",IDC_STATIC,27,10,32,8
|
||||
LTEXT "New Name",IDC_STATIC,25,26,35,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041203b5"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <ȸ<><C8B8> <20≯<EFBFBD>>"
|
||||
VALUE "FileDescription", "TODO: <<3C><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "DummyClient.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <ȸ<><C8B8> <20≯<EFBFBD>>. All rights reserved."
|
||||
VALUE "OriginalFilename", "DummyClient.exe"
|
||||
VALUE "ProductName", "TODO: <<3C><>ǰ <20≯<EFBFBD>>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "<22><>ȯ", 0x412, 949
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_UNIFIED_CHAR_SELECT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 444
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 239
|
||||
END
|
||||
|
||||
IDD_CHANGE_NAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 221
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 39
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDR_MAINFRAME "DummyClient\n\nDummyClient\n\n\nDummyClient.Document\nDummyClient.Document"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
AFX_IDS_APP_TITLE "DummyClient"
|
||||
AFX_IDS_IDLEMESSAGE "<22>غ<EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_INDICATOR_EXT "EXT"
|
||||
ID_INDICATOR_CAPS "CAP"
|
||||
ID_INDICATOR_NUM "NUM"
|
||||
ID_INDICATOR_SCRL "SCRL"
|
||||
ID_INDICATOR_OVR "OVR"
|
||||
ID_INDICATOR_REC "REC"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_FILE_NEW "<22><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
ID_FILE_OPEN "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD>"
|
||||
ID_FILE_CLOSE "<22><>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݽ<EFBFBD><DDBD>ϴ<EFBFBD>.\n<>ݱ<EFBFBD>"
|
||||
ID_FILE_SAVE "<22><>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD>"
|
||||
ID_FILE_SAVE_AS "<22><>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<>ٸ<EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_APP_ABOUT "<22><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>ȣ, <20><><EFBFBD>۱<EFBFBD><DBB1><EFBFBD> ǥ<><C7A5><EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD>"
|
||||
ID_APP_EXIT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_FILE_MRU_FILE1 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE2 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE3 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE4 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE5 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE6 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE7 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE8 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE9 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE10 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE11 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE12 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE13 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE14 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE15 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
ID_FILE_MRU_FILE16 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_NEXT_PANE "<22><><EFBFBD><EFBFBD> â<><C3A2><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD> â"
|
||||
ID_PREV_PANE "<22><><EFBFBD><EFBFBD> â<><C3A2><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD> â"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_WINDOW_SPLIT "Ȱ<><C8B0> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> â<><C3A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_EDIT_CLEAR "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
ID_EDIT_CLEAR_ALL "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
ID_EDIT_COPY "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD>忡 <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD>"
|
||||
ID_EDIT_CUT "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߶<DFB6> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD>忡 <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.\n<>߶<DFB6>"
|
||||
ID_EDIT_FIND "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ؽ<EFBFBD>Ʈ<EFBFBD><C6AE> ã<><C3A3><EFBFBD>ϴ<EFBFBD>.\nã<6E><C3A3>"
|
||||
ID_EDIT_PASTE "Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>"
|
||||
ID_EDIT_REPEAT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ݺ<EFBFBD><DDBA>մϴ<D5B4>.\n<>ݺ<EFBFBD>"
|
||||
ID_EDIT_REPLACE "Ư<><C6AF> <20>ؽ<EFBFBD>Ʈ<EFBFBD><C6AE> <20>ٸ<EFBFBD> <20>ؽ<EFBFBD>Ʈ<EFBFBD><C6AE> <20>ٲߴϴ<DFB4>.\n<>ٲٱ<D9B2>"
|
||||
ID_EDIT_SELECT_ALL "<22><>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
ID_EDIT_UNDO "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>۾<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
ID_EDIT_REDO "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҵ<EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.\n<>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_VIEW_TOOLBAR "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>"
|
||||
ID_VIEW_STATUS_BAR "<22><><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
AFX_IDS_SCSIZE "â ũ<>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCMOVE "â <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCMINIMIZE "â<><C3A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCMAXIMIZE "â<><C3A2> <20><>ü ȭ<><C8AD> ũ<><C5A9><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCNEXTWINDOW "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> â<><C3A2><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCPREVWINDOW "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> â<><C3A2><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCCLOSE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD>ϰ<EFBFBD> Ȱ<><C8B0> â<><C3A2> <20>ݽ<EFBFBD><DDBD>ϴ<EFBFBD>."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
AFX_IDS_SCRESTORE "â<><C3A2> <20><><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
AFX_IDS_SCTASKLIST "<22>۾<EFBFBD> <20><><EFBFBD><EFBFBD> Ȱ<><C8B0>ȭ"
|
||||
END
|
||||
|
||||
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD><EFBFBD>(<28>̱<EFBFBD>) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DummyClient_FORM DIALOGEX 0, 0, 529, 222
|
||||
STYLE DS_SETFONT | WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 400, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Info",IDC_STATIC,7,7,201,208
|
||||
LTEXT "Method",IDC_STATIC,101,20,25,8
|
||||
COMBOBOX IDC_GUILDINFOSORT_COMBO,131,18,73,105,CBS_DROPDOWN |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "",IDC_GUILDINFO_LISTCTRL,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,14,34,189,80
|
||||
CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS | UDS_HORZ,
|
||||
161,119,39,12
|
||||
LTEXT "Name",IDC_STATIC,13,141,19,8
|
||||
LTEXT "Crest",IDC_STATIC,13,159,17,8
|
||||
LTEXT "Master",IDC_STATIC,13,181,22,8
|
||||
LTEXT "Rep",IDC_STATIC,13,195,13,8
|
||||
LTEXT "Tend.",IDC_STATIC,109,158,20,8
|
||||
LTEXT "Pol.",IDC_STATIC,109,178,13,8
|
||||
LTEXT "Lev.",IDC_STATIC,109,196,14,8
|
||||
PUSHBUTTON "Find",IDC_BTN_FIND,109,137,26,14
|
||||
PUSHBUTTON "Apply",IDC_BTN_APPLY,138,137,34,14
|
||||
PUSHBUTTON "Cancel",IDC_BTN_CREST,68,156,30,14
|
||||
PUSHBUTTON "Cancel",IDC_BTN_LEV,162,193,31,14
|
||||
EDITTEXT IDC_EDT_NAME,40,138,58,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_CREST,40,157,25,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_MASTER,40,176,58,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_REP,40,193,58,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_TEND,129,156,62,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_POL,129,176,62,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_LEV,129,193,31,14,ES_AUTOHSCROLL
|
||||
GROUPBOX "Safe",IDC_STATIC,211,7,110,108
|
||||
LTEXT "Balance",IDC_STATIC,221,24,27,8
|
||||
EDITTEXT IDC_EDT_BALANCE,253,21,64,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Withdraw",IDC_BTN_WITHDRAW,219,39,50,14
|
||||
PUSHBUTTON "Deposit",IDC_BTN_DEPOSIT,219,58,50,14
|
||||
PUSHBUTTON "Details",IDC_BTN_DETAILS,219,77,50,14
|
||||
PUSHBUTTON "Release",IDC_BTN_RELEASE,219,96,50,14
|
||||
GROUPBOX "Member",IDC_STATIC,323,7,196,208
|
||||
LTEXT "Method",IDC_STATIC,409,19,25,8
|
||||
EDITTEXT IDC_EDT_FAME,376,122,96,14,ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_GUILDMBRSORT_COMBO,438,18,75,142,CBS_DROPDOWN |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "",IDC_GUILDMBR_LISTCTRL,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,333,34,176,79
|
||||
LTEXT "Fame",IDC_STATIC,339,125,18,8
|
||||
LTEXT "By gold",IDC_STATIC,339,144,24,8
|
||||
LTEXT "Location",IDC_STATIC,339,163,28,8
|
||||
EDITTEXT IDC_EDT_GOLD,376,141,95,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_LOCATION,376,160,95,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Reflush",IDC_BTN_REFLUSH,239,154,50,14
|
||||
GROUPBOX "Menu",IDC_STATIC,211,115,109,100
|
||||
PUSHBUTTON "Create",IDC_BTN_CREATE,240,134,50,14
|
||||
END
|
||||
|
||||
IDD_DLG_LOGIN DIALOGEX 0, 0, 168, 133
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Login"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_IPADDRESS1,"SysIPAddress32",WS_TABSTOP,57,16,91,
|
||||
14
|
||||
EDITTEXT IDC_EDT_LOGIN2,57,35,91,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_LOGIN3,57,52,91,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_LOGIN,57,69,91,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDT_PASSWORD,57,87,91,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Login",IDOK,34,110,50,14
|
||||
DEFPUSHBUTTON "Exit",IDCANCEL,99,110,50,14
|
||||
LTEXT "Login",IDC_STATIC,33,73,18,8
|
||||
LTEXT "Password",IDC_STATIC,20,90,32,8
|
||||
LTEXT "Auth server IP",IDC_STATIC,9,19,48,8
|
||||
LTEXT "Checksum",IDC_STATIC,20,37,33,8
|
||||
LTEXT "ClientVersion",IDC_STATIC,10,56,42,8
|
||||
END
|
||||
|
||||
IDD_DLG_CHARSELECT DIALOGEX 0, 0, 217, 127
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Character Select"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,47,105,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,105,105,50,14
|
||||
CONTROL "",IDC_CTRL_CHARSELECT,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,203,90
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#include ""res\\DummyClient.rc2"" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>\r\n"
|
||||
"#include ""afxres.rc"" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // <20><><EFBFBD><EFBFBD>(<28>̱<EFBFBD>) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#include "res\DummyClient.rc2" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
#include "afxres.rc" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
393
Client/DummyClient/DummyClient.vcproj
Normal file
393
Client/DummyClient/DummyClient.vcproj
Normal file
@@ -0,0 +1,393 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="DummyClient"
|
||||
ProjectGUID="{68812F54-DCD1-4CE1-8259-3D79E565C67F}"
|
||||
SccProjectName="SAK"
|
||||
SccAuxPath="SAK"
|
||||
SccLocalPath="SAK"
|
||||
SccProvider="SAK"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean="*.map;*.htm;*.idb;*.dat;*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../Client/GlobalScript;../../MemoryManager"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<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"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean="*.map;*.htm;*.idb;*.dat;*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="0"
|
||||
EnableIntrinsicFunctions="FALSE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="2"
|
||||
EnableFiberSafeOptimizations="FALSE"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories="../../Client/GlobalScript;../../MemoryManager"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="FALSE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation="$(IntDir)/"
|
||||
ObjectFile="$(IntDir)/"
|
||||
ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
|
||||
BrowseInformation="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="2"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithMemory|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean="*.map;*.htm;*.idb;*.dat;*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="0"
|
||||
EnableIntrinsicFunctions="FALSE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="2"
|
||||
EnableFiberSafeOptimizations="FALSE"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories="../../Client/GlobalScript;../../MemoryManager"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;GM_USE_MEMORY"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="FALSE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation="$(IntDir)/"
|
||||
ObjectFile="$(IntDir)/"
|
||||
ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
|
||||
BrowseInformation="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="2"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Guild Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\GuildInfo.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildManager.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildManager.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildMember.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildMember.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildSafe.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuildSafe.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\res\DummyClient.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClient.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\DummyClient.rc2">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\DummyClientDoc.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\Toolbar.bmp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Dialog Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\ChangeNameDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChangeNameDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CharacterSelectDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CharacterSelectDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\UnifiedCharSelect.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\UnifiedCharSelect.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="MFC Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\DummyClient.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClient.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClientDoc.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClientDoc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClientView.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyClientView.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MainFrm.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MainFrm.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithMemory|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Network"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\CharacterData.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CharacterData.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyAuthHandler.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyAuthHandler.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyGameHandler.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyGameHandler.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\res\DummyClient.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyGuildHandler.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DummyGuildHandler.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="DummyClient.rc"/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
74
Client/DummyClient/DummyClientDoc.cpp
Normal file
74
Client/DummyClient/DummyClientDoc.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
// DummyClientDoc.cpp : CDummyClientDoc Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
|
||||
#include "DummyClientDoc.h"
|
||||
#include "CharacterData.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CDummyClientDoc
|
||||
IMPLEMENT_DYNCREATE(CDummyClientDoc, CDocument)
|
||||
|
||||
|
||||
// CDummyClientDoc <20><><EFBFBD><EFBFBD>/<2F>Ҹ<EFBFBD>
|
||||
|
||||
CDummyClientDoc::CDummyClientDoc()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȸ<EFBFBD><C8B8> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
}
|
||||
|
||||
CDummyClientDoc::~CDummyClientDoc()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CDummyClientDoc::OnNewDocument()
|
||||
{
|
||||
if (!CDocument::OnNewDocument())
|
||||
return FALSE;
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>ٽ<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// SDI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// CDummyClientDoc serialization
|
||||
|
||||
void CDummyClientDoc::Serialize(CArchive& ar)
|
||||
{
|
||||
if (ar.IsStoring())
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20>ε<EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// CDummyClientDoc <20><><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDummyClientDoc::AssertValid() const
|
||||
{
|
||||
CDocument::AssertValid();
|
||||
}
|
||||
|
||||
void CDummyClientDoc::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CDocument::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
|
||||
34
Client/DummyClient/DummyClientDoc.h
Normal file
34
Client/DummyClient/DummyClientDoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// DummyClientDoc.h : CDummyClientDoc Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
class CDummyClientDoc : public CDocument
|
||||
{
|
||||
protected: // serialization<6F><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
CDummyClientDoc();
|
||||
DECLARE_DYNCREATE(CDummyClientDoc)
|
||||
|
||||
// Ư<><C6AF>
|
||||
public:
|
||||
|
||||
// <20>۾<EFBFBD>
|
||||
public:
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual BOOL OnNewDocument();
|
||||
virtual void Serialize(CArchive& ar);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual ~CDummyClientDoc();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
206
Client/DummyClient/DummyClientView.cpp
Normal file
206
Client/DummyClient/DummyClientView.cpp
Normal file
@@ -0,0 +1,206 @@
|
||||
// DummyClientView.cpp : CDummyClientView Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
|
||||
#include "DummyClientDoc.h"
|
||||
#include "DummyClientView.h"
|
||||
#include ".\DummyClientview.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CDummyClientView
|
||||
IMPLEMENT_DYNCREATE(CDummyClientView, CFormView)
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDummyClientView, CFormView)
|
||||
ON_WM_CREATE()
|
||||
ON_BN_CLICKED(IDC_BTN_APPLY, OnBnClickedBtnApply)
|
||||
ON_BN_CLICKED(IDC_BTN_CREST, OnBnClickedBtnCrest)
|
||||
ON_BN_CLICKED(IDC_BTN_DEPOSIT, OnBnClickedBtnDeposit)
|
||||
ON_BN_CLICKED(IDC_BTN_DETAILS, OnBnClickedBtnDetails)
|
||||
ON_BN_CLICKED(IDC_BTN_FIND, OnBnClickedBtnFind)
|
||||
ON_BN_CLICKED(IDC_BTN_LEV, OnBnClickedBtnLev)
|
||||
ON_BN_CLICKED(IDC_BTN_RELEASE, OnBnClickedBtnRelease)
|
||||
ON_BN_CLICKED(IDC_BTN_WITHDRAW, OnBnClickedBtnWithdraw)
|
||||
ON_BN_CLICKED(IDC_BTN_REFLUSH, OnBnClickedBtnReflush)
|
||||
ON_BN_CLICKED(IDC_BTN_CREATE, OnBnClickedBtnCreate)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
// CDummyClientView <20><><EFBFBD><EFBFBD>/<2F>Ҹ<EFBFBD>
|
||||
|
||||
CDummyClientView::CDummyClientView()
|
||||
: CFormView(CDummyClientView::IDD)
|
||||
, m_strName(_T(""))
|
||||
, m_strCrest(_T(""))
|
||||
, m_strMaster(_T(""))
|
||||
, m_strRep(_T(""))
|
||||
, m_strTend(_T(""))
|
||||
, m_strPol(_T(""))
|
||||
, m_strLev(_T(""))
|
||||
, m_strBalance(_T(""))
|
||||
, m_strFame(_T(""))
|
||||
, m_strGold(_T(""))
|
||||
, m_strLocation(_T(""))
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
}
|
||||
|
||||
CDummyClientView::~CDummyClientView()
|
||||
{
|
||||
}
|
||||
|
||||
void CDummyClientView::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_GUILDINFOSORT_COMBO, m_cbGuildInfoMethod);
|
||||
DDX_Control(pDX, IDC_GUILDMBRSORT_COMBO, m_cbMemberSortMethod);
|
||||
DDX_Control(pDX, IDC_GUILDINFO_LISTCTRL, m_ctrlGuildInfo);
|
||||
DDX_Control(pDX, IDC_GUILDMBR_LISTCTRL, m_ctrlMemberInfo);
|
||||
DDX_Text(pDX, IDC_EDT_NAME, m_strName);
|
||||
DDX_Text(pDX, IDC_EDT_CREST, m_strCrest);
|
||||
DDX_Text(pDX, IDC_EDT_MASTER, m_strMaster);
|
||||
DDX_Text(pDX, IDC_EDT_REP, m_strRep);
|
||||
DDX_Text(pDX, IDC_EDT_TEND, m_strTend);
|
||||
DDX_Text(pDX, IDC_EDT_POL, m_strPol);
|
||||
DDX_Text(pDX, IDC_EDT_LEV, m_strLev);
|
||||
DDX_Text(pDX, IDC_EDT_BALANCE, m_strBalance);
|
||||
DDX_Text(pDX, IDC_EDT_FAME, m_strFame);
|
||||
DDX_Text(pDX, IDC_EDT_GOLD, m_strGold);
|
||||
DDX_Text(pDX, IDC_EDT_LOCATION, m_strLocation);
|
||||
}
|
||||
|
||||
BOOL CDummyClientView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
// TODO: CREATESTRUCT cs<63><73> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1>
|
||||
// Window Ŭ<><C5AC><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
return CFormView::PreCreateWindow(cs);
|
||||
}
|
||||
|
||||
void CDummyClientView::OnInitialUpdate()
|
||||
{
|
||||
CFormView::OnInitialUpdate();
|
||||
GetParentFrame()->RecalcLayout();
|
||||
ResizeParentToFit();
|
||||
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)" ) ;
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD><EFBFBD>ȣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ) ;
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ) ;
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ) ;
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ) ;
|
||||
m_cbGuildInfoMethod.AddString( "<EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" ) ;
|
||||
|
||||
m_cbMemberSortMethod.AddString("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ;
|
||||
m_cbMemberSortMethod.AddString("<EFBFBD>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ;
|
||||
m_cbMemberSortMethod.AddString("<EFBFBD>Ϲ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ;
|
||||
m_cbMemberSortMethod.AddString("Ż<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ;
|
||||
m_cbMemberSortMethod.AddString("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ;
|
||||
|
||||
m_ctrlGuildInfo.InsertColumn( 0, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 40 ) ;
|
||||
m_ctrlGuildInfo.InsertColumn( 1, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 60 ) ;
|
||||
m_ctrlGuildInfo.InsertColumn( 2, _T( "<EFBFBD><EFBFBD><EFBFBD>帶<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 80 ) ;
|
||||
m_ctrlGuildInfo.InsertColumn( 3, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 60 ) ;
|
||||
m_ctrlGuildInfo.InsertColumn( 4, _T( "<EFBFBD><EFBFBD>ũ" ), LVCFMT_CENTER, 40 ) ;
|
||||
|
||||
m_ctrlMemberInfo.InsertColumn( 0, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 40 ) ;
|
||||
m_ctrlMemberInfo.InsertColumn( 1, _T( "Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 60 ) ;
|
||||
m_ctrlMemberInfo.InsertColumn( 2, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 40 ) ;
|
||||
m_ctrlMemberInfo.InsertColumn( 3, _T( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ), LVCFMT_CENTER, 40 ) ;
|
||||
m_ctrlMemberInfo.InsertColumn( 4, _T( "<EFBFBD≯<EFBFBD>" ), LVCFMT_CENTER, 80 ) ;
|
||||
}
|
||||
|
||||
|
||||
// CDummyClientView <20><><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDummyClientView::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDummyClientView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
|
||||
CDummyClientDoc* CDummyClientView::GetDocument() const // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B5><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ζ<EFBFBD><CEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
{
|
||||
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDummyClientDoc)));
|
||||
return (CDummyClientDoc*)m_pDocument;
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
|
||||
// CDummyClientView <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
|
||||
int CDummyClientView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
if (CFormView::OnCreate(lpCreateStruct) == -1)
|
||||
return -1;
|
||||
|
||||
// TODO: Add your specialized creation code here
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CDummyClientView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
|
||||
return CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnApply()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnCrest()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnDeposit()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnDetails()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnFind()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnLev()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnRelease()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnWithdraw()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnReflush()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
|
||||
void CDummyClientView::OnBnClickedBtnCreate()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
80
Client/DummyClient/DummyClientView.h
Normal file
80
Client/DummyClient/DummyClientView.h
Normal file
@@ -0,0 +1,80 @@
|
||||
// DummyClientView.h : iCDummyClientView Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "afxwin.h"
|
||||
#include "afxcmn.h"
|
||||
|
||||
|
||||
class CDummyClientView : public CFormView
|
||||
{
|
||||
protected: // serialization<6F><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
CDummyClientView();
|
||||
DECLARE_DYNCREATE(CDummyClientView)
|
||||
|
||||
public:
|
||||
enum{ IDD = IDD_DummyClient_FORM };
|
||||
|
||||
// Ư<><C6AF>
|
||||
public:
|
||||
CDummyClientDoc* GetDocument() const;
|
||||
|
||||
// <20>۾<EFBFBD>
|
||||
public:
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
virtual void OnInitialUpdate(); // <20><><EFBFBD><EFBFBD> <20><> ó<><C3B3> ȣ<><C8A3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual ~CDummyClientView();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
CComboBox m_cbGuildInfoMethod;
|
||||
CComboBox m_cbMemberSortMethod;
|
||||
CListCtrl m_ctrlGuildInfo;
|
||||
CListCtrl m_ctrlMemberInfo;
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
afx_msg void OnBnClickedBtnApply();
|
||||
afx_msg void OnBnClickedBtnCrest();
|
||||
afx_msg void OnBnClickedBtnDeposit();
|
||||
afx_msg void OnBnClickedBtnDetails();
|
||||
afx_msg void OnBnClickedBtnFind();
|
||||
afx_msg void OnBnClickedBtnLev();
|
||||
afx_msg void OnBnClickedBtnRelease();
|
||||
afx_msg void OnBnClickedBtnWithdraw();
|
||||
CString m_strName;
|
||||
CString m_strCrest;
|
||||
CString m_strMaster;
|
||||
CString m_strRep;
|
||||
CString m_strTend;
|
||||
CString m_strPol;
|
||||
CString m_strLev;
|
||||
CString m_strBalance;
|
||||
CString m_strFame;
|
||||
CString m_strGold;
|
||||
CString m_strLocation;
|
||||
afx_msg void OnBnClickedBtnReflush();
|
||||
afx_msg void OnBnClickedBtnCreate();
|
||||
};
|
||||
|
||||
#ifndef _DEBUG // DummyClientView.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
inline CDummyClientDoc* CDummyClientView::GetDocument() const
|
||||
{ return reinterpret_cast<CDummyClientDoc*>(m_pDocument); }
|
||||
#endif
|
||||
|
||||
214
Client/DummyClient/DummyGameHandler.cpp
Normal file
214
Client/DummyClient/DummyGameHandler.cpp
Normal file
@@ -0,0 +1,214 @@
|
||||
#include "stdafx.h"
|
||||
#include "DummyGameHandler.h"
|
||||
#include "CharacterData.h"
|
||||
|
||||
#include "MainFrm.h"
|
||||
|
||||
#include <Network/Packet/PacketBase.h>
|
||||
#include <Network/Packet/PacketCommand.h>
|
||||
#include <Network/Packet/PacketStruct/CharAdminPacket.h>
|
||||
#include <Network/ClientSocket/Send/SendLoginout.h>
|
||||
#include <Network/ClientSocket/Send/SendMove.h>
|
||||
#include <Network/ClientSocket/Parse/ParseLoginout.h>
|
||||
#include <Network/ClientSocket/Parse/ParseItem.h>
|
||||
#include <Network/ClientSocket/Parse/ParseMove.h>
|
||||
#include <Network/ClientSocket/Parse/ParseEtc.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
bool ParseCharLogin(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseCharDepositUpdate(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
bool ParseCharNameChange(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData);
|
||||
|
||||
|
||||
CDummyGameHandler::CDummyGameHandler(CCharacterData& characterData)
|
||||
: m_CharacterData(characterData)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
CDummyGameHandler::~CDummyGameHandler()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int CDummyGameHandler::OnOpen(int iErrorCode)
|
||||
{
|
||||
if(0 != iErrorCode ||
|
||||
!SendPacket::CharLogin(m_CharacterData.GetClientSocket(), m_CharacterData.GetUID(),
|
||||
m_CharacterData.GetCID(), m_CharacterData.GetSessionID()))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_CharacterData.GetClientSocket().SetHandler(this, ClientSocket::GameEventHandler);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDummyGameHandler::OnClose()
|
||||
{
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
m_CharacterData.GetClientSocket().ResetHandler(this, ClientSocket::GameEventHandler);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDummyGameHandler::OnDispatch(PktBase* lpPktBase, INET_Addr& peerAddr)
|
||||
{
|
||||
bool rc = true;
|
||||
|
||||
switch(lpPktBase->GetCmd())
|
||||
{
|
||||
case CmdCharLogin: rc = ParseCharLogin(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdDepositUpdate: rc = ParseCharDepositUpdate(this, lpPktBase, m_CharacterData); break;
|
||||
case CmdCharNameChange: rc = ParseCharNameChange(this, lpPktBase, m_CharacterData); break;
|
||||
}
|
||||
|
||||
if(!rc)
|
||||
{
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.RemoveByAccount(m_CharacterData.GetAccount());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool ParseCharLogin(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
CHAR_INFOST charInfoST;
|
||||
CHAR_POS charPos;
|
||||
QUICK quickSlot;
|
||||
SKILL skillSlot;
|
||||
SPELL spell;
|
||||
|
||||
|
||||
unsigned long dwServerID, dwServerTime;
|
||||
unsigned short wEquipSize, wInvenSize, wExtraSize, wExchangeSize, wTempInven;
|
||||
char *lpEquipBuffer, *lpInvenBuffer, *lpExtraBuffer, *lpExchangeBuffer, *lpTempInvenBuffer;
|
||||
bool bPeace;
|
||||
bool bCheckRelation;
|
||||
unsigned char cNameChangeCount;
|
||||
unsigned char cAdminFlag;
|
||||
unsigned char cGuildWarFlag;
|
||||
unsigned char cRealmWarFlag;
|
||||
unsigned char cRealmPoint;
|
||||
unsigned char cTacticsFlag;
|
||||
|
||||
ClientSocket& clientSocket = characterData.GetClientSocket();
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleCharLogin(lpPktBase, clientSocket,
|
||||
&bPeace, &bCheckRelation, &cNameChangeCount, &cAdminFlag,
|
||||
&cGuildWarFlag, &cRealmWarFlag, &cRealmPoint, &cTacticsFlag,
|
||||
&charInfoST, &skillSlot, &quickSlot, &spell,
|
||||
&charPos, &dwServerTime, &dwServerID,
|
||||
&wEquipSize, &lpEquipBuffer, &wInvenSize, &lpInvenBuffer,
|
||||
&wExtraSize, &lpExtraBuffer, &wExchangeSize, &lpExchangeBuffer,
|
||||
&wTempInven, &lpTempInvenBuffer);
|
||||
|
||||
if (0 == dwError)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>....
|
||||
|
||||
// ij<><C4B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>
|
||||
characterData.SetCharacterName(charInfoST.Name);
|
||||
|
||||
CCharacterDataMgr& characterDataMgr =
|
||||
static_cast<CMainFrame*>(AfxGetMainWnd())->GetCharacterDataMgr();
|
||||
|
||||
characterDataMgr.AddByAccount(&characterData);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* szErrorString = 0;
|
||||
|
||||
switch (dwError)
|
||||
{
|
||||
case 2: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"; break;
|
||||
case 4: szErrorString = "<EFBFBD>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||
case 24: szErrorString = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ ī<><C4AB> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD>"; break;
|
||||
}
|
||||
|
||||
std::string szErrorMessage = "CmdCharLogin : ";
|
||||
szErrorMessage += szErrorString;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseCharDepositUpdate(ClientNet::CClientEventHandler* lpHandler, PktBase* lpPktBase,
|
||||
CCharacterData& characterData)
|
||||
{
|
||||
unsigned long dwFlag;
|
||||
char* lpStoreBuffer;
|
||||
|
||||
unsigned short wStoreSize;
|
||||
unsigned char cTab;
|
||||
bool bComplete;
|
||||
|
||||
ClientSocket& clientSocket = characterData.GetClientSocket();
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleDepositUpdate(lpPktBase,
|
||||
&dwFlag, &cTab, &bComplete, &wStoreSize, &lpStoreBuffer);
|
||||
|
||||
if (0 == dwError)
|
||||
{
|
||||
// â<><C3A2> <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><EFBFBD><DEB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;;;
|
||||
|
||||
if (bComplete)
|
||||
{
|
||||
// <20>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>. <20>̶<EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParseCharNameChange(ClientNet::CClientEventHandler* lpHandler,
|
||||
PktBase* lpPktBase, CCharacterData& characterData)
|
||||
{
|
||||
char* szChangedName = 0;
|
||||
unsigned char cNameChangeCount = 0;
|
||||
|
||||
unsigned long dwError = ParsePacket::HandleCharNameChange(lpPktBase, szChangedName, &cNameChangeCount);
|
||||
|
||||
if(0 == dwError)
|
||||
{
|
||||
characterData.SetCharacterName(szChangedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(dwError)
|
||||
{
|
||||
case PktCharNameChange::ERR_SERVER:
|
||||
case PktCharNameChange::ERR_CANNOT_FIND_CHARACTER:
|
||||
case PktCharNameChange::ERR_NAMECHANGE_COUNT:
|
||||
case PktCharNameChange::ERR_INVALID_NAME:
|
||||
case PktCharNameChange::ERR_CANNOT_USE_NAME:
|
||||
case PktCharNameChange::ERR_ALREADY_USE_NAME:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
29
Client/DummyClient/DummyGameHandler.h
Normal file
29
Client/DummyClient/DummyGameHandler.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef _DUMMY_GAME_HANDLER_H_
|
||||
#define _DUMMY_GAME_HANDLER_H_
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Network/ClientNetwork/ClientEventHandler.h>
|
||||
|
||||
// forward delc.
|
||||
class CCharacterData;
|
||||
class CSession;
|
||||
|
||||
class CDummyGameHandler : public ClientNet::CClientEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
CDummyGameHandler(CCharacterData& characterData);
|
||||
~CDummyGameHandler();
|
||||
|
||||
private:
|
||||
|
||||
int OnOpen(int iErrorCode);
|
||||
int OnClose();
|
||||
int OnDispatch(PktBase* lpPktBase, INET_Addr& peerAddr);
|
||||
|
||||
CCharacterData& m_CharacterData;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
13
Client/DummyClient/DummyGuildHandler.cpp
Normal file
13
Client/DummyClient/DummyGuildHandler.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "StdAfx.h"
|
||||
#include ".\dummyguildhandler.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
/*
|
||||
CDummyGuildHandler::CDummyGuildHandler(void)
|
||||
{
|
||||
}
|
||||
|
||||
CDummyGuildHandler::~CDummyGuildHandler(void)
|
||||
{
|
||||
}
|
||||
*/
|
||||
19
Client/DummyClient/DummyGuildHandler.h
Normal file
19
Client/DummyClient/DummyGuildHandler.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _DUMMY_GUILD_HANDLER_
|
||||
#define _DUMMY_GUILD_HANDLER_
|
||||
/*
|
||||
#pragma once
|
||||
|
||||
#include <Network/ClientNetwork/ClientEventHandler.h>
|
||||
|
||||
// forward delc.
|
||||
class CCharacterData;
|
||||
class CSession;
|
||||
|
||||
class CDummyGuildHandler : public ClientNet::CClientEventHandler
|
||||
{
|
||||
public:
|
||||
CDummyGuildHandler( ClientNet::CSessionMgr& sessionMgr, CCharacterData& characterData ) ;
|
||||
~CDummyGuildHandler();
|
||||
};
|
||||
*/
|
||||
#endif //_DUMMY_GUILD_HANDLER
|
||||
11
Client/DummyClient/GuildInfo.cpp
Normal file
11
Client/DummyClient/GuildInfo.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "StdAfx.h"
|
||||
#include ".\guildinfo.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
CGuildInfo::CGuildInfo(void)
|
||||
{
|
||||
}
|
||||
|
||||
CGuildInfo::~CGuildInfo(void)
|
||||
{
|
||||
}
|
||||
8
Client/DummyClient/GuildInfo.h
Normal file
8
Client/DummyClient/GuildInfo.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
class CGuildInfo
|
||||
{
|
||||
public:
|
||||
CGuildInfo(void);
|
||||
~CGuildInfo(void);
|
||||
};
|
||||
62
Client/DummyClient/GuildManager.cpp
Normal file
62
Client/DummyClient/GuildManager.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#include "StdAfx.h"
|
||||
#include ".\guildmanager.h"
|
||||
#include "GuildInfo.h"
|
||||
#include "GuildSafe.h"
|
||||
#include "GuildMember.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
CString CGuildManager::m_strClass[ 25 ] ;
|
||||
|
||||
CGuildManager::CGuildManager(void)
|
||||
{
|
||||
m_strClass[ 0 ] = "None" ; // 450
|
||||
m_strClass[ 1 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 451
|
||||
m_strClass[ 2 ] = "<EFBFBD>α<EFBFBD>" ; // 452
|
||||
m_strClass[ 3 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 453
|
||||
m_strClass[ 4 ] = "<EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD>Ʈ" ; // 454
|
||||
m_strClass[ 5 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 455
|
||||
m_strClass[ 6 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 456
|
||||
m_strClass[ 7 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 457
|
||||
m_strClass[ 8 ] = "<EFBFBD><EFBFBD>ó" ; // 458
|
||||
m_strClass[ 9 ] = "<EFBFBD>Ҽ<EFBFBD><EFBFBD><EFBFBD>" ; // 459
|
||||
m_strClass[ 10 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 460
|
||||
m_strClass[ 11 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ" ; // 461
|
||||
m_strClass[ 12 ] = "Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 462
|
||||
m_strClass[ 13 ] = "" ; // 463
|
||||
m_strClass[ 14 ] = "" ; // 464
|
||||
m_strClass[ 15 ] = "" ; // 465
|
||||
m_strClass[ 16 ] = "" ; // 466
|
||||
m_strClass[ 17 ] = "<EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD>Ʈ" ; // 467
|
||||
m_strClass[ 18 ] = "<EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 468
|
||||
m_strClass[ 19 ] = "<EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD>" ; // 469
|
||||
m_strClass[ 20 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ" ; // 470
|
||||
m_strClass[ 21 ] = "<EFBFBD>ų<EFBFBD>" ; // 471
|
||||
m_strClass[ 22 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 472
|
||||
m_strClass[ 23 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 473
|
||||
m_strClass[ 24 ] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; // 474
|
||||
|
||||
}
|
||||
|
||||
CGuildManager::~CGuildManager(void)
|
||||
{
|
||||
}
|
||||
|
||||
CString CGuildManager::GetClassName( unsigned short wClass )
|
||||
{
|
||||
if (1 <= wClass && wClass <= 24)
|
||||
return m_strClass[ wClass ] ;
|
||||
else
|
||||
return m_strClass[ 0 ];
|
||||
}
|
||||
|
||||
void CGuildManager::Reflush()
|
||||
{
|
||||
}
|
||||
|
||||
void CGuildManager::UpdateGuildMessageBox()
|
||||
{
|
||||
}
|
||||
|
||||
void CGuildManager::CheckGuildStipulation()
|
||||
{
|
||||
}
|
||||
31
Client/DummyClient/GuildManager.h
Normal file
31
Client/DummyClient/GuildManager.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
class CGuildInfo ;
|
||||
class CGuildSafe ;
|
||||
class CGuildMember ;
|
||||
|
||||
class CGuildManager
|
||||
{
|
||||
public :
|
||||
//======================================
|
||||
// * <20><><EFBFBD>Ѽ<EFBFBD><D1BC><EFBFBD><EFBFBD><EFBFBD> <20><>ũ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//======================================
|
||||
CGuildInfo* m_pGuildInfo ;
|
||||
CGuildSafe* m_pGuildSafe ;
|
||||
CGuildMember* m_pGuildMember ;
|
||||
|
||||
DWORD m_dwCresteGuildResult ;
|
||||
CHAR m_szCreateGuildName[ 128 ] ;
|
||||
DWORD m_dwResCheckGuildName ;
|
||||
|
||||
static CString m_strClass[ 25 ] ;
|
||||
|
||||
public:
|
||||
CGuildManager(void);
|
||||
~CGuildManager(void);
|
||||
|
||||
void Reflush() ;
|
||||
void UpdateGuildMessageBox() ;
|
||||
void CheckGuildStipulation() ;
|
||||
static CString GetClassName( unsigned short wClass ) ;
|
||||
};
|
||||
11
Client/DummyClient/GuildMember.cpp
Normal file
11
Client/DummyClient/GuildMember.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "StdAfx.h"
|
||||
#include ".\guildmember.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
CGuildMember::CGuildMember(void)
|
||||
{
|
||||
}
|
||||
|
||||
CGuildMember::~CGuildMember(void)
|
||||
{
|
||||
}
|
||||
8
Client/DummyClient/GuildMember.h
Normal file
8
Client/DummyClient/GuildMember.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
class CGuildMember
|
||||
{
|
||||
public:
|
||||
CGuildMember(void);
|
||||
~CGuildMember(void);
|
||||
};
|
||||
11
Client/DummyClient/GuildSafe.cpp
Normal file
11
Client/DummyClient/GuildSafe.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "StdAfx.h"
|
||||
#include ".\guildsafe.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
CGuildSafe::CGuildSafe(void)
|
||||
{
|
||||
}
|
||||
|
||||
CGuildSafe::~CGuildSafe(void)
|
||||
{
|
||||
}
|
||||
8
Client/DummyClient/GuildSafe.h
Normal file
8
Client/DummyClient/GuildSafe.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
class CGuildSafe
|
||||
{
|
||||
public:
|
||||
CGuildSafe(void);
|
||||
~CGuildSafe(void);
|
||||
};
|
||||
152
Client/DummyClient/LoginDlg.cpp
Normal file
152
Client/DummyClient/LoginDlg.cpp
Normal file
@@ -0,0 +1,152 @@
|
||||
// LoginDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
#include "LoginDlg.h"
|
||||
#include ".\logindlg.h"
|
||||
#include "MainFrm.h"
|
||||
#include "CharacterSelectDlg.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
// CLoginDlg dialog
|
||||
|
||||
const char* szSetupFileName = "./DummyClient.ini";
|
||||
|
||||
IMPLEMENT_DYNAMIC(CLoginDlg, CDialog)
|
||||
CLoginDlg::CLoginDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CLoginDlg::IDD, pParent)
|
||||
, m_szAccount(_T(""))
|
||||
, m_szPassword(_T(""))
|
||||
, m_szCheckSum(_T(""))
|
||||
, m_dwClientVersion(0)
|
||||
, m_nLoopCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
CLoginDlg::~CLoginDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CLoginDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Text(pDX, IDC_EDT_LOGIN, m_szAccount);
|
||||
DDX_Text(pDX, IDC_EDT_PASSWORD, m_szPassword);
|
||||
DDX_Text(pDX, IDC_IPADDRESS1, m_AuthServerIP);
|
||||
DDX_Text(pDX, IDC_EDT_LOGIN2, m_szCheckSum);
|
||||
DDX_Text(pDX, IDC_EDT_LOGIN3, m_dwClientVersion);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CLoginDlg, CDialog)
|
||||
ON_BN_CLICKED(ID_BTN_EXIT, OnBnClickedBtnExit)
|
||||
ON_BN_CLICKED(ID_BTN_LOGIN, OnBnClickedBtnLogin)
|
||||
ON_WM_DESTROY()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CLoginDlg message handlers
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Desc : <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3>
|
||||
//----------------------------------------------------------------------
|
||||
void CLoginDlg::OnBnClickedBtnExit()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Desc : <20><><EFBFBD><EFBFBD>
|
||||
//----------------------------------------------------------------------
|
||||
void CLoginDlg::OnBnClickedBtnLogin()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
// <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ν<EFBFBD><CEBD>Ͻ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>, <20><><EFBFBD><EFBFBD> ȣ<><C8A3>
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CLoginDlg::MoveToCenter()
|
||||
{
|
||||
CRect rcDlg, rcMain;
|
||||
|
||||
GetClientRect(&rcDlg);
|
||||
AfxGetMainWnd()->GetClientRect(&rcMain);
|
||||
|
||||
int x = ( rcMain.Width() - rcDlg.Width() ) / 2 ;
|
||||
int y = ( rcMain.Height() - rcDlg.Height() ) / 2 ;
|
||||
MoveWindow( x, y, rcDlg.Width(), rcDlg.Height() + 20 ) ;
|
||||
}
|
||||
|
||||
BOOL CLoginDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD>, <20><><EFBFBD><EFBFBD>, üũ<C3BC><C5A9><EFBFBD><EFBFBD> <20>о<EFBFBD><D0BE>´<EFBFBD>.
|
||||
|
||||
m_dwClientVersion = GetPrivateProfileInt(
|
||||
"DummyLoginSetup", "ClientVersion", 0, szSetupFileName);
|
||||
|
||||
char szTemp[MAX_PATH];
|
||||
|
||||
GetPrivateProfileString("DummyLoginSetup", "CheckSum",
|
||||
"", szTemp, MAX_PATH - 1, szSetupFileName);
|
||||
|
||||
szTemp[MAX_PATH - 1] = 0;
|
||||
m_szCheckSum = szTemp;
|
||||
|
||||
GetPrivateProfileString("DummyLoginSetup", "AuthServerAddress",
|
||||
"", szTemp, MAX_PATH - 1, szSetupFileName);
|
||||
|
||||
szTemp[MAX_PATH - 1] = 0;
|
||||
m_AuthServerIP = szTemp;
|
||||
|
||||
GetPrivateProfileString("DummyLoginSetup", "Account",
|
||||
"", szTemp, MAX_PATH - 1, szSetupFileName);
|
||||
|
||||
szTemp[MAX_PATH - 1] = 0;
|
||||
m_szAccount = szTemp;
|
||||
|
||||
GetPrivateProfileString("DummyLoginSetup", "Password",
|
||||
"", szTemp, MAX_PATH - 1, szSetupFileName);
|
||||
|
||||
szTemp[MAX_PATH - 1] = 0;
|
||||
m_szPassword = szTemp;
|
||||
|
||||
MoveToCenter();
|
||||
UpdateData(FALSE);
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// <20><><EFBFBD><EFBFBD>: OCX <20>Ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
void CLoginDlg::OnDestroy()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
char szClientVersion[MAX_PATH];
|
||||
itoa(m_dwClientVersion, szClientVersion, 10);
|
||||
|
||||
WritePrivateProfileString("DummyLoginSetup", "ClientVersion", szClientVersion, szSetupFileName);
|
||||
WritePrivateProfileString("DummyLoginSetup", "CheckSum", m_szCheckSum, szSetupFileName);
|
||||
|
||||
WritePrivateProfileString("DummyLoginSetup", "AuthServerAddress",
|
||||
m_AuthServerIP.GetBuffer(0), szSetupFileName);
|
||||
|
||||
WritePrivateProfileString("DummyLoginSetup", "Account",
|
||||
m_szAccount.GetBuffer(0), szSetupFileName);
|
||||
|
||||
WritePrivateProfileString("DummyLoginSetup", "Password",
|
||||
m_szPassword.GetBuffer(0), szSetupFileName);
|
||||
|
||||
CDialog::OnDestroy();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
}
|
||||
58
Client/DummyClient/LoginDlg.h
Normal file
58
Client/DummyClient/LoginDlg.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
#include "afxcmn.h"
|
||||
|
||||
|
||||
// CLoginDlg dialog
|
||||
|
||||
class CLoginDlg : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CLoginDlg)
|
||||
|
||||
public:
|
||||
CLoginDlg(CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CLoginDlg();
|
||||
|
||||
void ClearAuthInfo() { m_szAccount = "", m_szPassword = ""; }
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_DLG_LOGIN };
|
||||
|
||||
protected:
|
||||
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
public:
|
||||
|
||||
afx_msg void OnBnClickedBtnExit();
|
||||
afx_msg void OnBnClickedBtnLogin();
|
||||
|
||||
DWORD GetCheckSum()
|
||||
{
|
||||
char* szEndPtr = 0;
|
||||
return strtoul(m_szCheckSum.GetBuffer(0), &szEndPtr, 16);
|
||||
}
|
||||
|
||||
DWORD GetClientVersion() { return m_dwClientVersion; }
|
||||
|
||||
CString GetAccount() { return m_szAccount; }
|
||||
CString GetPassword() { return m_szPassword; }
|
||||
CString GetAuthServerIP() { return m_AuthServerIP; }
|
||||
|
||||
private:
|
||||
|
||||
void MoveToCenter();
|
||||
|
||||
CString m_szAccount;
|
||||
CString m_szPassword;
|
||||
CString m_AuthServerIP;
|
||||
CString m_szCheckSum;
|
||||
DWORD m_dwClientVersion;
|
||||
|
||||
LONG m_nLoopCount;
|
||||
|
||||
public:
|
||||
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnDestroy();
|
||||
};
|
||||
203
Client/DummyClient/MainFrm.cpp
Normal file
203
Client/DummyClient/MainFrm.cpp
Normal file
@@ -0,0 +1,203 @@
|
||||
// MainFrm.cpp : CMainFrame Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
|
||||
#include "MainFrm.h"
|
||||
#include ".\mainfrm.h"
|
||||
|
||||
#include "LoginDlg.h"
|
||||
#include "CharacterSelectDlg.h"
|
||||
#include "GuildManager.h"
|
||||
#include "CharacterData.h"
|
||||
#include "ChangeNameDlg.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <Network/ClientNetwork/SessionMgr.h>
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CMainFrame
|
||||
|
||||
const int g_nTimerID_Network = 1;
|
||||
|
||||
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
|
||||
ON_WM_CREATE()
|
||||
ON_WM_SETFOCUS()
|
||||
ON_WM_SHOWWINDOW()
|
||||
ON_COMMAND(ID_FILE_NEW, OnFileNew)
|
||||
ON_WM_TIMER()
|
||||
ON_COMMAND(ID_CHAR_NAME_CHANGE, OnCharNameChange)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
static UINT indicators[] =
|
||||
{
|
||||
ID_SEPARATOR, // <20><><EFBFBD><EFBFBD> <20><> ǥ<>ñ<EFBFBD>
|
||||
ID_INDICATOR_CAPS,
|
||||
ID_INDICATOR_NUM,
|
||||
ID_INDICATOR_SCRL,
|
||||
};
|
||||
|
||||
|
||||
// CMainFrame <20><><EFBFBD><EFBFBD>/<2F>Ҹ<EFBFBD>
|
||||
|
||||
CMainFrame::CMainFrame()
|
||||
: m_lpGuildManager(0),
|
||||
m_lpCharacterDataMgr(0),
|
||||
m_dwLastPingTime(timeGetTime())
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
CMainFrame::~CMainFrame()
|
||||
{
|
||||
if ( 0 != m_lpGuildManager )
|
||||
{
|
||||
delete m_lpGuildManager ;
|
||||
m_lpGuildManager = 0 ;
|
||||
}
|
||||
|
||||
if ( 0 != m_lpCharacterDataMgr )
|
||||
{
|
||||
delete m_lpCharacterDataMgr ;
|
||||
m_lpCharacterDataMgr = 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
|
||||
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
|
||||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
|
||||
{
|
||||
TRACE0("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.\n");
|
||||
return -1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
}
|
||||
|
||||
if (!m_wndStatusBar.Create(this) ||
|
||||
!m_wndStatusBar.SetIndicators(indicators,
|
||||
sizeof(indicators)/sizeof(UINT)))
|
||||
{
|
||||
TRACE0("<22><><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.\n");
|
||||
return -1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
}
|
||||
|
||||
// TODO: <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ŷ<EFBFBD><C5B7> <20><> <20><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
|
||||
EnableDocking(CBRS_ALIGN_ANY);
|
||||
DockControlBar(&m_wndToolBar);
|
||||
*/
|
||||
|
||||
m_lpGuildManager = new CGuildManager ;
|
||||
if (0 == m_lpGuildManager)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_lpCharacterDataMgr = new CCharacterDataMgr ;
|
||||
if (0 == m_lpCharacterDataMgr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
SetTimer(g_nTimerID_Network, 100, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
if( !CFrameWnd::PreCreateWindow(cs) )
|
||||
return FALSE;
|
||||
// TODO: CREATESTRUCT cs<63><73> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1>
|
||||
// Window Ŭ<><C5AC><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// CMainFrame <20><><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CMainFrame::AssertValid() const
|
||||
{
|
||||
CFrameWnd::AssertValid();
|
||||
}
|
||||
|
||||
void CMainFrame::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFrameWnd::Dump(dc);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
|
||||
// CMainFrame <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
void CMainFrame::OnSetFocus(CWnd* pOldWnd)
|
||||
{
|
||||
//CFrameWnd::OnSetFocus(pOldWnd);
|
||||
|
||||
// TODO: Add your message handler code here
|
||||
|
||||
}
|
||||
|
||||
void CMainFrame::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
CFrameWnd::OnShowWindow(bShow, nStatus);
|
||||
|
||||
// TODO: Add your message handler code here
|
||||
}
|
||||
|
||||
void CMainFrame::OnFileNew()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
CCharacterData* lpCharacterData = new CCharacterData;
|
||||
|
||||
if(0 != lpCharacterData)
|
||||
{
|
||||
if(!lpCharacterData->Login(this) ||
|
||||
!m_lpCharacterDataMgr->AddByAccount(lpCharacterData))
|
||||
{
|
||||
delete lpCharacterData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMainFrame::OnTimer(UINT nIDEvent)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
if(nIDEvent == g_nTimerID_Network)
|
||||
{
|
||||
m_lpCharacterDataMgr->HandleEvents(100);
|
||||
}
|
||||
|
||||
CFrameWnd::OnTimer(nIDEvent);
|
||||
}
|
||||
|
||||
void CMainFrame::PostNcDestroy()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
KillTimer(g_nTimerID_Network);
|
||||
CFrameWnd::PostNcDestroy();
|
||||
}
|
||||
|
||||
void CMainFrame::OnCharNameChange()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
CChangeNameDlg nameDlg;
|
||||
nameDlg.DoModal();
|
||||
}
|
||||
70
Client/DummyClient/MainFrm.h
Normal file
70
Client/DummyClient/MainFrm.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// MainFrm.h : CMainFrame Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
class CGuildManager;
|
||||
class CCharacterDataMgr;
|
||||
|
||||
namespace ClientNet
|
||||
{
|
||||
class CSessionMgr;
|
||||
}
|
||||
|
||||
class CMainFrame : public CFrameWnd
|
||||
{
|
||||
|
||||
protected: // serialization<6F><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
CMainFrame();
|
||||
DECLARE_DYNCREATE(CMainFrame)
|
||||
|
||||
// Ư<><C6AF>
|
||||
private:
|
||||
|
||||
unsigned long m_dwLastPingTime;
|
||||
|
||||
CGuildManager* m_lpGuildManager;
|
||||
CCharacterDataMgr* m_lpCharacterDataMgr;
|
||||
|
||||
//<2F>۾<EFBFBD>
|
||||
public:
|
||||
|
||||
CGuildManager& GetGuildManager() { return *m_lpGuildManager; }
|
||||
CCharacterDataMgr& GetCharacterDataMgr() { return *m_lpCharacterDataMgr; }
|
||||
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual ~CMainFrame();
|
||||
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
protected: // <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CStatusBar m_wndStatusBar;
|
||||
CToolBar m_wndToolBar;
|
||||
|
||||
// <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
protected:
|
||||
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
public:
|
||||
afx_msg void OnSetFocus(CWnd* pOldWnd);
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnFileNew();
|
||||
afx_msg void OnTimer(UINT nIDEvent);
|
||||
protected:
|
||||
virtual void PostNcDestroy();
|
||||
public:
|
||||
afx_msg void OnCharNameChange();
|
||||
};
|
||||
|
||||
|
||||
14
Client/DummyClient/ReadMe.txt
Normal file
14
Client/DummyClient/ReadMe.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>α<CEB1> ChangeLog
|
||||
|
||||
|
||||
|
||||
2004.10.16 22:51 - by Sparrowhawk
|
||||
|
||||
<09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> -
|
||||
CCharacterData<74><61> LoginDlg<6C><67> CharacterSelectDlg<6C><67> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
<09>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>̾<EFBFBD><CCBE>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>, <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
|
||||
<09>۾<EFBFBD> <20><>Ȳ - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>. <20><><EFBFBD>̾<EFBFBD><CCBE>α<EFBFBD><CEB1>ʿ<EFBFBD><CABF><EFBFBD> ȣ<><C8A3><EFBFBD>ϴ<EFBFBD> <20>κ<EFBFBD> <20><> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD>úκ<C3BA> <20>۾<EFBFBD> <20>ʿ<EFBFBD>
|
||||
<09>ؾ<EFBFBD> <20><> <20>κ<EFBFBD> - <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20>ڵ鷯 <20>ۼ<EFBFBD>, ä<>ü<EFBFBD><C3BC><EFBFBD> <20>ڵ鷯 <20>ۼ<EFBFBD>, UDP<44>ڵ鷯 <20>ۼ<EFBFBD>.
|
||||
<09><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20><>.
|
||||
|
||||
370
Client/DummyClient/UnifiedCharSelect.cpp
Normal file
370
Client/DummyClient/UnifiedCharSelect.cpp
Normal file
@@ -0,0 +1,370 @@
|
||||
// UnifiedCharSelect.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DummyClient.h"
|
||||
#include "UnifiedCharSelect.h"
|
||||
#include "CharacterData.h"
|
||||
|
||||
#include <Network/Packet/PacketStruct/CharItemPacket.h>
|
||||
#include <Network/ClientSocket/Send/SendAuthServer.h>
|
||||
#include ".\unifiedcharselect.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
// CUnifiedCharSelect <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
IMPLEMENT_DYNAMIC(CUnifiedCharSelect, CDialog)
|
||||
CUnifiedCharSelect::CUnifiedCharSelect(CCharacterData& characterData, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CUnifiedCharSelect::IDD, pParent), m_CharacterData(characterData)
|
||||
, m_UnifiedPassword(_T(""))
|
||||
, m_SelectedStore(_T(""))
|
||||
, m_cSelectedStore(0)
|
||||
{
|
||||
memset(&m_UserInfo, 0, sizeof(USER_INFO));
|
||||
|
||||
memset(m_UnifiedStoreInfo, 0, sizeof(UnifiedStoreInfo) * PktUnifiedCharInfo::MAX_STORE_INFO);
|
||||
memset(m_UnifiedCharData, 0, sizeof(UnifiedCharData) * PktUnifiedCharInfo::MAX_CHAR_DATA);
|
||||
|
||||
m_dwUnifiedStoreInfoNum = 0;
|
||||
m_dwUnifiedCharDataNum = 0;
|
||||
}
|
||||
|
||||
CUnifiedCharSelect::~CUnifiedCharSelect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_UNIFIED_STORE_LIST, m_StoreInfoList);
|
||||
DDX_Control(pDX, IDC_UNIFIED_CHAR_LIST, m_CharDataList);
|
||||
DDX_Control(pDX, IDC_SELECTED_CHAR, m_SelectedCharList);
|
||||
DDX_Text(pDX, IDC_UNIFIED_PASSWORD, m_UnifiedPassword);
|
||||
DDX_Text(pDX, IDC_SELECTED_STORE, m_SelectedStore);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CUnifiedCharSelect, CDialog)
|
||||
ON_NOTIFY(NM_DBLCLK, IDC_UNIFIED_CHAR_LIST, OnNMDblclkUnifiedCharList)
|
||||
ON_NOTIFY(NM_DBLCLK, IDC_UNIFIED_STORE_LIST, OnNMDblclkUnifiedStoreList)
|
||||
ON_NOTIFY(NM_DBLCLK, IDC_SELECTED_CHAR, OnNMDblclkSelectedChar)
|
||||
ON_WM_NCDESTROY()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CUnifiedCharSelect <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
BOOL CUnifiedCharSelect::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
m_StoreInfoList.InsertColumn(0, "ServerGroupID", LVCFMT_LEFT, 100);
|
||||
m_StoreInfoList.InsertColumn(1, "TabNum", LVCFMT_LEFT, 60);
|
||||
m_StoreInfoList.InsertColumn(2, "Gold", LVCFMT_LEFT, 60);
|
||||
|
||||
m_CharDataList.InsertColumn(0, "CID", LVCFMT_LEFT, 80);
|
||||
m_CharDataList.InsertColumn(1, "OldServerGroupID", LVCFMT_LEFT, 40);
|
||||
m_CharDataList.InsertColumn(2, "Name", LVCFMT_LEFT, 120);
|
||||
m_CharDataList.InsertColumn(3, "Class", LVCFMT_LEFT, 60);
|
||||
m_CharDataList.InsertColumn(4, "Level", LVCFMT_LEFT, 60);
|
||||
|
||||
m_SelectedCharList.InsertColumn(0, "CID", LVCFMT_LEFT, 80);
|
||||
m_SelectedCharList.InsertColumn(1, "Name", LVCFMT_LEFT, 120);
|
||||
m_SelectedCharList.InsertColumn(2, "Class", LVCFMT_LEFT, 60);
|
||||
m_SelectedCharList.InsertColumn(3, "Level", LVCFMT_LEFT, 60);
|
||||
|
||||
m_UnifiedPassword = m_CharacterData.GetPassword();
|
||||
UpdateData(false);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// <20><><EFBFBD><EFBFBD>: OCX <20>Ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::SetData(USER_INFO& userInfo,
|
||||
UnifiedStoreInfo* lpUnifiedStoreInfo, unsigned long dwUnifiedStoreInfoNum,
|
||||
UnifiedCharData* lpUnifiedCharData, unsigned long dwUnifiedCharDataNum)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD><DFB0>ϰ<EFBFBD>, ȭ<><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
m_UserInfo = userInfo;
|
||||
|
||||
memcpy(m_UnifiedStoreInfo, lpUnifiedStoreInfo,
|
||||
sizeof(UnifiedStoreInfo) * min(dwUnifiedStoreInfoNum, unsigned long(PktUnifiedCharInfo::MAX_STORE_INFO)));
|
||||
|
||||
memcpy(m_UnifiedCharData, lpUnifiedCharData,
|
||||
sizeof(UnifiedCharData) * min(dwUnifiedCharDataNum, unsigned long(PktUnifiedCharInfo::MAX_CHAR_DATA)));
|
||||
|
||||
m_dwUnifiedStoreInfoNum = dwUnifiedStoreInfoNum;
|
||||
m_dwUnifiedCharDataNum = dwUnifiedCharDataNum;
|
||||
|
||||
const int MAX_BUFFER = 1024;
|
||||
char szTempBuffer[MAX_BUFFER];
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڽ<EFBFBD><DABD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
for(unsigned long dwCount = 0; dwCount < dwUnifiedStoreInfoNum; ++dwCount)
|
||||
{
|
||||
unsigned long dwTabFlagNum = 0;
|
||||
|
||||
if(m_UnifiedStoreInfo[dwCount].Flag & PktDepositUpdateDB::ITEM_TAB1) { ++dwTabFlagNum; }
|
||||
if(m_UnifiedStoreInfo[dwCount].Flag & PktDepositUpdateDB::ITEM_TAB2) { ++dwTabFlagNum; }
|
||||
if(m_UnifiedStoreInfo[dwCount].Flag & PktDepositUpdateDB::ITEM_TAB3) { ++dwTabFlagNum; }
|
||||
if(m_UnifiedStoreInfo[dwCount].Flag & PktDepositUpdateDB::ITEM_TAB4) { ++dwTabFlagNum; }
|
||||
|
||||
m_StoreInfoList.InsertItem(dwCount, ultoa(m_UnifiedStoreInfo[dwCount].cOldServerGroupID, szTempBuffer, 10));
|
||||
m_StoreInfoList.SetItemText(dwCount, 1, ultoa(dwTabFlagNum, szTempBuffer, 10));
|
||||
m_StoreInfoList.SetItemText(dwCount, 2, ultoa(m_UnifiedStoreInfo[dwCount].Gold, szTempBuffer, 10));
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڽ<EFBFBD><DABD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
unsigned long dwItemIndex = 0;
|
||||
unsigned long dwSelectedItemIndex = 0;
|
||||
|
||||
for(unsigned long dwCount = 0; dwCount < dwUnifiedCharDataNum; ++dwCount)
|
||||
{
|
||||
unsigned long dwViewCount = 0;
|
||||
|
||||
for(; dwViewCount < USER_INFO::MAX_CHAR_NUM; ++dwViewCount)
|
||||
{
|
||||
if (0 != m_UserInfo.CharID[dwViewCount] &&
|
||||
m_UnifiedCharData[dwCount].dwNewCID == m_UserInfo.CharID[dwViewCount])
|
||||
{
|
||||
m_SelectedCharList.InsertItem(dwSelectedItemIndex, ultoa(m_UnifiedCharData[dwCount].dwNewCID, szTempBuffer, 10));
|
||||
m_SelectedCharList.SetItemText(dwSelectedItemIndex, 1, m_UnifiedCharData[dwCount].szName);
|
||||
m_SelectedCharList.SetItemText(dwSelectedItemIndex, 2, ultoa(m_UnifiedCharData[dwCount].sClass, szTempBuffer, 10));
|
||||
m_SelectedCharList.SetItemText(dwSelectedItemIndex, 3, ultoa(m_UnifiedCharData[dwCount].cLevel, szTempBuffer, 10));
|
||||
|
||||
dwViewCount += USER_INFO::MAX_CHAR_NUM;
|
||||
++dwSelectedItemIndex;
|
||||
}
|
||||
}
|
||||
|
||||
if (dwViewCount == USER_INFO::MAX_CHAR_NUM)
|
||||
{
|
||||
m_CharDataList.InsertItem(dwItemIndex, ultoa(m_UnifiedCharData[dwCount].dwNewCID, szTempBuffer, 10));
|
||||
m_CharDataList.SetItemText(dwItemIndex, 1, ultoa(m_UnifiedCharData[dwCount].cOldServerGroupID, szTempBuffer, 10));
|
||||
m_CharDataList.SetItemText(dwItemIndex, 2, m_UnifiedCharData[dwCount].szName);
|
||||
m_CharDataList.SetItemText(dwItemIndex, 3, ultoa(m_UnifiedCharData[dwCount].sClass, szTempBuffer, 10));
|
||||
m_CharDataList.SetItemText(dwItemIndex, 4, ultoa(m_UnifiedCharData[dwCount].cLevel, szTempBuffer, 10));
|
||||
++dwItemIndex;
|
||||
}
|
||||
}
|
||||
|
||||
const char* szWindowText = "Unknown";
|
||||
|
||||
switch(m_CharacterData.GetAgentServerType())
|
||||
{
|
||||
case UnifiedConst::Part2Unified:
|
||||
szWindowText = "<EFBFBD><EFBFBD>Ʈ2 <20><><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD>(<28>ѱ<EFBFBD>)";
|
||||
break;
|
||||
|
||||
case UnifiedConst::Part2Selectable:
|
||||
szWindowText = "<EFBFBD><EFBFBD>Ʈ2 <20><><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD>(<28>߱<EFBFBD>)";
|
||||
break;
|
||||
}
|
||||
|
||||
SetWindowText(szWindowText);
|
||||
}
|
||||
|
||||
bool CUnifiedCharSelect::HasUserInfo(unsigned long dwCID)
|
||||
{
|
||||
for(int nViewCount = 0; nViewCount < USER_INFO::MAX_CHAR_NUM; ++nViewCount)
|
||||
{
|
||||
if(m_UserInfo.CharID[nViewCount] == dwCID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::OnOK()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
UpdateData(true);
|
||||
|
||||
unsigned long ardwCID[USER_INFO::MAX_CHAR_NUM];
|
||||
unsigned long ardwViewCID[USER_INFO::MAX_CHAR_NUM];
|
||||
|
||||
memset(ardwCID, 0, sizeof(unsigned long) * USER_INFO::MAX_CHAR_NUM);
|
||||
memset(ardwViewCID, 0, sizeof(unsigned long) * USER_INFO::MAX_CHAR_NUM);
|
||||
|
||||
if(UnifiedConst::Part2Unified == m_CharacterData.GetAgentServerType())
|
||||
{
|
||||
for(int nViewCount = 0; nViewCount < USER_INFO::MAX_CHAR_NUM; ++nViewCount)
|
||||
{
|
||||
ardwViewCID[nViewCount] = m_UserInfo.CharID[nViewCount];
|
||||
}
|
||||
|
||||
CString szCID;
|
||||
char* lpStopPos = 0;
|
||||
|
||||
int nMaxCount = m_SelectedCharList.GetItemCount();
|
||||
for (int nCount = 0; nCount < nMaxCount; ++nCount)
|
||||
{
|
||||
szCID = m_SelectedCharList.GetItemText(nCount, 0);
|
||||
|
||||
for(int nViewCount = 0; nViewCount < USER_INFO::MAX_CHAR_NUM; ++nViewCount)
|
||||
{
|
||||
unsigned long dwCID = strtoul(szCID, &lpStopPos, 10);
|
||||
|
||||
if(0 == m_UserInfo.CharID[nViewCount] && !HasUserInfo(dwCID))
|
||||
{
|
||||
m_UserInfo.CharID[nViewCount] = ardwCID[nViewCount] = dwCID;
|
||||
nViewCount = USER_INFO::MAX_CHAR_NUM;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char cSelectedNation = 0 ;
|
||||
|
||||
SendPacket::UnifiedCharSelect(&m_CharacterData.GetClientSocket().GetHandler(ClientSocket::AuthEventHandler),
|
||||
m_UnifiedPassword, ardwCID, USER_INFO::MAX_CHAR_NUM, m_cSelectedStore, cSelectedNation);
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
else if(UnifiedConst::Part2Selectable == m_CharacterData.GetAgentServerType() && 0 != m_cSelectedStore)
|
||||
{
|
||||
/*
|
||||
SendPacket::UnifiedCharSelect(m_CharacterData.GetClientSocket().GetSession(
|
||||
ClientSocket::AuthEventHandler), m_UnifiedPassword, ardwCID,
|
||||
USER_INFO::MAX_CHAR_NUM, m_cSelectedStore);
|
||||
*/
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CUnifiedCharSelect::OnNMDblclkUnifiedCharList(NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
*pResult = 0;
|
||||
|
||||
// <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ƴϸ<C6B4>, <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
if(NM_DBLCLK == pNMHDR->code && m_SelectedCharList.GetItemCount() < USER_INFO::MAX_CHAR_NUM)
|
||||
{
|
||||
POSITION pos = m_CharDataList.GetFirstSelectedItemPosition();
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
UpdateData(true);
|
||||
|
||||
int nItem = m_CharDataList.GetNextSelectedItem(pos);
|
||||
|
||||
CString szCID = m_CharDataList.GetItemText(nItem, 0);
|
||||
char* stopPtr = 0;
|
||||
|
||||
unsigned long dwCharDataCID = strtoul(szCID, &stopPtr, 10);
|
||||
|
||||
int nMaxCount = m_SelectedCharList.GetItemCount();
|
||||
for (int nCount = 0; nCount < nMaxCount; ++nCount)
|
||||
{
|
||||
szCID = m_SelectedCharList.GetItemText(nCount, 0);
|
||||
|
||||
if(dwCharDataCID == strtoul(szCID, &stopPtr, 10))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nCount == nMaxCount)
|
||||
{
|
||||
m_SelectedCharList.InsertItem(nMaxCount, m_CharDataList.GetItemText(nItem, 0));
|
||||
m_SelectedCharList.SetItemText(nMaxCount, 1, m_CharDataList.GetItemText(nItem, 2));
|
||||
m_SelectedCharList.SetItemText(nMaxCount, 2, m_CharDataList.GetItemText(nItem, 3));
|
||||
m_SelectedCharList.SetItemText(nMaxCount, 3, m_CharDataList.GetItemText(nItem, 4));
|
||||
UpdateData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::OnNMDblclkUnifiedStoreList(NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
*pResult = 0;
|
||||
|
||||
if(NM_DBLCLK == pNMHDR->code)
|
||||
{
|
||||
POSITION pos = m_StoreInfoList.GetFirstSelectedItemPosition();
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
UpdateData(true);
|
||||
|
||||
int nItem = m_StoreInfoList.GetNextSelectedItem(pos);
|
||||
CString szStoreID = m_StoreInfoList.GetItemText(nItem, 0);
|
||||
|
||||
m_SelectedStore.Format("Selected Store : %s", szStoreID);
|
||||
m_cSelectedStore = atoi(szStoreID);
|
||||
|
||||
UpdateData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::OnNMDblclkSelectedChar(NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
*pResult = 0;
|
||||
|
||||
// <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20>ƴϸ<C6B4> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
if(NM_DBLCLK == pNMHDR->code && UnifiedConst::Part2Unified == m_CharacterData.GetAgentServerType())
|
||||
{
|
||||
POSITION pos = m_SelectedCharList.GetFirstSelectedItemPosition();
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
UpdateData(true);
|
||||
|
||||
int nItem = m_SelectedCharList.GetNextSelectedItem(pos);
|
||||
|
||||
CString szCID = m_SelectedCharList.GetItemText(nItem, 0);
|
||||
char* stopPtr = 0;
|
||||
|
||||
unsigned long dwCID = strtoul(szCID, &stopPtr, 10);
|
||||
|
||||
for(unsigned long dwCount = 0; dwCount < USER_INFO::MAX_CHAR_NUM; ++dwCount)
|
||||
{
|
||||
if (0 != m_UserInfo.CharID[dwCount] && dwCID == m_UserInfo.CharID[dwCount])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dwCount == USER_INFO::MAX_CHAR_NUM)
|
||||
{
|
||||
m_SelectedCharList.DeleteItem(nItem);
|
||||
UpdateData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CUnifiedCharSelect::OnNcDestroy()
|
||||
{
|
||||
CDialog::OnNcDestroy();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
CUnifiedCharSelect* CUnifiedCharSelect::CreateUnifiedCharSelect(CCharacterData& characterData, CWnd* pParentWnd)
|
||||
{
|
||||
#include "GMUndefNew.h"
|
||||
CUnifiedCharSelect* lpUnifiedCharSelect =
|
||||
new CUnifiedCharSelect(characterData, pParentWnd);
|
||||
#include "GMRedefNew.h"
|
||||
|
||||
if(0 != lpUnifiedCharSelect)
|
||||
{
|
||||
lpUnifiedCharSelect->Create(IDD, AfxGetMainWnd());
|
||||
}
|
||||
|
||||
return lpUnifiedCharSelect;
|
||||
}
|
||||
69
Client/DummyClient/UnifiedCharSelect.h
Normal file
69
Client/DummyClient/UnifiedCharSelect.h
Normal file
@@ -0,0 +1,69 @@
|
||||
#pragma once
|
||||
|
||||
#include <DB/DBDefine.h>
|
||||
#include <Network/Packet/PacketStruct/UnifiedCharPacket.h>
|
||||
#include "afxcmn.h"
|
||||
|
||||
// CUnifiedCharSelect <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
class CCharacterData;
|
||||
|
||||
class CUnifiedCharSelect : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CUnifiedCharSelect)
|
||||
|
||||
public:
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
enum { IDD = IDD_UNIFIED_CHAR_SELECT };
|
||||
|
||||
static CUnifiedCharSelect* CreateUnifiedCharSelect(CCharacterData& characterData, CWnd* pParentWnd = NULL);
|
||||
|
||||
void SetData(USER_INFO& userInfo,
|
||||
UnifiedStoreInfo* lpUnifiedStoreInfo, unsigned long dwUnifiedStoreInfoNum,
|
||||
UnifiedCharData* lpUnifiedCharData, unsigned long dwUnifiedCharDataNum);
|
||||
|
||||
protected:
|
||||
|
||||
CUnifiedCharSelect(CCharacterData& characterData, CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
virtual ~CUnifiedCharSelect();
|
||||
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool HasUserInfo(unsigned long dwCID);
|
||||
|
||||
USER_INFO m_UserInfo;
|
||||
|
||||
UnifiedStoreInfo m_UnifiedStoreInfo[PktUnifiedCharInfo::MAX_STORE_INFO];
|
||||
UnifiedCharData m_UnifiedCharData[PktUnifiedCharInfo::MAX_CHAR_DATA];
|
||||
|
||||
unsigned long m_dwUnifiedStoreInfoNum;
|
||||
unsigned long m_dwUnifiedCharDataNum;
|
||||
|
||||
CListCtrl m_StoreInfoList;
|
||||
CListCtrl m_CharDataList;
|
||||
CListCtrl m_SelectedCharList;
|
||||
|
||||
CString m_UnifiedPassword;
|
||||
CString m_SelectedStore;
|
||||
|
||||
CCharacterData& m_CharacterData;
|
||||
|
||||
unsigned char m_cSelectedStore;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void OnOK();
|
||||
|
||||
public:
|
||||
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnNMDblclkUnifiedCharList(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnNMDblclkUnifiedStoreList(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnNMDblclkSelectedChar(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnNcDestroy();
|
||||
};
|
||||
BIN
Client/DummyClient/res/DummyClient.ico
Normal file
BIN
Client/DummyClient/res/DummyClient.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
22
Client/DummyClient/res/DummyClient.manifest
Normal file
22
Client/DummyClient/res/DummyClient.manifest
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Microsoft.Windows.DummyClient"
|
||||
type="win32"
|
||||
/>
|
||||
<description>여기에 응용 프로그램 설명을 추가합니다.</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
13
Client/DummyClient/res/DummyClient.rc2
Normal file
13
Client/DummyClient/res/DummyClient.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// DummyClient.RC2 - resources Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
BIN
Client/DummyClient/res/DummyClientDoc.ico
Normal file
BIN
Client/DummyClient/res/DummyClientDoc.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Client/DummyClient/res/Toolbar.bmp
Normal file
BIN
Client/DummyClient/res/Toolbar.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
88
Client/DummyClient/resource.h
Normal file
88
Client/DummyClient/resource.h
Normal file
@@ -0,0 +1,88 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by DummyClient.rc
|
||||
//
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDP_OLE_INIT_FAILED 100
|
||||
#define IDD_DummyClient_FORM 101
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDR_DummyClientTYPE 129
|
||||
#define IDD_DLG_LOGIN 131
|
||||
#define IDD_DLG_CHARSELECT 132
|
||||
#define IDD_UNIFIED_CHAR_SELECT 135
|
||||
#define IDD_CHANGE_NAME 136
|
||||
#define IDC_EDT_LOGIN 1000
|
||||
#define IDC_EDT_PASSWORD 1001
|
||||
#define ID_BTN_LOGIN 1002
|
||||
#define ID_BTN_EXIT 1003
|
||||
#define IDC_CTRL_CHARSELECT 1004
|
||||
#define IDC_EDT_LOGIN2 1006
|
||||
#define IDC_EDT_LOGIN3 1007
|
||||
#define IDC_GUILDINFOSORT_COMBO 1010
|
||||
#define IDC_GUILDINFO_LISTCTRL 1011
|
||||
#define IDC_SPIN1 1012
|
||||
#define IDC_BUTTON1 1013
|
||||
#define IDC_BTN_FIND 1013
|
||||
#define IDC_BUTTON2 1014
|
||||
#define IDC_BTN_APPLY 1014
|
||||
#define IDC_BUTTON3 1015
|
||||
#define IDC_BTN_CREST 1015
|
||||
#define IDC_BUTTON4 1016
|
||||
#define IDC_BTN_LEV 1016
|
||||
#define IDC_EDIT1 1017
|
||||
#define IDC_EDT_NAME 1017
|
||||
#define IDC_NEW_NAME 1017
|
||||
#define IDC_EDIT2 1018
|
||||
#define IDC_EDT_CREST 1018
|
||||
#define IDC_SELECTED_STORE 1018
|
||||
#define IDC_EDIT3 1019
|
||||
#define IDC_EDT_MASTER 1019
|
||||
#define IDC_OLD_NAME 1019
|
||||
#define IDC_EDIT4 1020
|
||||
#define IDC_EDT_REP 1020
|
||||
#define IDC_EDIT5 1021
|
||||
#define IDC_EDT_TEND 1021
|
||||
#define IDC_EDIT6 1022
|
||||
#define IDC_EDT_POL 1022
|
||||
#define IDC_EDIT7 1023
|
||||
#define IDC_EDT_LEV 1023
|
||||
#define IDC_EDIT9 1025
|
||||
#define IDC_EDT_BALANCE 1025
|
||||
#define IDC_BUTTON5 1026
|
||||
#define IDC_BTN_WITHDRAW 1026
|
||||
#define IDC_BUTTON6 1027
|
||||
#define IDC_BTN_DEPOSIT 1027
|
||||
#define IDC_BUTTON7 1028
|
||||
#define IDC_BTN_DETAILS 1028
|
||||
#define IDC_BUTTON8 1029
|
||||
#define IDC_BTN_RELEASE 1029
|
||||
#define IDC_EDIT10 1030
|
||||
#define IDC_EDT_FAME 1030
|
||||
#define IDC_PASSWORD 1030
|
||||
#define IDC_UNIFIED_PASSWORD 1030
|
||||
#define IDC_GUILDMBRSORT_COMBO 1031
|
||||
#define IDC_LIST2 1032
|
||||
#define IDC_GUILDMBR_LISTCTRL 1032
|
||||
#define IDC_UNIFIED_CHAR_LIST 1032
|
||||
#define IDC_EDIT11 1033
|
||||
#define IDC_EDT_GOLD 1033
|
||||
#define IDC_EDIT12 1034
|
||||
#define IDC_EDT_LOCATION 1034
|
||||
#define IDC_IPADDRESS1 1035
|
||||
#define IDC_BTN_REFLUSH 1037
|
||||
#define IDC_BUTTON10 1038
|
||||
#define IDC_BTN_CREATE 1038
|
||||
#define IDC_UNIFIED_STORE_LIST 1039
|
||||
#define IDC_SELECTED_CHAR 1040
|
||||
#define ID_CHAR_NAME_CHANGE 32772
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 137
|
||||
#define _APS_NEXT_COMMAND_VALUE 32773
|
||||
#define _APS_NEXT_CONTROL_VALUE 1041
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
7
Client/DummyClient/stdafx.cpp
Normal file
7
Client/DummyClient/stdafx.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// DummyClient.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
42
Client/DummyClient/stdafx.h
Normal file
42
Client/DummyClient/stdafx.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// 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
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ܽ<EFBFBD>ŵ<EFBFBD>ϴ<EFBFBD>.
|
||||
#endif
|
||||
|
||||
// <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// <20>ٸ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSDN<44><4E> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#ifndef WINVER // Windows 95 <20><> Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define WINVER 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINNT 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Windows 98 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINDOWS 0x0410 // Windows Me <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // IE 4.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_IE 0x0400 // IE 5.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // <20>Ϻ<EFBFBD> CString <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
// MFC<46><43> <20><><EFBFBD><EFBFBD> <20>κа<CEBA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC <20>ٽ<EFBFBD> <20><> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#include <afxext.h> // MFC <20>ͽ<EFBFBD><CDBD>ټ<EFBFBD>
|
||||
#include <afxdisp.h> // MFC <20>ڵ<EFBFBD>ȭ Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
|
||||
#include <afxdtctl.h> // Internet Explorer 4 <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // Windows <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
75
Client/GlobalScript/Castle/CastleBlessMgr.cpp
Normal file
75
Client/GlobalScript/Castle/CastleBlessMgr.cpp
Normal file
@@ -0,0 +1,75 @@
|
||||
#include "stdafx.h"
|
||||
#include "CastleBlessMgr.h"
|
||||
|
||||
#include <Castle/CastleConstants.h>
|
||||
#include "GMMemory.h"
|
||||
|
||||
using namespace Castle;
|
||||
|
||||
CCastleBlessMgr::sCastleBlessInfo CCastleBlessMgr::m_CastleBlessInfo[ MAX_BLESS_INFO_NUM ] =
|
||||
{
|
||||
sCastleBlessInfo(0, 0, 5, 320.0f, Castle::TITLE_NEW),
|
||||
sCastleBlessInfo(1, 1, 10, 320.0f, Castle::TITLE_NEW),
|
||||
sCastleBlessInfo(2, 1, 20, 400.0f, Castle::TITLE_SETTLED),
|
||||
sCastleBlessInfo(3, 2, 30, 480.0f, Castle::TITLE_FLOURISHED),
|
||||
sCastleBlessInfo(4, 2, 40, 560.0f, Castle::TITLE_HONORABLE),
|
||||
sCastleBlessInfo(5, 3, 50, 640.0f, Castle::TITLE_GLORIOUS)
|
||||
};
|
||||
|
||||
CCastleBlessMgr::CCastleBlessMgr()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
CCastleBlessMgr::~CCastleBlessMgr()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
CCastleBlessMgr& CCastleBlessMgr::GetInstance()
|
||||
{
|
||||
static CCastleBlessMgr ms_this;
|
||||
return ms_this;
|
||||
}
|
||||
|
||||
bool CCastleBlessMgr::Initialize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CCastleBlessMgr::Destroy()
|
||||
{
|
||||
}
|
||||
|
||||
unsigned char CCastleBlessMgr::GetTitle(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const
|
||||
{
|
||||
int iIndex = FindProperIndex(wGainTaxCount, cUpgradeStep);
|
||||
return m_CastleBlessInfo[ iIndex ].m_cTitle;
|
||||
}
|
||||
|
||||
unsigned char CCastleBlessMgr::GetBonusPercent(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const
|
||||
{
|
||||
int iIndex = FindProperIndex(wGainTaxCount, cUpgradeStep);
|
||||
return m_CastleBlessInfo[ iIndex ].m_cBonusPercent;
|
||||
}
|
||||
|
||||
float CCastleBlessMgr::GetBlessArea(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const
|
||||
{
|
||||
int iIndex = FindProperIndex(wGainTaxCount, cUpgradeStep);
|
||||
return m_CastleBlessInfo[ iIndex ].m_fArea;
|
||||
}
|
||||
|
||||
int CCastleBlessMgr::FindProperIndex(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const
|
||||
{
|
||||
int iIndex = 0;
|
||||
for (; iIndex<MAX_BLESS_INFO_NUM; ++iIndex)
|
||||
{
|
||||
if (m_CastleBlessInfo[ iIndex ].m_wGainTaxCount > wGainTaxCount ||
|
||||
m_CastleBlessInfo[ iIndex ].m_cUpgradeStep > cUpgradeStep)
|
||||
{
|
||||
return (iIndex - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return (iIndex - 1);
|
||||
}
|
||||
57
Client/GlobalScript/Castle/CastleBlessMgr.h
Normal file
57
Client/GlobalScript/Castle/CastleBlessMgr.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#ifndef _CASTLE_BLESS_MANAGER_H_
|
||||
#define _CASTLE_BLESS_MANAGER_H_
|
||||
|
||||
#pragma once
|
||||
|
||||
#define g_CastleBlessMgr Castle::CCastleBlessMgr::GetInstance()
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace Castle
|
||||
{
|
||||
class CCastleBlessMgr
|
||||
{
|
||||
private:
|
||||
|
||||
enum Const
|
||||
{
|
||||
MAX_BLESS_INFO_NUM = 6
|
||||
};
|
||||
|
||||
struct sCastleBlessInfo
|
||||
{
|
||||
unsigned short m_wGainTaxCount; // <20><><EFBFBD><EFBFBD> ȹ<><C8B9> Ƚ<><C8BD>(<28>ӽ<EFBFBD> -> <20><><EFBFBD><EFBFBD>) = <20><> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD> / Castle::TEMP_TAX_GAIN_COUNT
|
||||
unsigned char m_cUpgradeStep; // <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD><D7B7>̵<EFBFBD>
|
||||
unsigned char m_cBonusPercent; // <20><><EFBFBD><EFBFBD> <20><>Ȯ<EFBFBD><C8AE>
|
||||
float m_fArea; // <20><><EFBFBD><EFBFBD>(<28>ݰ<EFBFBD> m <20><><EFBFBD><EFBFBD>)
|
||||
unsigned char m_cTitle; // Īȣ
|
||||
|
||||
sCastleBlessInfo(unsigned short wGainTaxCount, unsigned char cUpgradeStep, unsigned char cBonusPercent,
|
||||
float fArea, unsigned char cTitle)
|
||||
: m_wGainTaxCount(wGainTaxCount), m_cUpgradeStep(cUpgradeStep), m_cBonusPercent(cBonusPercent),
|
||||
m_fArea(fArea), m_cTitle(cTitle)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
~CCastleBlessMgr();
|
||||
static CCastleBlessMgr& GetInstance();
|
||||
|
||||
unsigned char GetTitle(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const;
|
||||
unsigned char GetBonusPercent(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const;
|
||||
float GetBlessArea(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const;
|
||||
|
||||
private:
|
||||
CCastleBlessMgr();
|
||||
|
||||
int FindProperIndex(unsigned short wGainTaxCount, unsigned char cUpgradeStep) const;
|
||||
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
static sCastleBlessInfo m_CastleBlessInfo[ MAX_BLESS_INFO_NUM ] ;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // _CASTLE_BLESS_MANAGER_H_
|
||||
100
Client/GlobalScript/Castle/CastleConstants.h
Normal file
100
Client/GlobalScript/Castle/CastleConstants.h
Normal file
@@ -0,0 +1,100 @@
|
||||
#ifndef _CASTLE_CONSTANTS_H_
|
||||
#define _CASTLE_CONSTANTS_H_
|
||||
|
||||
namespace Castle
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
NONE = 0,
|
||||
CASTLE = 1,
|
||||
CAMP = 2
|
||||
};
|
||||
|
||||
enum IndentifyBit
|
||||
{
|
||||
STATUE_BIT = 0x80000000, // <20><>ũ ī<><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>.)
|
||||
CASTLE_BIT = 0x40000000, // <20><>
|
||||
CAMP_BIT = 0x20000000, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
TOWN_BIT = 0x10000000, // <20><><EFBFBD><EFBFBD>
|
||||
|
||||
SIEGE_BIT = 0x00FF0000, // <20><><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><>Ʈ
|
||||
// CASTLE_BIT | SIEGE_BIT <20><> <20><><EFBFBD><EFBFBD>!!
|
||||
// ex) 0x40FF1001 : CastleNameID <20><> 1 <20>̰<EFBFBD> <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ 2<><32>
|
||||
|
||||
CASTLE_NAME_BIT_SHIFT = 12 // <20>ٸ<EFBFBD> ä<>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD> <20>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EEB0A1> <20><> ID <20><><EFBFBD><EFBFBD>
|
||||
// CASTLE_BIT | (CastleNameID << CASTLE_NAME_BIT_SHIFT) <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
// ex) 0x40001000 : CastleNameID <20><> 1 <20>̴<EFBFBD>.
|
||||
};
|
||||
|
||||
enum TaxType
|
||||
{
|
||||
TRADE_TAX = 0, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F>Ǹ<EFBFBD>
|
||||
REPAIR_TAX = 1, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
RESMELT_TAX = 2, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CAMP_GOLD_TAX = 3, // <20><><EFBFBD><EFBFBD> Gold
|
||||
CAMP_MINERAL_TAX = 4, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
MAX_TAX_TYPE = 5
|
||||
};
|
||||
|
||||
enum TaxChangable
|
||||
{
|
||||
TAX_DISABLE = 0, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ұ<EFBFBD><D2B0><EFBFBD>
|
||||
TAX_ENABLE = 1 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum MineralType
|
||||
{
|
||||
ACCUMULATED_MINERAL = 1, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
TEMPORARY_MINERAL = 2, // <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum CastleName
|
||||
{
|
||||
TEMP_CASTLE_NAME_0 = 0,
|
||||
TEMP_CASTLE_NAME_1 = 1,
|
||||
TEMP_CASTLE_NAME_2 = 2,
|
||||
TEMP_CASTLE_NAME_3 = 3,
|
||||
TEMP_CASTLE_NAME_4 = 4,
|
||||
|
||||
MAX_CASTLE_NAME_NUM = 5,
|
||||
MAX_CASTLE_NAME_LEN = 32
|
||||
};
|
||||
|
||||
enum CastleTitle
|
||||
{
|
||||
TITLE_NEW = 0, // Īȣ '<27><><EFBFBD>ο<EFBFBD>'
|
||||
TITLE_SETTLED = 1, // Īȣ '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
||||
TITLE_FLOURISHED = 2, // Īȣ '<27><>â<EFBFBD><C3A2>'
|
||||
TITLE_HONORABLE = 3, // Īȣ '<27><><EFBFBD><EFBFBD><EFBFBD>ο<EFBFBD>'
|
||||
TITLE_GLORIOUS = 4, // Īȣ '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
||||
|
||||
MAX_TITLE_NUM = 5
|
||||
};
|
||||
|
||||
enum Const
|
||||
{
|
||||
CASTLE_EXP_BONUS_RADIUS = 300, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20>ݰ<EFBFBD>
|
||||
|
||||
MAX_CASTLE_NUM = 10,
|
||||
MAX_CASTLE_MINERAL_NUM = 200,
|
||||
MAX_CASTLE_OBJECT_NUM = 250,
|
||||
|
||||
MAX_TEMP_TAX_UPDATE_COUNT = 10,
|
||||
MAX_TEMP_TAX_AMOUNT = 50000,
|
||||
|
||||
EMBLEM_UPGRADE_JEWEL_NUM = 90,
|
||||
EMBLEM_UPGRADE_JEWEL_NUM_PER_POS = 10,
|
||||
EMBLEM_UPGRADE_JEWEL_POS_NUM = 9,
|
||||
|
||||
FAME_FOR_CAPTURE_CASTLE = 10000, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ
|
||||
FAME_FOR_FRIENDLY_GUILD = 5000, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ
|
||||
|
||||
INVINCIBLE_COUNT = 0, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD> (0ȸ)
|
||||
TEMP_TAX_GAIN_COUNT = 1, // <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ű<EFBFBD><C5B1><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD> (1ȸ)
|
||||
|
||||
DAY_END_TIME = 0 // <20>Ϸ簡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD> (<28><> 12<31><32>)
|
||||
};
|
||||
}
|
||||
|
||||
#endif // _CASTLE_CONSTANTS_H_
|
||||
180
Client/GlobalScript/Community/Guild/GuildConstants.h
Normal file
180
Client/GlobalScript/Community/Guild/GuildConstants.h
Normal file
@@ -0,0 +1,180 @@
|
||||
|
||||
#ifndef _GUILD_CONSTANTS_H_
|
||||
#define _GUILD_CONSTANTS_H_
|
||||
|
||||
namespace Guild
|
||||
{
|
||||
enum Const
|
||||
{
|
||||
MAX_GUILD_NAME_LEN = 11, // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
MAX_GUILD_NAME_FOR_DB = 20, // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> (DB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
MAX_MEMBER_NAME_LEN = 16, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> (<28>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>̿<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
MAX_MARK_SIZE = 18 * 12 * 2 + 1, // <20><><EFBFBD><EFBFBD> <20><>ũ ũ<><C5A9> (18 * 12 ũ<><C5A9><EFBFBD><EFBFBD> 16<31><36>Ʈ Į<><C4AE><EFBFBD><EFBFBD> BMP <20><><EFBFBD><EFBFBD>, ù 1<><31><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>ũ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
MAX_RIGHT_SIZE = 50, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü ũ<><C5A9>
|
||||
|
||||
MAX_MEMBER_NUM = 100, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20>ִ<EFBFBD> ũ<><C5A9> (<28><><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>д<EFBFBD>.)
|
||||
MAX_RELATION_NUM = 255, // <20><>ȣ/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>ִ<EFBFBD> ũ<><C5A9> (ī<><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>д<EFBFBD>.)
|
||||
MAX_HOSTILITY_APPLY_NUM = 49, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
|
||||
MAX_HOSTILITY_NUM = 1, // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20>ִ<EFBFBD> <20><>
|
||||
MAX_ALERT_NUM = 1, // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20>ִ<EFBFBD> <20><>
|
||||
|
||||
MAX_LEVEL = 5, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CREATE_LEVEL = 30, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>䱸<EFBFBD>Ǵ<EFBFBD> <20>ּ<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CREATE_LEVEL_FOR_CHINA = 15, // (<28>߱<EFBFBD><DFB1><EFBFBD>) <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>䱸<EFBFBD>Ǵ<EFBFBD> <20>ּ<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
SET_MARK_GOLD = 5000000, // <20><>ũ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>ݾ<EFBFBD>
|
||||
FAME_LEAVE_PENALTY = 1000, // <20><><EFBFBD>帶<EFBFBD><E5B8B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ż<><C5BB><EFBFBD><EFBFBD> <20><><EFBFBD>̴<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
MAX_SMALL_NODE_NUM = 500, // <20>ѹ<EFBFBD><D1B9><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
MEMBER_INFO_UPDATE_COUNT = 10, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ϴ<EFBFBD> Ÿ<>̹<EFBFBD>
|
||||
DELETE_GUILD_MEMBER_NUM = 4, // <20><><EFBFBD>尡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20>ּ<EFBFBD> <20>ο<EFBFBD>
|
||||
|
||||
MINUTES_PER_HOUR = 60,
|
||||
|
||||
// <20>ؿ<EFBFBD><D8BF><EFBFBD> <20><>û<EFBFBD><C3BB> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> Ż<><C5BB> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. (2005-06-13 by <20>ε<EFBFBD>)
|
||||
LEAVE_WAIT_TIME = 0, // Ż<><C5BB> <20><><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
LEAVE_WAIT_TIME_FOR_CHINA = 10080, // (<28>߱<EFBFBD><DFB1><EFBFBD>) Ż<><C5BB> <20><><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
DELETE_GUILD_LOGOUT_TIME = 43200, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾ<EFBFBD> <20><><EFBFBD>尡 <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
MEMBER_NUM_DELETE_TIME = 1440, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DELETE_GUILD_MEMBER_NUM <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
TRANFER_MASTER_TIME = 20160, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>帶<EFBFBD><E5B8B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>絵 <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
CHANGE_INCLINATION_TIME = 1440, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
RELATION_WAIT_TIME = 1440, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
|
||||
/*
|
||||
// Test : <20><><EFBFBD><EFBFBD> <20><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD>
|
||||
LEAVE_WAIT_TIME_FOR_CHINA = 10, // (<28>߱<EFBFBD><DFB1><EFBFBD>) Ż<><C5BB> <20><><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
DELETE_GUILD_LOGOUT_TIME = 30, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾ<EFBFBD> <20><><EFBFBD>尡 <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
MEMBER_NUM_DELETE_TIME = 15, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DELETE_GUILD_MEMBER_NUM <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
TRANFER_MASTER_TIME = 20, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>帶<EFBFBD><E5B8B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>絵 <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
CHANGE_INCLINATION_TIME = 10, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
RELATION_WAIT_TIME = 1, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> (<28><><EFBFBD><EFBFBD> : <20><>)
|
||||
*/
|
||||
|
||||
MEMBER_WAIT_BIT = 0x80000000, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
TIME_GUILD_POINT = 30, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD>(<28>д<EFBFBD><D0B4><EFBFBD>).
|
||||
|
||||
TACTICE_JON_LEVEL = 1, // <20>뺴 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
TACTICS = 1, // <20>뺴.
|
||||
TACTICS_WAIT = 2, // <20>뺴 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
};
|
||||
|
||||
enum Title
|
||||
{
|
||||
NONE = 0,
|
||||
MASTER = 1, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MIDDLE_ADMIN = 2, // <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
COMMON = 3, // <20>Ϲ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LEAVE_WAIT = 4, // Ż<><C5BB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
JOIN_WAIT = 5, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
MAX_TITLE = 6
|
||||
};
|
||||
|
||||
enum MemberType
|
||||
{
|
||||
TYPE_MEMBER = 0, // <20><><EFBFBD><EFBFBD>
|
||||
TYPE_TACTICS = 1 // <20>뺴
|
||||
};
|
||||
|
||||
enum GuildSort
|
||||
{
|
||||
GUILD_FAME = 0, // <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
||||
GUILD_NAME = 1, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GUILD_HOSTILITY = 2, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GUILD_NEUTRALITY = 3, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GUILD_MINE = 4, // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
GUILD_REQUEST = 5 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><>û (<28><> <20>α<EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û)
|
||||
};
|
||||
|
||||
enum MemberSort
|
||||
{
|
||||
MEMBER_TITLE = 0, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MEMBER_CLASS = 1, // Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ
|
||||
MEMBER_LEVEL = 2, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ
|
||||
MEMBER_FAME = 3, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ
|
||||
MEMBER_NAME = 4, // <20≯<EFBFBD><CCB8><EFBFBD> <20><>Ʈ
|
||||
MEMBER_GOLD = 5, // <20><><EFBFBD><EFBFBD><EFBFBD>ݾ<DDBE> <20><>Ʈ
|
||||
MEMBER_POSITION = 6, // <20><>ġ<EFBFBD><C4A1> <20><>Ʈ
|
||||
MEMBER_JOIN_WAIT = 7, // <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7>̾<EFBFBD>
|
||||
MEMBER_WAR_ON = 8, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ)
|
||||
MEMBER_WAR_OFF = 9, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ)
|
||||
TACTICS_JOIN_WAIT = 10, // <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20>뺴 (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>)
|
||||
TACTICS_ACTIVE = 11 // Ȱ<><C8B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>뺴 (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>)
|
||||
};
|
||||
|
||||
enum Relation
|
||||
{
|
||||
NEUTRALITY = 0, // <20>߸<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
HOSTILITY = 1, // <20><><EFBFBD><EFBFBD>
|
||||
COUNTER_HOSTILITY = 2, // ī<><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
ALERT_HOSTILITY = 3, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
MINE = 4, // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
TARGET_NEUTRALITY = 5, // A->B<><42><EFBFBD>븦 <20>ϸ<EFBFBD> DB<44><42><EFBFBD><EFBFBD> 1<><31> <20><><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD> <20>̻<EFBFBD><CCBB>¿<EFBFBD><C2BF><EFBFBD> <20>ǽ<EFBFBD><C7BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD>
|
||||
// <20>ش簪<D8B4><E7B0AA> 5<><35> <20>ٲ<EFBFBD><D9B2><EFBFBD>. 5<><35> <20>ٲ<EFBFBD><D9B2>ڿ<EFBFBD><DABF><EFBFBD> B<><42><EFBFBD>尡 <20><><EFBFBD>뼱<EFBFBD><EBBCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ָ<EFBFBD>
|
||||
// <20>̶<EFBFBD> DB<44><42><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȭ<EFBFBD><C8AD><EFBFBD>谡 <20>ȴ<EFBFBD>.
|
||||
|
||||
ALL_HOSTILITY = 6 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum RelationActor
|
||||
{
|
||||
BY_MINE = 0, // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
BY_TARGET = 1, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
MAX_RELATION_ACTOR = 2
|
||||
};
|
||||
|
||||
// <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
enum TimeUpdateType
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD> CDBObject::UpdateGuildTime <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
LAST_LOGOUT = 0, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>αƿ<D7BE><C6BF><EFBFBD> <20>ð<EFBFBD>
|
||||
MEMBER_NUM_DOWN = 1, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 3<><33> <20><><EFBFBD>ϰ<EFBFBD> <20><> <20>ð<EFBFBD>
|
||||
MASTER_LOGOUT = 2 // <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>αƿ<D7BE><C6BF><EFBFBD> <20>ð<EFBFBD>
|
||||
};
|
||||
|
||||
enum ErrType
|
||||
{
|
||||
S_SUCCESS = 0,
|
||||
|
||||
// CGuild::SetTitle <20>Լ<EFBFBD><D4BC><EFBFBD>
|
||||
E_NOT_MEMBER = 1, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD>
|
||||
E_DISSOLVE_GUILD = 2, // <20><><EFBFBD><EFBFBD> <20><>ü
|
||||
E_NOT_CHANGE = 3, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
E_DB_ERROR = 4, // DB <20><><EFBFBD><EFBFBD>
|
||||
E_NOT_TEMP_MASTER = 5 // <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum AddFameType
|
||||
{
|
||||
// CGuildDB::AddAllMemberFame, AddFriendGuildMemberFame, AddMemberFame <20>Լ<EFBFBD><D4BC><EFBFBD>
|
||||
|
||||
TYPE_VALUE = 0, // Fame <20><><EFBFBD><EFBFBD> <20>״<EFBFBD><D7B4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
||||
TYPE_HALF = 1, // <20><><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> 1/2<><32> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
TYPE_QUARTER = 2 // <20><><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> 1/4<><34> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
enum MemberInfoUpdateType
|
||||
{
|
||||
// CGuild::UpdateMemberInfo <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
TYPE_LEVEL = 0,
|
||||
TYPE_CLASS = 1,
|
||||
TYPE_FAME = 2,
|
||||
TYPE_GOLD = 3,
|
||||
TYPE_WARFLAG = 4
|
||||
};
|
||||
|
||||
const unsigned char ms_aryMaxMemberNum[MAX_LEVEL] = { 10, 20, 30, 40, 50 };
|
||||
const unsigned long ms_arySetLevelFame[MAX_LEVEL] = { 0, 1000, 3000, 5000, 10000 };
|
||||
const unsigned long ms_arySetLevelFameForUSA[MAX_LEVEL] = { 0, 400, 2000, 5000, 10000 };
|
||||
const unsigned long ms_arySetLevelGold[MAX_LEVEL] = { 1000000, 5000000, 10000000, 50000000, 100000000 };
|
||||
const unsigned long ms_arySetLevelGoldForChina[MAX_LEVEL] = { 100000, 5000000, 10000000, 50000000, 100000000 };
|
||||
};
|
||||
|
||||
#endif
|
||||
78
Client/GlobalScript/Community/Guild/GuildStructure.h
Normal file
78
Client/GlobalScript/Community/Guild/GuildStructure.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#ifndef _GUILD_STRUCTURE_H_
|
||||
#define _GUILD_STRUCTURE_H_
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <Community/Guild/GuildConstants.h>
|
||||
|
||||
namespace Guild
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CGuild;
|
||||
|
||||
struct MemberListInfo
|
||||
{
|
||||
unsigned char m_cRank; // <20><><EFBFBD><EFBFBD> (<28><> <20><><EFBFBD>峻<EFBFBD><E5B3BB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD>帶<EFBFBD><E5B8B6><EFBFBD><EFBFBD> 0<><30><EFBFBD><EFBFBD> <20>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
unsigned char m_cTitle; // <20><><EFBFBD><EFBFBD> (Guild::Title<6C><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
unsigned char m_cLevel; // <20><><EFBFBD><EFBFBD>
|
||||
unsigned char m_cClass; // Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
unsigned char m_cGuildWarFlag; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> (Creature::WarFlag<61><67> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
MemberListInfo()
|
||||
: m_cRank(0), m_cTitle(0), m_cLevel(0), m_cClass(0), m_cGuildWarFlag(0)
|
||||
{ }
|
||||
|
||||
MemberListInfo(unsigned char cRank, unsigned char cTitle, unsigned char cLevel, unsigned char cClass, unsigned char cGuildWarFlag)
|
||||
: m_cRank(cRank), m_cTitle(cTitle), m_cLevel(cLevel), m_cClass(cClass), m_cGuildWarFlag(cGuildWarFlag)
|
||||
{ }
|
||||
};
|
||||
|
||||
struct MemberDetailInfo
|
||||
{
|
||||
unsigned long m_dwFame;
|
||||
unsigned long m_dwGold;
|
||||
|
||||
MemberDetailInfo()
|
||||
: m_dwFame(0), m_dwGold(0)
|
||||
{ }
|
||||
|
||||
MemberDetailInfo(unsigned long dwFame, unsigned long dwGold)
|
||||
: m_dwFame(dwFame), m_dwGold(dwGold)
|
||||
{ }
|
||||
};
|
||||
|
||||
struct MemberInfo
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned long m_dwCID;
|
||||
char m_strName[MAX_MEMBER_NAME_LEN];
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned long m_dwServerID;
|
||||
TIME m_LeaveGuildTime;
|
||||
unsigned char m_cUpdateCount;
|
||||
|
||||
unsigned char m_cTactics;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ)
|
||||
MemberListInfo m_MemberListInfo;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> Ƚ<><C8BD> <20>̻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ)
|
||||
MemberDetailInfo m_MemberDetailInfo;
|
||||
|
||||
MemberInfo()
|
||||
: m_dwCID(0), m_dwServerID(0), m_cUpdateCount(0), m_cTactics(0), m_MemberListInfo(), m_MemberDetailInfo()
|
||||
{
|
||||
std::fill_n(m_strName, int(MAX_MEMBER_NAME_LEN), 0);
|
||||
::memset(&m_LeaveGuildTime, 0, sizeof(TIME));
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map<unsigned long, CGuild *> GuildMap;
|
||||
typedef std::map<std::string, CGuild *> GuildNameMap;
|
||||
|
||||
typedef std::vector<MemberInfo> MemberList;
|
||||
typedef std::map<unsigned long, unsigned char> RelationMap; // <GID, cRelation>
|
||||
};
|
||||
|
||||
#endif
|
||||
668
Client/GlobalScript/Creature/Character/CharacterClass.cpp
Normal file
668
Client/GlobalScript/Creature/Character/CharacterClass.cpp
Normal file
@@ -0,0 +1,668 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <Creature/Character/CharacterStructure.h>
|
||||
#include <Network/Packet/PacketStruct/CharStatusPacketStruct.h>
|
||||
|
||||
#include "CharacterClass.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
|
||||
// Ȧ<><C8A6> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ۼ<EFBFBD>.
|
||||
CClass ClassTable[CClass::MAX_CLASS] =
|
||||
{
|
||||
CClass(),
|
||||
CClass(CClass::Fighter, CClass::Fighter, CClass::DEFAULT_CLASS, CClass::HUMAN, CClass::STR, 1, CClass::CON, 1, false),
|
||||
CClass(CClass::Rogue, CClass::Rogue, CClass::DEFAULT_CLASS, CClass::HUMAN, CClass::DEX, 1, CClass::STR, 1, false),
|
||||
CClass(CClass::Mage, CClass::Mage, CClass::DEFAULT_CLASS, CClass::HUMAN, CClass::INT, 1, CClass::DEX, 1, false),
|
||||
CClass(CClass::Acolyte, CClass::Acolyte, CClass::DEFAULT_CLASS, CClass::HUMAN, CClass::WIS, 1, CClass::CON, 1, false),
|
||||
CClass(CClass::Defender, CClass::Fighter, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::STR, 2, CClass::CON, 1, true),
|
||||
CClass(CClass::Warrior, CClass::Fighter, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::STR, 2, CClass::CON, 1, false),
|
||||
CClass(CClass::Assassin, CClass::Rogue, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::DEX, 2, CClass::STR, 1, false),
|
||||
CClass(CClass::Archer, CClass::Rogue, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::DEX, 2, CClass::STR, 1, true),
|
||||
CClass(CClass::Sorcerer, CClass::Mage, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::INT, 2, CClass::DEX, 1, false),
|
||||
CClass(CClass::Enchanter, CClass::Mage, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::INT, 2, CClass::DEX, 1, true),
|
||||
CClass(CClass::Priest, CClass::Acolyte, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::WIS, 2, CClass::CON, 1, true),
|
||||
CClass(CClass::Cleric, CClass::Acolyte, CClass::JOB_CHANGE_1ST, CClass::HUMAN, CClass::WIS, 2, CClass::CON, 1, false),
|
||||
CClass(),
|
||||
CClass(),
|
||||
CClass(),
|
||||
CClass(),
|
||||
CClass(CClass::Combatant, CClass::Combatant, CClass::DEFAULT_CLASS, CClass::AKHAN, CClass::STR, 1, CClass::NONE_STAT, 0, false),
|
||||
CClass(CClass::Officiator, CClass::Officiator, CClass::DEFAULT_CLASS, CClass::AKHAN, CClass::DEX, 1, CClass::NONE_STAT, 0, false),
|
||||
CClass(CClass::Templar, CClass::Combatant, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::STR, 2, CClass::CON, 1, true),
|
||||
CClass(CClass::Attacker, CClass::Combatant, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::STR, 2, CClass::CON, 1, false),
|
||||
CClass(CClass::Gunner, CClass::Combatant, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::DEX, 2, CClass::STR, 1, true),
|
||||
CClass(CClass::RuneOff, CClass::Officiator, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::INT, 2, CClass::DEX, 1, false),
|
||||
CClass(CClass::LifeOff, CClass::Officiator, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::WIS, 2, CClass::DEX, 1, false),
|
||||
CClass(CClass::ShadowOff, CClass::Officiator, CClass::JOB_CHANGE_1ST, CClass::AKHAN, CClass::DEX, 2, CClass::STR, 1, false)
|
||||
};
|
||||
|
||||
|
||||
CClass::CClass(const JobType eJobType, const JobType ePrevJobType, const JobLevel eJobLevel, const RaceType eRace,
|
||||
const CClass::StatusType eType1, const unsigned char cIncrement1,
|
||||
const CClass::StatusType eType2, const unsigned char cIncrement2,
|
||||
const bool bLevelSwap)
|
||||
: m_eJobType(eJobType), m_ePrevJobType(ePrevJobType), m_eJobLevel(eJobLevel),
|
||||
m_eRace(eRace), m_bLevelSwap(bLevelSwap)
|
||||
{
|
||||
m_eIncrementType[0] = eType1; m_eIncrementType[1] = eType2;
|
||||
m_cIncrementValue[0] = cIncrement1; m_cIncrementValue[1] = cIncrement2;
|
||||
}
|
||||
|
||||
CClass::CClass()
|
||||
: m_eJobType(NONE_JOB), m_ePrevJobType(NONE_JOB),
|
||||
m_eJobLevel(DEFAULT_CLASS), m_eRace(MAX_RACE), m_bLevelSwap(false)
|
||||
{
|
||||
m_eIncrementType[0] = NONE_STAT; m_eIncrementType[1] = NONE_STAT;
|
||||
m_cIncrementValue[0] = 0; m_cIncrementValue[1] = 0;
|
||||
}
|
||||
|
||||
void CClass::LevelUp(CHAR_INFOST* InfoSt)
|
||||
{
|
||||
unsigned char cIndex1 = m_bLevelSwap ? ((1 == InfoSt->Level % 2) ? 0 : 1) : 0;
|
||||
unsigned char cIndex2 = m_bLevelSwap ? ((1 == InfoSt->Level % 2) ? 1 : 0) : 1;
|
||||
IncrementByType(InfoSt, 0, cIndex1);
|
||||
IncrementByType(InfoSt, 1, cIndex2);
|
||||
|
||||
if (AKHAN == GetRace(static_cast<unsigned char>(InfoSt->Class)))
|
||||
{
|
||||
if (JobLevel::JOB_CHANGE_1ST == GetJobLevel(static_cast<unsigned char>(InfoSt->Class)))
|
||||
{
|
||||
InfoSt->IP += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
InfoSt->IP += 2;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char CClass::GetRequiredIP(unsigned short usClass, unsigned char cType)
|
||||
{
|
||||
if (usClass >= MAX_CLASS || cType >= StatusType::MAX_TYPE) { return 0xFF; }
|
||||
|
||||
if (ClassTable[usClass].m_eJobLevel == JOB_CHANGE_1ST)
|
||||
{
|
||||
return (ClassTable[usClass].m_eIncrementType[0] == cType ||
|
||||
ClassTable[usClass].m_eIncrementType[1] == cType) ? 2 : 1;
|
||||
}
|
||||
|
||||
for (int nClassIndex = 0; nClassIndex < MAX_CLASS; nClassIndex++)
|
||||
{
|
||||
if (ClassTable[nClassIndex].m_eJobType == usClass)
|
||||
{
|
||||
if (ClassTable[nClassIndex].m_eIncrementType[0] == cType ||
|
||||
ClassTable[nClassIndex].m_eIncrementType[1] == cType)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool CClass::JobChange(CharacterDBData* DBData, unsigned char cClassType)
|
||||
{
|
||||
if (DBData->m_Info.Level < 10) { return false; }
|
||||
|
||||
switch (m_eJobLevel)
|
||||
{
|
||||
case DEFAULT_CLASS: return DowngradeClass(DBData, cClassType);
|
||||
case JOB_CHANGE_1ST: return UpgradeClass(DBData, cClassType);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CClass::UpgradeClass(CharacterDBData* DBData, unsigned char cClassType)
|
||||
{
|
||||
if (DBData->m_Info.Class != ClassTable[cClassType].m_ePrevJobType ||
|
||||
ClassTable[DBData->m_Info.Class].m_eJobLevel != DEFAULT_CLASS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// ȯ<><C8AF><EFBFBD>Ǵ<EFBFBD> IP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
unsigned short StatusA = 0;
|
||||
unsigned short StatusB = 0;
|
||||
unsigned short StatusC = 0;
|
||||
|
||||
switch (cClassType)
|
||||
{
|
||||
// <20>ΰ<EFBFBD>
|
||||
case Defender:
|
||||
DBData->m_Info.STR += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f);
|
||||
DBData->m_Info.CON += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
|
||||
StatusA = DBData->m_Info.STR - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.CON - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.DEX + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Defender;
|
||||
break;
|
||||
|
||||
case Warrior:
|
||||
DBData->m_Info.STR += DBData->m_Info.Level - 1;
|
||||
|
||||
StatusA = DBData->m_Info.STR - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.CON - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.DEX + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Warrior;
|
||||
break;
|
||||
|
||||
case Assassin:
|
||||
DBData->m_Info.DEX += DBData->m_Info.Level - 1;
|
||||
|
||||
StatusA = DBData->m_Info.DEX - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.STR - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.CON + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Assassin;
|
||||
break;
|
||||
|
||||
case Archer:
|
||||
DBData->m_Info.DEX += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f);
|
||||
DBData->m_Info.STR += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
|
||||
StatusA = DBData->m_Info.DEX - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.STR - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.CON + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Archer;
|
||||
break;
|
||||
|
||||
case Sorcerer:
|
||||
DBData->m_Info.INT += DBData->m_Info.Level - 1;
|
||||
|
||||
StatusA = DBData->m_Info.INT - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.DEX - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.CON + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Sorcerer;
|
||||
break;
|
||||
|
||||
case Enchanter:
|
||||
DBData->m_Info.INT += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f);
|
||||
DBData->m_Info.DEX += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
|
||||
StatusA = DBData->m_Info.INT - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.DEX - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.CON + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Enchanter;
|
||||
break;
|
||||
|
||||
case Priest:
|
||||
DBData->m_Info.WIS += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f);
|
||||
DBData->m_Info.CON += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
|
||||
StatusA = DBData->m_Info.WIS - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.CON - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.DEX + DBData->m_Info.INT - 60;
|
||||
|
||||
DBData->m_Info.Class = Priest;
|
||||
break;
|
||||
|
||||
case Cleric:
|
||||
DBData->m_Info.WIS += DBData->m_Info.Level - 1;
|
||||
|
||||
StatusA = DBData->m_Info.WIS - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.CON - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.DEX + DBData->m_Info.INT - 60;
|
||||
|
||||
DBData->m_Info.Class = Cleric;
|
||||
break;
|
||||
|
||||
// <20><>ĭ
|
||||
case Templar:
|
||||
DBData->m_Info.STR += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
DBData->m_Info.CON += static_cast<int>((DBData->m_Info.Level - 1) * 1.5f);
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.STR - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.CON - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.DEX + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Templar;
|
||||
break;
|
||||
|
||||
case Attacker:
|
||||
DBData->m_Info.STR += DBData->m_Info.Level - 1;
|
||||
DBData->m_Info.CON += DBData->m_Info.Level - 1;
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.STR - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.CON - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.DEX + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Attacker;
|
||||
break;
|
||||
|
||||
case Gunner:
|
||||
DBData->m_Info.DEX += static_cast<int>((DBData->m_Info.Level - 1) * 1.5f);
|
||||
DBData->m_Info.STR += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f + 0.5f);
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.DEX - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.STR - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.CON + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = Gunner;
|
||||
break;
|
||||
|
||||
case RuneOff:
|
||||
DBData->m_Info.INT += (DBData->m_Info.Level - 1) * 2;
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.INT - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.DEX - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.CON + DBData->m_Info.WIS - 60;
|
||||
|
||||
DBData->m_Info.Class = RuneOff;
|
||||
break;
|
||||
|
||||
case LifeOff:
|
||||
DBData->m_Info.WIS += (DBData->m_Info.Level - 1) * 2;
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.WIS - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.DEX - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.STR + DBData->m_Info.CON + DBData->m_Info.INT - 60;
|
||||
|
||||
DBData->m_Info.Class = LifeOff;
|
||||
break;
|
||||
|
||||
case ShadowOff:
|
||||
DBData->m_Info.STR += DBData->m_Info.Level - 1;
|
||||
DBData->m_Info.DEX += DBData->m_Info.Level - 1;
|
||||
|
||||
StatusA = DBData->m_Info.DEX - (20 + (DBData->m_Info.Level - 1) * 2);
|
||||
StatusB = DBData->m_Info.STR - (20 + DBData->m_Info.Level - 1);
|
||||
StatusC = DBData->m_Info.CON + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
|
||||
/*
|
||||
DBData->m_Info.STR += static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f);
|
||||
DBData->m_Info.DEX += static_cast<int>((DBData->m_Info.Level - 1) / 2.0f);
|
||||
DBData->m_Info.IP += (DBData->m_Info.Level - 1) * 2;
|
||||
|
||||
StatusA = DBData->m_Info.STR - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f));
|
||||
StatusB = DBData->m_Info.DEX - (20 + static_cast<int>((DBData->m_Info.Level - 1) * 1.5f + 0.5f));
|
||||
StatusC = DBData->m_Info.CON + DBData->m_Info.INT + DBData->m_Info.WIS - 60;
|
||||
*/
|
||||
DBData->m_Info.Class = ShadowOff;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
DBData->m_Info.IP += 10 + (DBData->m_Info.Level - 1) * 2 - ((StatusA + StatusB) * 2 + StatusC) - DBData->m_Info.IP;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CClass::DowngradeClass(CharacterDBData* DBData, unsigned char cClassType)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ųʸ<C5B3> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
if (Gunner != DBData->m_Info.Class) { return false; }
|
||||
|
||||
if (cClassType != ClassTable[DBData->m_Info.Class].m_ePrevJobType ||
|
||||
ClassTable[DBData->m_Info.Class].m_eJobLevel != JOB_CHANGE_1ST)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 10% <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
DBData->m_Info.Level -= static_cast<char>(DBData->m_Info.Level * 0.1f);
|
||||
DBData->m_Info.Level = max(DBData->m_Info.Level, 10);
|
||||
DBData->m_Info.Exp = 0;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> 0<><30> <20>ȴ<EFBFBD>.
|
||||
DBData->m_Info.Fame = 0;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD>ȴ<EFBFBD>.
|
||||
switch (cClassType)
|
||||
{
|
||||
case Combatant:
|
||||
DBData->m_Info.STR = 20 + DBData->m_Info.Level - 1;
|
||||
DBData->m_Info.DEX = 20;
|
||||
DBData->m_Info.CON = 20;
|
||||
DBData->m_Info.INT = 20;
|
||||
DBData->m_Info.WIS = 20;
|
||||
|
||||
DBData->m_Info.Class = Combatant;
|
||||
DBData->m_Info.IP = 10;
|
||||
break;
|
||||
|
||||
default: return false;
|
||||
}
|
||||
|
||||
// <20><>ų, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
DBData->m_Skill = SKILL::SKILL();
|
||||
DBData->m_Quick = QUICK::QUICK();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CClass::InitializeClass(CharacterDBData* DBData, unsigned char cClassType)
|
||||
{
|
||||
if (ClassTable[cClassType].m_eJobLevel != DEFAULT_CLASS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 10% <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
DBData->m_Info.Level = 1;
|
||||
DBData->m_Info.Exp = 0;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> 0<><30> <20>ȴ<EFBFBD>.
|
||||
DBData->m_Info.Fame = 0;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD>ȴ<EFBFBD>.
|
||||
DBData->m_Info.STR = 20;
|
||||
DBData->m_Info.DEX = 20;
|
||||
DBData->m_Info.CON = 20;
|
||||
DBData->m_Info.INT = 20;
|
||||
DBData->m_Info.WIS = 20;
|
||||
DBData->m_Info.IP = 10;
|
||||
DBData->m_Info.Class = cClassType;
|
||||
|
||||
// <20><>ų, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
||||
DBData->m_Skill = SKILL::SKILL();
|
||||
DBData->m_Quick = QUICK::QUICK();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CClass::CheckState(ChState& State, unsigned char cLevel)
|
||||
{
|
||||
unsigned short wTIP = State.m_wIP;
|
||||
|
||||
switch (m_eJobType)
|
||||
{
|
||||
case Fighter:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Rogue:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Mage:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Acolyte:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20 - (cLevel - 1)) * 2;
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Defender:
|
||||
wTIP += (State.m_wSTR - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Warrior:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Assassin:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Archer:
|
||||
wTIP += (State.m_wSTR - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Sorcerer:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Enchanter:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Priest:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Cleric:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20 - (cLevel - 1) * 2) * 2;
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Combatant:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > 10) { return false; }
|
||||
break;
|
||||
|
||||
case Officiator:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > 10) { return false; }
|
||||
break;
|
||||
|
||||
case Templar:
|
||||
wTIP += (State.m_wSTR - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Attacker:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wDEX - 20);
|
||||
wTIP += (State.m_wCON - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case Gunner:
|
||||
wTIP += (State.m_wSTR - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case RuneOff:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case LifeOff:
|
||||
wTIP += (State.m_wSTR - 20);
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20 - (cLevel - 1) * 2) * 2;
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
break;
|
||||
|
||||
case ShadowOff:
|
||||
wTIP += (State.m_wSTR - 20 - (cLevel - 1) * 1) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - (cLevel - 1) * 2) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
|
||||
/*
|
||||
wTIP += (State.m_wSTR - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f + 0.5f)) * 2;
|
||||
wTIP += (State.m_wDEX - 20 - static_cast<unsigned short>((cLevel - 1) * 1.5f)) * 2;
|
||||
wTIP += (State.m_wCON - 20);
|
||||
wTIP += (State.m_wINT - 20);
|
||||
wTIP += (State.m_wWIS - 20);
|
||||
|
||||
if (wTIP > (10 + (cLevel - 1) * 2)) { return false; }
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CClass::CheckMinState(ChState& State, unsigned char cLevel)
|
||||
{
|
||||
if (State.m_wSTR < GetMinState(StatusType::STR, cLevel)) { return false; }
|
||||
if (State.m_wDEX < GetMinState(StatusType::DEX, cLevel)) { return false; }
|
||||
if (State.m_wCON < GetMinState(StatusType::CON, cLevel)) { return false; }
|
||||
if (State.m_wINT < GetMinState(StatusType::INT, cLevel)) { return false; }
|
||||
if (State.m_wWIS < GetMinState(StatusType::WIS, cLevel)) { return false; }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned short CClass::GetMinState(StatusType eType, unsigned char cLevel)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20>⺻<EFBFBD><E2BABB>
|
||||
unsigned short wResult = 20;
|
||||
|
||||
cLevel = cLevel - 1;
|
||||
|
||||
if (eType == m_eIncrementType[0] || eType == m_eIncrementType[1])
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ȱ<EFBFBD><C8B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if (false == m_bLevelSwap)
|
||||
{
|
||||
if (eType == m_eIncrementType[0])
|
||||
{
|
||||
wResult += cLevel * m_cIncrementValue[0];
|
||||
}
|
||||
|
||||
if (eType == m_eIncrementType[1])
|
||||
{
|
||||
wResult += cLevel * m_cIncrementValue[1];
|
||||
}
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
else
|
||||
{
|
||||
if (eType == m_eIncrementType[0])
|
||||
{
|
||||
wResult += static_cast<unsigned short>(cLevel * 1.5f);
|
||||
}
|
||||
|
||||
if (eType == m_eIncrementType[1])
|
||||
{
|
||||
wResult += static_cast<unsigned short>(cLevel * 1.5f + 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wResult;
|
||||
}
|
||||
|
||||
CClass::JobLevel CClass::GetJobLevel(unsigned char cClass)
|
||||
{
|
||||
if (cClass >= MAX_CLASS) { return DEFAULT_CLASS; }
|
||||
return ClassTable[cClass].m_eJobLevel;
|
||||
}
|
||||
|
||||
unsigned char CClass::GetPreviousJob(unsigned char cClass)
|
||||
{
|
||||
if (cClass >= MAX_CLASS) { return NONE_JOB; }
|
||||
return ClassTable[cClass].m_ePrevJobType;
|
||||
}
|
||||
|
||||
CClass::RaceType CClass::GetRace(unsigned char cClass)
|
||||
{
|
||||
if (cClass >= MAX_CLASS) { return MAX_RACE; }
|
||||
return ClassTable[cClass].m_eRace;
|
||||
}
|
||||
120
Client/GlobalScript/Creature/Character/CharacterClass.h
Normal file
120
Client/GlobalScript/Creature/Character/CharacterClass.h
Normal file
@@ -0,0 +1,120 @@
|
||||
#ifndef _CHARACTER_CLASS_H_
|
||||
#define _CHARACTER_CLASS_H_
|
||||
|
||||
#include <DB/DBDefine.h>
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
struct CharacterDBData;
|
||||
struct ChState;
|
||||
|
||||
class CClass
|
||||
{
|
||||
public:
|
||||
|
||||
enum JobType
|
||||
{
|
||||
NONE_JOB = 0,
|
||||
|
||||
// <20>ΰ<EFBFBD> <20>⺻Ŭ<E2BABB><C5AC><EFBFBD><EFBFBD>
|
||||
Fighter = 1, Rogue = 2,
|
||||
Mage = 3, Acolyte = 4,
|
||||
|
||||
// <20>ΰ<EFBFBD> 1stŬ<74><C5AC><EFBFBD><EFBFBD>
|
||||
Defender = 5, Warrior = 6,
|
||||
Assassin = 7, Archer = 8,
|
||||
Sorcerer = 9, Enchanter = 10,
|
||||
Priest = 11, Cleric = 12,
|
||||
|
||||
// <20><>ĭ <20>⺻Ŭ<E2BABB><C5AC><EFBFBD><EFBFBD>
|
||||
Combatant = 17, Officiator = 18,
|
||||
|
||||
// <20><>ĭ 1stŬ<74><C5AC><EFBFBD><EFBFBD>
|
||||
Templar = 19, Attacker = 20,
|
||||
Gunner = 21, RuneOff = 22,
|
||||
LifeOff = 23, ShadowOff = 24,
|
||||
|
||||
MAX_CLASS = 25
|
||||
};
|
||||
|
||||
enum StatusType
|
||||
{
|
||||
NONE_STAT = 0,
|
||||
|
||||
STR = 1,
|
||||
DEX = 2,
|
||||
CON = 3,
|
||||
INT = 4,
|
||||
WIS = 5,
|
||||
|
||||
MAX_TYPE = 6
|
||||
};
|
||||
|
||||
enum JobLevel
|
||||
{
|
||||
NONE_CLASS = 0,
|
||||
DEFAULT_CLASS = 1,
|
||||
JOB_CHANGE_1ST = 2
|
||||
};
|
||||
|
||||
enum RaceType
|
||||
{
|
||||
HUMAN = 0,
|
||||
AKHAN = 1,
|
||||
MAX_RACE = 2
|
||||
};
|
||||
|
||||
CClass(const JobType eJobType, const JobType ePrevJobType, const JobLevel eJobLevel, const RaceType eRace,
|
||||
const StatusType eType1, const unsigned char cIncrement1,
|
||||
const StatusType eType2, const unsigned char cIncrement2,
|
||||
const bool bLevelSwap);
|
||||
|
||||
CClass();
|
||||
|
||||
void LevelUp(CHAR_INFOST* InfoSt);
|
||||
bool JobChange(CharacterDBData* DBData, unsigned char cClassType);
|
||||
bool UpgradeClass(CharacterDBData* DBData, unsigned char cClassType);
|
||||
bool DowngradeClass(CharacterDBData* DBData, unsigned char cClassType);
|
||||
bool InitializeClass(CharacterDBData* DBData, unsigned char cClassType); // <20><><EFBFBD><EFBFBD> 1<><31> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
bool CheckState(ChState& State, unsigned char cLevel);
|
||||
bool CheckMinState(ChState& State, unsigned char cLevel);
|
||||
unsigned short GetMinState(StatusType eType, unsigned char cLevel);
|
||||
|
||||
static JobLevel GetJobLevel(unsigned char cClass);
|
||||
static unsigned char GetPreviousJob(unsigned char cClass);
|
||||
static unsigned char GetRequiredIP(unsigned short usClass, unsigned char cType);
|
||||
static RaceType GetRace(unsigned char cClass);
|
||||
|
||||
protected:
|
||||
|
||||
StatusType m_eIncrementType[2]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20>ɷ<EFBFBD>ġ Ÿ<><C5B8>
|
||||
unsigned char m_cIncrementValue[2]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20>ɷ<EFBFBD>ġ <20><>
|
||||
|
||||
JobType m_eJobType; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
JobType m_ePrevJobType; // <20>ٷ<EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
JobLevel m_eJobLevel; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
RaceType m_eRace; // <20>Ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
bool m_bLevelSwap; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0>鼭 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (¦<><C2A6> 2/1 <20><><EFBFBD><EFBFBD><EFBFBD≯<EFBFBD> Ȧ<><C8A6> 1/2 <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
inline void IncrementByType(CHAR_INFOST* InfoSt,
|
||||
unsigned char cTypeIndex, unsigned char cIncrementIndex);
|
||||
};
|
||||
|
||||
extern CClass ClassTable[CClass::MAX_CLASS];
|
||||
|
||||
|
||||
inline void CClass::IncrementByType(CHAR_INFOST* InfoSt,
|
||||
unsigned char cTypeIndex, unsigned char cIncrementIndex)
|
||||
{
|
||||
switch(m_eIncrementType[cTypeIndex]) {
|
||||
case StatusType::STR: InfoSt->STR += m_cIncrementValue[cIncrementIndex]; break;
|
||||
case StatusType::DEX: InfoSt->DEX += m_cIncrementValue[cIncrementIndex]; break;
|
||||
case StatusType::CON: InfoSt->CON += m_cIncrementValue[cIncrementIndex]; break;
|
||||
case StatusType::INT: InfoSt->INT += m_cIncrementValue[cIncrementIndex]; break;
|
||||
case StatusType::WIS: InfoSt->WIS += m_cIncrementValue[cIncrementIndex]; break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "stdafx.h"
|
||||
#include "CharacterStructure.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
|
||||
CharacterFightInfo::CharacterFightInfo()
|
||||
: m_pDuelOpponent(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
50
Client/GlobalScript/Creature/Character/CharacterStructure.h
Normal file
50
Client/GlobalScript/Creature/Character/CharacterStructure.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef _CHARACTER_STRUCTURE_H_
|
||||
#define _CHARACTER_STRUCTURE_H_
|
||||
|
||||
#include <Creature/CreatureStructure.h>
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CCharacter;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// DB <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>о<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>. <20>߰<EFBFBD><DFB0>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> DB<44><42> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
// <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD≯<EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>߿<EFBFBD><DFBF><EFBFBD> <20>ǵ帮<C7B5><E5B8AE> <20>ʴ´<CAB4>. ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> ... )
|
||||
|
||||
struct CharacterDBData
|
||||
{
|
||||
CHAR_INFOST m_Info; // <20>ܸ<EFBFBD>, <20≯<EFBFBD>, <20>ɷ<EFBFBD>ġ, hp,mp <20><> <20>⺻ <20><><EFBFBD><EFBFBD>
|
||||
CHAR_POS m_Pos; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><><EFBFBD><EFBFBD> ( Respawn <20><><EFBFBD><EFBFBD> )
|
||||
SKILL m_Skill;
|
||||
QUICK m_Quick;
|
||||
SPELL m_Spell;
|
||||
unsigned char m_cAdminLevel;
|
||||
};
|
||||
typedef CharacterDBData* LPCharacterDBData;
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP<49><50> <20><><EFBFBD><EFBFBD>.
|
||||
struct ConnectInfo
|
||||
{
|
||||
SOCKADDR_IN m_siAgentHost; // agent UDP address of host
|
||||
SOCKADDR_IN m_siPrivateHost; // private UDP address of host
|
||||
SOCKADDR_IN m_siPublicHost; // public UDP address of host
|
||||
};
|
||||
typedef ConnectInfo* LPConnectInfo;
|
||||
|
||||
|
||||
// ij<><C4B3><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>)
|
||||
struct CharacterFightInfo
|
||||
{
|
||||
CCharacter* m_pDuelOpponent;
|
||||
|
||||
POS m_Pos;
|
||||
unsigned long m_dwCellID;
|
||||
|
||||
__int64 m_nRestoreExp; // <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ȱ<EFBFBD><C8B0> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
||||
|
||||
CharacterFightInfo();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
1600
Client/GlobalScript/Creature/CreatureStructure.cpp
Normal file
1600
Client/GlobalScript/Creature/CreatureStructure.cpp
Normal file
File diff suppressed because it is too large
Load Diff
535
Client/GlobalScript/Creature/CreatureStructure.h
Normal file
535
Client/GlobalScript/Creature/CreatureStructure.h
Normal file
@@ -0,0 +1,535 @@
|
||||
#ifndef _CREATURE_STRUCTURE_H_
|
||||
#define _CREATURE_STRUCTURE_H_
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <DB/DBDefine.h>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
struct CreatureStatus;
|
||||
struct CharacterStatus;
|
||||
struct SKILL;
|
||||
|
||||
namespace Item
|
||||
{
|
||||
class CItem;
|
||||
class CEquipment;
|
||||
|
||||
namespace EquipType
|
||||
{
|
||||
enum DoubleSwordType;
|
||||
}
|
||||
}
|
||||
|
||||
namespace BattleInclination
|
||||
{
|
||||
enum Const
|
||||
{
|
||||
IS_PEACEMODE = ( 1 << 0 ), // <20><>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
IS_SAFETY_ZONE = ( 1 << 1 ), // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ <20><> <20><><EFBFBD>ο<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
HAS_CAMP = ( 1 << 2 ), // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>忡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
HAS_DEVELOPING_CAMP = ( 1 << 3 ), // <20>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>忡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
IS_CASTLE_OBJECT = ( 1 << 4 ), // <20><><EFBFBD><EFBFBD> Object<63≯鼭 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>츸 <20><><EFBFBD><EFBFBD>
|
||||
IS_CASTLE_NPC = ( 1 << 5 ), // <20><><EFBFBD><EFBFBD> Object<63≯鼭 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> NPC <20><> <20><EFBFBD> NPC
|
||||
IS_GOD_MODE = ( 1 << 6 ), // G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
IS_TEAM_BATTLE = ( 1 << 7 ), // <20><><EFBFBD><EFBFBD>Ʋ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum VSType
|
||||
{
|
||||
VS_CHARACTER = ( 1 << 0 ), // PvP
|
||||
VS_PARTY = ( 1 << 1 ), // <20><>Ƽ<EFBFBD><C6BC> <20><>Ʋ
|
||||
VS_GUILD = ( 1 << 2 ), // <20><><EFBFBD>尣 <20><>Ʋ
|
||||
};
|
||||
|
||||
// <20>Ǿƽĺ<C6BD><C4BA><EFBFBD> <20><>ü<EFBFBD><C3BC> <20>Ǵ<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>,
|
||||
// <20><><EFBFBD>ε<EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD> <20><>, ä<>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>κе<CEBA> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE>Ѵ<EFBFBD>.
|
||||
struct CharData
|
||||
{
|
||||
bool IsPeaceMode(void) const { return 0 != (m_cFlags & IS_PEACEMODE); } // <20><>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool IsSafetyZone(void) const { return 0 != (m_cFlags & IS_SAFETY_ZONE); } // <20><><EFBFBD><EFBFBD> Safety<74><79> <20><><EFBFBD>ο<EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD>
|
||||
bool HasCamp(void) const { return 0 != (m_cFlags & HAS_CAMP); } // <20><><EFBFBD><EFBFBD> <20><><EFBFBD>尡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD>...
|
||||
bool HasDevelopingCamp(void) const { return 0 != (m_cFlags & HAS_DEVELOPING_CAMP); } // <20><><EFBFBD><EFBFBD> <20><><EFBFBD>尡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
||||
bool IsCastleObject(void) const { return 0 != (m_cFlags & IS_CASTLE_OBJECT); } // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
||||
bool IsCastleNPC(void) const { return 0 != (m_cFlags & IS_CASTLE_NPC); } // <20><><EFBFBD><EFBFBD> NPC <20><> <20><><EFBFBD><EFBFBD>
|
||||
bool IsGODMode(void) const { return 0 != (m_cFlags & IS_GOD_MODE); } // G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool IsTeamBattle(void) const { return 0 != (m_cFlags & IS_TEAM_BATTLE); } // <20><><EFBFBD><EFBFBD>Ʋ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
void SetPeaceMode(bool bPeaceMode) { m_cFlags |= bPeaceMode ? IS_PEACEMODE : 0; }
|
||||
void SetSafetyZone(bool bInSafetyZone) { m_cFlags |= bInSafetyZone ? IS_SAFETY_ZONE : 0; }
|
||||
void SetHasCamp(bool bHasCamp) { m_cFlags |= bHasCamp ? HAS_CAMP : 0; }
|
||||
void SetHasDevelopingCamp(bool bHasDevelopingCamp) { m_cFlags |= bHasDevelopingCamp ? HAS_DEVELOPING_CAMP : 0; }
|
||||
void SetCastleObject(bool bCastleObject) { m_cFlags |= bCastleObject ? IS_CASTLE_OBJECT : 0; }
|
||||
void SetCastleNPC(bool bCastleNPC) { m_cFlags |= bCastleNPC ? IS_CASTLE_NPC : 0; }
|
||||
void SetGODMode(bool bGODMode) { m_cFlags |= bGODMode ? IS_GOD_MODE : 0; }
|
||||
void SetTeamBattle(bool bTeamBattle) { m_cFlags |= bTeamBattle ? IS_TEAM_BATTLE : 0; }
|
||||
|
||||
unsigned long m_dwCID; // ij<><C4B3><EFBFBD><EFBFBD> CID
|
||||
unsigned long m_dwGID; // ij<><C4B3><EFBFBD><EFBFBD> GID
|
||||
unsigned long m_dwCastleID; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ID<49><44> <20>ִ´<D6B4>.
|
||||
|
||||
unsigned char m_cSiegeState; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20>ִ´<D6B4>.
|
||||
unsigned char m_cNation; // ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned char m_cAdminLevel; // <20><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD>
|
||||
unsigned char m_cFlags; // <20><>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned long m_dwPID; // ij<><C4B3><EFBFBD>Ϳ<EFBFBD> <20><>Ƽ <20><><EFBFBD><EFBFBD>
|
||||
unsigned char m_cTacticsFlag; // ij<><C4B3><EFBFBD>Ϳ<EFBFBD> <20>뺴 <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_cRealmWarFlag;
|
||||
unsigned char m_cGuildWarFlag;
|
||||
|
||||
unsigned char m_cCreatureType; // ũ<><C5A9><EFBFBD><EFBFBD> Ÿ<><C5B8>
|
||||
unsigned short m_wObjectType; // <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned short m_wKind; // <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_cRide; // <20><><EFBFBD> ž<><C5BE> <20><><EFBFBD><EFBFBD>.
|
||||
};
|
||||
|
||||
// <20>Ǿƽĺ<C6BD><C4BA><EFBFBD> <20><><EFBFBD>̴<EFBFBD> ij<><C4B3><EFBFBD>Ͱ<EFBFBD><CDB0><EFBFBD> <20><><EFBFBD><EFBFBD> (<28>ϴ<EFBFBD><CFB4><EFBFBD> ä<><C3A4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
struct RelationData
|
||||
{
|
||||
unsigned char m_cVSFlag; // PvP, <20><><EFBFBD><EFBFBD>Ʋ <20><><EFBFBD><EFBFBD>
|
||||
bool m_bHostileGuild; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD>?
|
||||
};
|
||||
};
|
||||
|
||||
namespace Creature
|
||||
{
|
||||
enum Const
|
||||
{
|
||||
PC_MAX_LEVEL = 100, // ij<><C4B3><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
MONSTER_MAX_LEVEL = 150, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// edith 2008.02.27 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LEVEL_ABLE_WAR = 1 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ּ<EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
};
|
||||
|
||||
enum IdentifyCIDBit
|
||||
{
|
||||
MONSTER_KIND_BIT = 0x0000FFFF,
|
||||
|
||||
MONSTER_BIT = 0x80000000,
|
||||
NPC_BIT = 0x40000000,
|
||||
SIEGE_OBJECT_BIT = 0x10000000,
|
||||
SUMMON_MONSTER_BIT = 0xA0000000, // MONSTER_BIT (0x80000000) + 0x20000000
|
||||
NPC_LINK_BIT = 0x50000000, // <20><>ȯ <20>Ϸ<EFBFBD><CFB7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>Ʈ<EFBFBD><C6AE> <20><>Ʈ<EFBFBD><C6AE> NPC<50><43> <20><>ũ<EFBFBD>Ǿ<EFBFBD> <20><DEB4><DEBB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
// NPC_BIT (0x40000000) + 0x10000000
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> KID (MonsterStructure.h <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ǵǾ<C7B5> <20><><EFBFBD><EFBFBD>)
|
||||
MIN_STATUE_KID = 4001,
|
||||
MAX_STATUE_KID = 4070
|
||||
};
|
||||
|
||||
enum CreatureType
|
||||
{
|
||||
CT_PC = 0,
|
||||
CT_NPC = 1,
|
||||
CT_MONSTER = 2,
|
||||
CT_SUMMON = 3,
|
||||
CT_STRUCT = 4,
|
||||
CT_SIEGE_OBJECT = 5,
|
||||
CT_NONE_TYPE = 99
|
||||
};
|
||||
|
||||
enum Nation
|
||||
{
|
||||
STATELESS = 0, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, NPC)
|
||||
KARTERANT = 1, // ī<><C4AB><EFBFBD><EFBFBD>Ʈ
|
||||
MERKADIA = 2, // <20><EFBFBD>ī<EFBFBD><C4AB><EFBFBD><EFBFBD>
|
||||
ALMIGHTY_PIRATE = 3, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
MAX_NATION = 4
|
||||
};
|
||||
|
||||
enum WarFlag
|
||||
{
|
||||
WAR_OFF = 0, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
WAR_ON = 1, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
WAR_INSTANCE = 2 // <20>ν<EFBFBD><CEBD>Ͻ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum StatusType
|
||||
{
|
||||
RIGHT_PASSIVE_TYPE = 0, // <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CreatureStatus<75><73> <20>ٷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.)
|
||||
LEFT_PASSIVE_TYPE = 1, // <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28>̵<EFBFBD><CCB5><EFBFBD>)
|
||||
RIGHT_NON_PASSIVE_TYPE = 2, // <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><>ų)
|
||||
LEFT_NON_PASSIVE_TYPE = 3, // <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><>ų<EFBFBD><C5B3>)<29><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><>ų)
|
||||
|
||||
MAX_STATUS_TYPE = 4
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> Creature <20>Ǻ<EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD>
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CRYLGameData::GetClientIdentity() <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>!!
|
||||
static bool IsSummonMonster(unsigned long dwCID)
|
||||
{
|
||||
return (Creature::SUMMON_MONSTER_BIT == (dwCID & Creature::SUMMON_MONSTER_BIT));
|
||||
}
|
||||
|
||||
static bool IsStruct(unsigned long dwCID)
|
||||
{
|
||||
unsigned short wKID = static_cast<unsigned short>(dwCID & Creature::MONSTER_KIND_BIT);
|
||||
return (wKID >= MIN_STATUE_KID && wKID <= MAX_STATUE_KID);
|
||||
}
|
||||
|
||||
static bool IsLinkedNPC(unsigned long dwCID)
|
||||
{
|
||||
return (Creature::NPC_LINK_BIT == (dwCID & Creature::NPC_LINK_BIT));
|
||||
}
|
||||
|
||||
static CreatureType GetCreatureType(unsigned long dwCID)
|
||||
{
|
||||
if (dwCID & Creature::MONSTER_BIT)
|
||||
{
|
||||
if (IsSummonMonster(dwCID)) return Creature::CT_SUMMON;
|
||||
else if (IsStruct(dwCID)) return Creature::CT_STRUCT;
|
||||
|
||||
return Creature::CT_MONSTER;
|
||||
}
|
||||
else if (dwCID & Creature::NPC_BIT) return Creature::CT_NPC;
|
||||
else if (dwCID & Creature::SIEGE_OBJECT_BIT) return Creature::CT_SIEGE_OBJECT;
|
||||
|
||||
return Creature::CT_PC;
|
||||
}
|
||||
|
||||
inline static const char* GetNationName(unsigned char cNation)
|
||||
{
|
||||
switch(cNation)
|
||||
{
|
||||
case KARTERANT: return "KARTERANT";
|
||||
case MERKADIA: return "MERKADIA";
|
||||
case ALMIGHTY_PIRATE: return "ALMIGHTY_PIRATE";
|
||||
}
|
||||
|
||||
return "STATELESS";
|
||||
}
|
||||
|
||||
inline static const char* GetShortNationName(unsigned char cNation)
|
||||
{
|
||||
switch(cNation)
|
||||
{
|
||||
case KARTERANT: return "KR";
|
||||
case MERKADIA: return "ME";
|
||||
case ALMIGHTY_PIRATE: return "AP";
|
||||
}
|
||||
|
||||
return "ST";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ʽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
namespace EliteBonus
|
||||
{
|
||||
enum Const
|
||||
{
|
||||
MAX_BONUS_LEVEL = 10,
|
||||
MAX_BONUS_DROP_ITEM = 3
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD> <20><><EFBFBD>ŵǾ<C5B5><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>. (2004-09-17 by <20>ε<EFBFBD>)
|
||||
static short usBonusExp[MAX_BONUS_LEVEL] = {
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0,
|
||||
100 + 0
|
||||
};
|
||||
|
||||
static unsigned char usBonusItemDropRate[MAX_BONUS_LEVEL][MAX_BONUS_DROP_ITEM] = {
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
struct EliteBonusData
|
||||
{
|
||||
char m_cNation;
|
||||
unsigned char m_cLevel;
|
||||
|
||||
EliteBonusData();
|
||||
EliteBonusData(char cNation, unsigned char cLevel);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// <20><> <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
struct Position
|
||||
{
|
||||
float m_fPointX; // Point X <20><>ǥ
|
||||
float m_fPointY; // Point Y <20><>ǥ
|
||||
float m_fPointZ; // Point Z <20><>ǥ
|
||||
|
||||
inline Position();
|
||||
inline Position(const POS& Pos);
|
||||
inline Position(const Position& Pos);
|
||||
inline Position(float fPointX, float fPointY, float fPointZ);
|
||||
|
||||
inline POS PositionToPOS() const;
|
||||
|
||||
inline unsigned long GetDistance(const Position& rhs) const
|
||||
{
|
||||
return static_cast<unsigned long>(sqrt(
|
||||
(m_fPointX - rhs.m_fPointX) * (m_fPointX - rhs.m_fPointX) +
|
||||
(m_fPointY - rhs.m_fPointY) * (m_fPointY - rhs.m_fPointY) +
|
||||
(m_fPointZ - rhs.m_fPointZ) * (m_fPointZ - rhs.m_fPointZ)));
|
||||
}
|
||||
|
||||
inline unsigned long GetSquaredDistance(const Position& rhs) const
|
||||
{
|
||||
return static_cast<unsigned long>(
|
||||
(m_fPointX - rhs.m_fPointX) * (m_fPointX - rhs.m_fPointX) +
|
||||
(m_fPointY - rhs.m_fPointY) * (m_fPointY - rhs.m_fPointY) +
|
||||
(m_fPointZ - rhs.m_fPointZ) * (m_fPointZ - rhs.m_fPointZ));
|
||||
}
|
||||
|
||||
inline bool operator == (const Position& rhs) const
|
||||
{
|
||||
if ( m_fPointX == rhs.m_fPointX && m_fPointY == rhs.m_fPointY && m_fPointZ == rhs.m_fPointZ )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool operator != (const Position& rhs) const
|
||||
{
|
||||
if ( m_fPointX != rhs.m_fPointX || m_fPointY != rhs.m_fPointY || m_fPointZ != rhs.m_fPointZ )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
inline void operator () (const Position& rhs)
|
||||
{
|
||||
m_fPointX = rhs.m_fPointX;
|
||||
m_fPointY = rhs.m_fPointY;
|
||||
m_fPointZ = rhs.m_fPointZ;
|
||||
}
|
||||
};
|
||||
|
||||
inline Position::Position()
|
||||
: m_fPointX(0.0f), m_fPointY(0.0f), m_fPointZ(0.0f) { }
|
||||
|
||||
inline Position::Position(const POS& Pos)
|
||||
: m_fPointX(Pos.fPointX), m_fPointY(Pos.fPointY), m_fPointZ(Pos.fPointZ) { }
|
||||
|
||||
inline Position::Position(const Position& Pos)
|
||||
: m_fPointX(Pos.m_fPointX), m_fPointY(Pos.m_fPointY), m_fPointZ(Pos.m_fPointZ) { }
|
||||
|
||||
inline Position::Position(float fPointX, float fPointY, float fPointZ)
|
||||
: m_fPointX(fPointX), m_fPointY(fPointY), m_fPointZ(fPointZ) { }
|
||||
|
||||
inline POS Position::PositionToPOS() const
|
||||
{
|
||||
POS stPos;
|
||||
stPos.fPointX = m_fPointX;
|
||||
stPos.fPointY = m_fPointY;
|
||||
stPos.fPointZ = m_fPointZ;
|
||||
|
||||
return stPos;
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
struct MotionInfo
|
||||
{
|
||||
float m_fDirection; // <20>ٶ<D9B6> <20><><EFBFBD><EFBFBD>
|
||||
float m_fVelocity; // <20>ӵ<EFBFBD>
|
||||
unsigned short m_wAction; // <20><><EFBFBD>ϴ<EFBFBD> <20>ൿ
|
||||
unsigned long m_dwFrame; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, NPC<50><43> <20><><EFBFBD><EFBFBD> )
|
||||
|
||||
MotionInfo();
|
||||
};
|
||||
|
||||
|
||||
// <20><>æƮ <20><><EFBFBD><EFBFBD>
|
||||
struct EnchantInfo
|
||||
{
|
||||
enum
|
||||
{
|
||||
ULONG_BIT = 32, // unsigned long (32<33><32><EFBFBD><EFBFBD>Ʈ)
|
||||
MAX_ARRAY = 4 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> UCHAR_BIT * MAX_ARRAY
|
||||
};
|
||||
|
||||
unsigned long m_dwStatusFlag[MAX_ARRAY]; // æƮ/<2F><>æƮ <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
EnchantInfo();
|
||||
EnchantInfo( const EnchantInfo& Info ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
for( int i = 0 ; i < MAX_ARRAY ; ++i )
|
||||
{
|
||||
m_dwStatusFlag[ i ] = Info.m_dwStatusFlag[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
void SetFlag(unsigned char cSpellKind);
|
||||
void ResetFlag(unsigned char cSpellKind);
|
||||
void ClearFlag(void);
|
||||
|
||||
bool GetFlag(unsigned char cSpellKind) const;
|
||||
};
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> ȿ<><C8BF> <20><><EFBFBD><EFBFBD>
|
||||
struct CalculateDamageInfo
|
||||
{
|
||||
bool m_bForceDRC; // '<27><>'<27≯<EFBFBD> <20>⺻ DRC<52><43> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>߰<EFBFBD> DRC<52><43> <20><>ü
|
||||
|
||||
float m_fDRC; // <20>߰<EFBFBD> DRC
|
||||
short m_nOffenceRevision; // <20>߰<EFBFBD> <20><><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD>
|
||||
short m_nMinDamage; // <20>߰<EFBFBD> <20>ּҵ<D6BC><D2B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
short m_nMaxDamage; // <20>߰<EFBFBD> <20>ִ뵥<D6B4><EBB5A5><EFBFBD><EFBFBD>
|
||||
|
||||
CalculateDamageInfo()
|
||||
: m_bForceDRC(false), m_fDRC(0.0f), m_nOffenceRevision(0), m_nMinDamage(0), m_nMaxDamage(0)
|
||||
{ }
|
||||
|
||||
CalculateDamageInfo(bool bForceDRC, float fDRC, short nOffenceRevision, short nMinDamage, short nMaxDamage)
|
||||
: m_bForceDRC(bForceDRC), m_fDRC(fDRC),
|
||||
m_nOffenceRevision(nOffenceRevision), m_nMinDamage(nMinDamage), m_nMaxDamage(nMaxDamage)
|
||||
{ }
|
||||
};
|
||||
typedef CalculateDamageInfo* LPCalculateDamageInfo;
|
||||
|
||||
|
||||
// ij<><C4B3><EFBFBD>Ϳ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD>
|
||||
struct CharacterStatus
|
||||
{
|
||||
short m_nSTR; // ij<><C4B3><EFBFBD><EFBFBD> STR
|
||||
short m_nDEX; // ij<><C4B3><EFBFBD><EFBFBD> DEX
|
||||
short m_nCON; // ij<><C4B3><EFBFBD><EFBFBD> CON
|
||||
short m_nINT; // ij<><C4B3><EFBFBD><EFBFBD> INT
|
||||
short m_nWIS; // ij<><C4B3><EFBFBD><EFBFBD> WIS
|
||||
|
||||
CharacterStatus();
|
||||
CharacterStatus(CHAR_INFOST& characterDBData);
|
||||
void Init(CHAR_INFOST& characterDBData);
|
||||
};
|
||||
typedef CharacterStatus* LPCharacterStatus;
|
||||
|
||||
struct FightStatus
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28>ߺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
enum CalculateState
|
||||
{
|
||||
CS_NONE = 0, // <20>ʱ<EFBFBD>ȭ
|
||||
CS_BASE_INFO = 1, // <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CS_EQUIP_INFO = 2, // <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CS_ENCHANT_INFO = 3 // <20><>æƮ ȿ<><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
enum Const
|
||||
{
|
||||
MAX_INCHANT_HP = 15000,
|
||||
MAX_INCHANT_MP = 15000
|
||||
};
|
||||
|
||||
long m_lMinDamage; // <20>ּҵ<D6BC><D2B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
long m_lMaxDamage; // <20>ִ뵥<D6B4><EBB5A5><EFBFBD><EFBFBD>
|
||||
short m_wArmor; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
short m_wHitRate; // <20><><EFBFBD><EFBFBD>
|
||||
short m_wEvade; // ȸ<><C8B8>
|
||||
|
||||
unsigned short m_nMaxHP; // HP <20>ִ밪
|
||||
short m_wHPRegen; // HP ȸ<><C8B8>
|
||||
unsigned short m_nMaxMP; // MP <20>ִ밪
|
||||
short m_wMPRegen; // MP ȸ<><C8B8>
|
||||
|
||||
short m_wCritical; // ũ<><C5A9>Ƽ<EFBFBD><C6BC>
|
||||
short m_wBlock; // <20><><EFBFBD><EFBFBD>
|
||||
short m_wSpeed; // <20>ӵ<EFBFBD>
|
||||
short m_wCoolDownRevision; // <20><><EFBFBD>ٿ<D9BF><EEBAB8>
|
||||
short m_wSkillPoint; // <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD>Ʈ
|
||||
|
||||
short m_wMagicPower; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
short m_wMagicResist; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
int m_wLuck; // <20><><EFBFBD>
|
||||
|
||||
//--// start..
|
||||
short m_wFrost; // <20>ñ<EFBFBD>/<2F><><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD>
|
||||
short m_wFire; // <20><>/<2F><> <20>Ӽ<EFBFBD>
|
||||
short m_wElectro; // <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD>
|
||||
short m_wDarkness; // <20><><EFBFBD><EFBFBD>/<2F><> <20>Ӽ<EFBFBD>
|
||||
//--// end..
|
||||
|
||||
float m_fDefenceRate; // <20><><EFBFBD><EFBFBD>%
|
||||
float m_fCriticalMagnification; // ũ<><C5A9>Ƽ<EFBFBD>ù<EFBFBD><C3B9><EFBFBD>
|
||||
float m_fCriticalRate; // ũ<><C5A9>Ƽ<EFBFBD><C6BC>%
|
||||
float m_fBlockRate; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%
|
||||
float m_fSpeedRate; // <20>ӵ<EFBFBD>%
|
||||
float m_fCoolDownRevisionRate; // <20><><EFBFBD>ٿ<D9BF><EEBAB8>%
|
||||
float m_fMagicResistRate; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%
|
||||
|
||||
float m_fLuckResistRate; // <20><>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD>%
|
||||
|
||||
float m_fLevelExplosion; // <20><><EFBFBD><EFBFBD> <20>ͽ<EFBFBD><CDBD>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
unsigned char m_cCriticalType; // ũ<><C5A9>Ƽ<EFBFBD><C6BC> Ÿ<><C5B8>
|
||||
unsigned char m_cComboCount; // <20><><EFBFBD><EFBFBD> <20><EFBFBD> Ƚ<><C8BD>
|
||||
|
||||
unsigned char m_cCalculateState; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
FightStatus();
|
||||
|
||||
bool CalculateBaseInfo(const CharacterStatus& characterStatus, const unsigned short wLevel, const unsigned char cClass);
|
||||
|
||||
bool CalculateEquipInfo(const Item::CEquipment** ppEquip, const bool bFirstWeaponSlot, const bool bRightHand, const bool bRideFlag,
|
||||
const SKILL& skill, const unsigned char cLevel, const unsigned short wRiderAbility, const unsigned short wLuckAbility, const unsigned short wLevelAbility,
|
||||
const CharacterStatus& characterStatus, const unsigned char cClass, FightStatus& resultStatus, int& resultLuck) const;
|
||||
|
||||
bool CalculateEnchantInfo(const unsigned short* aryEnchantLevel, FightStatus& resultStatus) const;
|
||||
|
||||
|
||||
void CalculateSubStatus(void);
|
||||
|
||||
static bool CheckEquipable(const Item::CEquipment* lpEquip, const CharacterStatus& characterStatus,
|
||||
const unsigned char cClass, const unsigned char cLevel, const unsigned short wLevelAbility); //--//
|
||||
};
|
||||
|
||||
#pragma pack(8)
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// TODO : memory alignment <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>.
|
||||
// : 4byte<74><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> alignment <20><> <20>ǵ<EFBFBD><C7B5><EFBFBD> <20><> <20><>.
|
||||
// : <20><EFBFBD><DEB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD> ũ<>Ⱑ <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> short<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>.
|
||||
|
||||
// <20><><EFBFBD>⳪ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ɷ<EFBFBD>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD>ӻ<D3BB> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̰<EFBFBD><CCB0><EFBFBD><EFBFBD><EFBFBD> <20><>)
|
||||
struct CreatureStatus
|
||||
{
|
||||
__int64 m_nExp; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int m_nLevel; // <20><><EFBFBD><EFBFBD>
|
||||
unsigned short m_nNowHP; // <20><><EFBFBD><EFBFBD> HP
|
||||
unsigned short m_nNowMP; // <20><><EFBFBD><EFBFBD> MP (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ밪<D6B4><EBB0AA><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ)
|
||||
|
||||
FightStatus m_StatusInfo; // <20><><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̰<EFBFBD><CCB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CreatureStatus();
|
||||
CreatureStatus(CHAR_INFOST& characterDBData);
|
||||
void Init(CHAR_INFOST& characterDBData);
|
||||
};
|
||||
typedef CreatureStatus* LPCreatureStatus;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user