Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
110
Server/RylServerProject/RylGameLibrary/Creature/Npc/NPC.h
Normal file
110
Server/RylServerProject/RylGameLibrary/Creature/Npc/NPC.h
Normal file
@@ -0,0 +1,110 @@
|
||||
#ifndef _CNPC_H_
|
||||
#define _CNPC_H_
|
||||
|
||||
#include <Item/Item.h>
|
||||
#include <ScriptEngine/ScriptEngine.h>
|
||||
#include <Creature/Creature.h>
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
namespace Quest
|
||||
{
|
||||
struct QuestNode;
|
||||
};
|
||||
|
||||
|
||||
class CNPC : public CCreature
|
||||
{
|
||||
public:
|
||||
|
||||
enum Const
|
||||
{
|
||||
MAX_CONTACT_RANGE = 15,
|
||||
DISPLAY_CYCLE = 1800000 // 30<33><30>
|
||||
};
|
||||
|
||||
struct GoodInfo
|
||||
{
|
||||
unsigned short m_wItemID;
|
||||
unsigned char m_cRace;
|
||||
unsigned char m_cTabPage;
|
||||
|
||||
Item::EquipType::Grade m_ePreGrade;
|
||||
Item::EquipType::Grade m_eCurrentGrade;
|
||||
|
||||
GoodInfo();
|
||||
GoodInfo(unsigned short wItemID, unsigned char cRace, unsigned char cTabPage);
|
||||
bool operator < (const GoodInfo& rhs) { return (m_wItemID < rhs.m_wItemID); }
|
||||
};
|
||||
|
||||
|
||||
CNPC(unsigned long dwCID, int nZone, int nTownID, bool bBelongToCastle);
|
||||
virtual ~CNPC();
|
||||
|
||||
// <20>⺻<EFBFBD><E2BABB> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20>о<EFBFBD><D0BE><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Guild <20>Ҽӿ<D2BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
virtual unsigned char GetNation(void) const;
|
||||
void SetNation(unsigned char cNation) { m_cNation = cNation; }
|
||||
|
||||
virtual EnemyCheck::EnemyType IsEnemy(CCreature* lpTarget, unsigned char* cResult = NULL ) { return EnemyCheck::EC_NEUTRAL; }
|
||||
virtual CParty* GetParty(void) { return 0; }
|
||||
virtual bool IsPeaceMode(void) { return true; }
|
||||
virtual bool IsRideArms(void) const { return false; }
|
||||
virtual unsigned long GetGID(void) const { return m_dwGID; }
|
||||
|
||||
bool IsBelongToCastle(void) const;
|
||||
|
||||
int GetZone(void) { return m_nZone; }
|
||||
unsigned long GetTownID(void) const { return m_dwTownOrNameID; }
|
||||
unsigned long GetCastleNameID(void) const { return m_dwTownOrNameID; }
|
||||
unsigned long GetDisplayTime(void) const { return m_dwDisplayTime; }
|
||||
|
||||
void SetGID(unsigned long dwGID) { m_dwGID = dwGID; }
|
||||
|
||||
bool GetQuest(CCharacter* lpCharacter, unsigned short wQuestID, Quest::QuestNode** lppQuestNode);
|
||||
virtual unsigned long RepairItem(Item::CEquipment* pEquipment, unsigned long& dwCurrentGold);
|
||||
|
||||
Item::CItem* SellToCharacter(CCharacter* lpCustomer, unsigned short wKindItem, TakeType takeType,
|
||||
Item::CItem* lpRequestItem, unsigned long& dwPrice, unsigned short wCouponID, unsigned short &usError);
|
||||
|
||||
unsigned char GetEquipShopInfo(unsigned char cRace, unsigned char cTabPage,
|
||||
unsigned short *aryItemID, unsigned char *aryItemGrade);
|
||||
|
||||
static bool LoadNPCInfo(void);
|
||||
|
||||
// -- internal use for load NPC objects
|
||||
|
||||
void SortGoods(void) { std::sort(m_Goods.begin(), m_Goods.end()); }
|
||||
void SortQuests(void) { std::sort(m_Quests.begin(), m_Quests.end()); }
|
||||
|
||||
void SetFlags(unsigned long dwFlags) { m_dwFlags |= dwFlags; } // <20><><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
void AddGoodsToNPC(GoodInfo goodInfo) { m_Goods.push_back(goodInfo); }
|
||||
void AddQuestsToNPC(unsigned short wQuestID) { m_Quests.push_back(wQuestID); }
|
||||
|
||||
void SetItemDropGrade(unsigned char cDropType, unsigned char cGradeF, unsigned char cGradeD,
|
||||
unsigned char cGradeC, unsigned char cGradeB, unsigned char cGradeA);
|
||||
void SetItemDropBaseNum(unsigned char cDropType, unsigned char cGradeF, unsigned char cGradeD,
|
||||
unsigned char cGradeC, unsigned char cGradeB, unsigned char cGradeA);
|
||||
|
||||
void SetRandomGrade(void);
|
||||
void SetNPCPosition(Position& position) { m_CurrentPos = position; }
|
||||
|
||||
private:
|
||||
|
||||
std::vector<GoodInfo> m_Goods;
|
||||
std::vector<unsigned short> m_Quests;
|
||||
|
||||
int m_nZone;
|
||||
|
||||
unsigned long m_dwTownOrNameID;
|
||||
unsigned long m_dwGID; // Vincent : GID <20><> Creature <20><> <20>ű<EFBFBD><C5B1><EFBFBD>?
|
||||
unsigned long m_dwFlags;
|
||||
unsigned long m_dwDisplayTime;
|
||||
|
||||
unsigned char m_cGradeRate[Item::EquipType::MAX_OPTION_TYPE][Item::EquipType::MAX_GRADE];
|
||||
unsigned char m_cBaseNum[Item::EquipType::MAX_OPTION_TYPE][Item::EquipType::MAX_GRADE];
|
||||
unsigned char m_cNation;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user