Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
226 lines
7.4 KiB
C++
226 lines
7.4 KiB
C++
// CharStatus.h: interface for the CCharStatus class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_CHARSTATUS_H__E6A8A3B4_7211_4E9F_85BE_2C83B5D9BC51__INCLUDED_)
|
|
#define AFX_CHARSTATUS_H__E6A8A3B4_7211_4E9F_85BE_2C83B5D9BC51__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "ItemInstance.h"
|
|
#include <windows.h>
|
|
#include <vector>
|
|
#include <list>
|
|
//#include "DefaultDef.h"
|
|
#include "DB\DBdefine.h"
|
|
|
|
#include "..\\GlobalScript\\Creature\\NPC\\NPCList.h"
|
|
|
|
using namespace std;
|
|
|
|
#define ITEM_FAILED 0xFFFFFFFFFFFFFFFF
|
|
#define ITEM_EMPTY 0xFEFFFFFFFFFFFFFF
|
|
|
|
#define STATUS_STR 0
|
|
#define STATUS_DEX 1
|
|
#define STATUS_CON 2
|
|
#define STATUS_INT 3
|
|
#define STATUS_WIS 4
|
|
|
|
typedef struct _FieldInstance : public FieldObject {
|
|
unsigned long m_dwInstanceID;
|
|
long m_lLifeTick;
|
|
} FieldInstance, *LPFieldInstance;
|
|
|
|
typedef struct QuestInstance
|
|
{
|
|
unsigned long m_dwQuestID;
|
|
unsigned long m_dwPresentPhase;
|
|
vector<unsigned long> m_lstTriggerCount;
|
|
LPQuestNode m_lpQuestScript;
|
|
LPPhaseNode m_lpPhaseScript;
|
|
|
|
BOOL StartPhase(unsigned long dwPhase);
|
|
BOOL StartTrigger(LPTriggerNode lpTrigger, BOOL bSuccess);
|
|
|
|
BOOL EventPhase(unsigned long dwPhase);
|
|
BOOL EventMsgBox(char *strWord);
|
|
} QuestInstance, *LPQuestInstance;
|
|
|
|
class CCharStatus
|
|
{
|
|
public:
|
|
LPTriggerNode GetTriggertoGeton(LPQuestInstance lpQuest, unsigned long *dwCount, vector3 vecPos);
|
|
LPTriggerNode GetTriggertoTalk(LPQuestInstance &lpQuest, unsigned long *dwCount, unsigned long dwChrID);
|
|
LPQuestInstance GetProcessQuest(unsigned short wQuestID);
|
|
BOOL GetCorrectClass(unsigned long dwClassFlag);
|
|
void ChantDisable(void);
|
|
void PayDepositPrice(unsigned short wSrcPos, unsigned short wDstPos);
|
|
void Destroy(void);
|
|
BOOL CheckStatus(void);
|
|
void SetActivateSkill(CItemInstance *lpUseSkill);
|
|
BOOL CheckUseSkill(void);
|
|
BOOL GetExistExchangeItem(void);
|
|
BOOL CheckItemByStatus(CItemInstance *lpItem);
|
|
void SetQuickSlot(CItemInstance *lpItem);
|
|
BOOL SetQuickSlotItemNumber(CItemInstance *lpItem);
|
|
unsigned long CheckUsePotion(CItemInstance *lpItem);
|
|
unsigned long CheckUseSkillBook(CItemInstance *lpItem);
|
|
long GetUseIP(unsigned long dwKindStatus);
|
|
unsigned long IsCheckClassforSkill(unsigned short wSkill);
|
|
BOOL IsCheckStatusforSkill(unsigned short wSkill);
|
|
BOOL CheckPartyMember(unsigned long dwChrID);
|
|
BOOL GetIsInstallSocket(CItemInstance *lpEquipItem, CItemInstance *lpSocketItem);
|
|
char *LogoutPartyPlayer(unsigned long dwChrID);
|
|
char *LoginPartyPlayer(unsigned long dwChrID, unsigned long dwServerID);
|
|
void AddPartyPlayer(unsigned long dwChrID, unsigned long dwServerID, char *strName);
|
|
void DeletePartyPlayer(unsigned long dwChrID);
|
|
void DestroyParty(void);
|
|
SKILLSLOT *GetSkillSlot(unsigned short wSkill);
|
|
|
|
void AddEquipItem(unsigned long dwPos, CItemInstance *AddItem, BOOL bSound = TRUE);
|
|
void AddInventoryItem(CItemInstance *AddItem, BOOL bSound = TRUE);
|
|
void AddDepositItem(CItemInstance *AddItem, BOOL bSound = TRUE);
|
|
void AddExchangeItem(CItemInstance *AddItem, BOOL bSelf = TRUE, BOOL bSound = TRUE);
|
|
void AddStreetTradeItem(CItemInstance *AddItem, BOOL bSound = TRUE);
|
|
|
|
void DeleteInventoryItem(CItemInstance *lpDelete);
|
|
void DeleteDepositItem(CItemInstance *lpDelete);
|
|
void DeleteExchangeItem(CItemInstance *lpDelete, BOOL bSelf = TRUE);
|
|
void DeleteStreetTradeItem(CItemInstance *lpDelete);
|
|
|
|
void CheckInvenField(unsigned long dwCommand, CItemInstance *lpItem);
|
|
void CheckDepositField(unsigned long dwCommand, CItemInstance *lpItem);
|
|
void CheckExchangeField(unsigned long dwCommand, CItemInstance *lpItem, BOOL bSelf = TRUE);
|
|
void CheckStreetTradeField(unsigned long dwCommand, CItemInstance *lpItem);
|
|
|
|
CItemInstance *GetInventoryItemfromID(unsigned short wProtoTypeID);
|
|
CItemInstance *GetInventoryItem(Item::ItemPos &pIndex);
|
|
CItemInstance *GetInventoryItem(unsigned short wIndex);
|
|
CItemInstance *GetInventoryItem(__int64 ddItemUID);
|
|
CItemInstance *GetExchangeItemfromID(unsigned short wProtoTypeID, BOOL bSelf = TRUE);
|
|
CItemInstance *GetExchangeItem(Item::ItemPos &pIndex, BOOL bSelf = TRUE);
|
|
CItemInstance *GetExchangeItem(unsigned short wIndex, BOOL bSelf = TRUE);
|
|
CItemInstance *GetExchangeItem(__int64 ddItemUID, BOOL bSelf = TRUE);
|
|
CItemInstance *GetDepositItemfromID(unsigned short wProtoTypeID);
|
|
CItemInstance *GetDepositItem(Item::ItemPos &pIndex);
|
|
CItemInstance *GetDepositItem(unsigned short wIndex);
|
|
CItemInstance *GetDepositItem(__int64 ddItemUID);
|
|
CItemInstance *GetStreetTradeItemfromID(unsigned short wProtoTypeID);
|
|
CItemInstance *GetStreetTradeItem(Item::ItemPos &pIndex);
|
|
CItemInstance *GetStreetTradeItem(unsigned short wIndex);
|
|
CItemInstance *GetStreetTradeItem(__int64 ddItemUID);
|
|
|
|
BOOL AddFriend(unsigned long dwChrID, char *strName);
|
|
BOOL AddBan(unsigned long dwChrID, char *strName);
|
|
BOOL DeleteFriend(unsigned long dwChrID);
|
|
BOOL DeleteBan(unsigned long dwChrID);
|
|
BOOL GetIsFriend(unsigned long dwChrID);
|
|
BOOL GetIsBan(unsigned long dwChrID);
|
|
FriendInfo *GetFriend(unsigned long dwChrID);
|
|
FriendInfo *GetFriendtoNum(unsigned long dwNum);
|
|
BanInfo *GetBantoNum(unsigned long dwNum);
|
|
|
|
unsigned short GetSkillIDbyChantID(unsigned char cChant);
|
|
void SetClassSkill(void);
|
|
|
|
BOOL DeleteQuest(LPQuestInstance lpDeleteQuest);
|
|
|
|
CHAR_INFOST m_Info;
|
|
// 전직시 이전의 스테이스 저장
|
|
CHAR_INFOST m_BeforeInfo;
|
|
|
|
CHAR_POS m_InfoPos;
|
|
SKILL m_Skill;
|
|
PARTY m_PartyInfo;
|
|
|
|
BOOL m_bUseChant;
|
|
BOOL m_bRangedWeapon;
|
|
|
|
unsigned short m_aryEnchantLevel[32];
|
|
|
|
vector<CItemInstance *> m_lstClassSkill;
|
|
CItemInstance *m_lpUpgrade[2];
|
|
CItemInstance *m_lpQuickSelected;
|
|
CItemInstance *m_lstEquipment[15];
|
|
CItemInstance *m_lstQuickSlot[10];
|
|
CItemInstance *m_lstSkillSlot[20];
|
|
list<CItemInstance *> m_lstInventory;
|
|
|
|
list<FriendInfo *> m_lstFriendList;
|
|
list<BanInfo *> m_lstBanList;
|
|
|
|
list<CItemInstance *> m_lstDeposit;
|
|
__int64 m_aryDeposit[4][12][8];
|
|
unsigned long m_dwDepositGold;
|
|
char m_cSavePass, m_cUsedDeposit;
|
|
unsigned long m_dwDepositFlag;
|
|
unsigned long m_dwMaxTab;
|
|
|
|
list<CItemInstance *> m_lstStreetTrade;
|
|
__int64 m_aryStreetTrade[8][8];
|
|
|
|
list<CItemInstance *> m_lstExchange;
|
|
list<CItemInstance *> m_lstExchange2;
|
|
__int64 m_aryExchange[4][8];
|
|
__int64 m_aryExchange2[4][8];
|
|
unsigned long m_dwExchangeGold;
|
|
unsigned long m_dwExchange2Gold;
|
|
|
|
unsigned long m_dwSelectQuickslot;
|
|
__int64 m_aryInven[3][6][6];
|
|
char m_cWeaponPos;
|
|
|
|
list<LPQuestInstance> m_lstQuest;
|
|
|
|
__int64 m_llExpMax;
|
|
|
|
int m_MaxHP;
|
|
int m_MaxMP;
|
|
|
|
long m_lRealMinDamage;
|
|
long m_lRealMaxDamage;
|
|
long m_lRealDefensePower;
|
|
float m_fRealBlockPercent;
|
|
|
|
long m_lMinDamage;
|
|
long m_lMaxDamage;
|
|
long m_lDefensePower;
|
|
long m_lAttackRevision;
|
|
long m_lDefenseRevision;
|
|
long m_lCriticalPercent;
|
|
float m_fBlockPercent;
|
|
long m_lMagicResistance;
|
|
|
|
long m_lAddMaxHP;
|
|
long m_lAddMaxMP;
|
|
long m_lAddSTR;
|
|
long m_lAddDEX;
|
|
long m_lAddCON;
|
|
long m_lAddINT;
|
|
long m_lAddWIS;
|
|
|
|
long m_lPotionCoolDownTime;
|
|
|
|
CCharStatus();
|
|
~CCharStatus();
|
|
|
|
void StatusUpdate();
|
|
|
|
/* void Backup()
|
|
{
|
|
memcpy(&m_BackupItem,&m_Item,sizeof(CHAR_ITEM));
|
|
}
|
|
void Restore()
|
|
{
|
|
memcpy(&m_Item,&m_BackupItem,sizeof(CHAR_ITEM));
|
|
}*/
|
|
|
|
__int64 IsCheckItem(CItemInstance *lpItem, unsigned long dwPos, unsigned long dwInvenX, unsigned long dwInvenY = 0, unsigned long dwInvenTab = 0);
|
|
unsigned char GetAbleInven(LPFieldInstance lpFieldInstance, Item::ItemPos &pItemIndex, BOOL bStack = TRUE);
|
|
};
|
|
|
|
#endif // !defined(AFX_CHARSTATUS_H__E6A8A3B4_7211_4E9F_85BE_2C83B5D9BC51__INCLUDED_)
|