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>
144 lines
3.0 KiB
C++
144 lines
3.0 KiB
C++
#ifndef _SEARCH_CLASS_H_
|
|
#define _SEARCH_CLASS_H_
|
|
|
|
#include <vector>
|
|
#include <RylGameLibrary/Network/Packet/PacketStruct/CharLoginOutPacketStruct.h>
|
|
|
|
namespace GAMELOG
|
|
{
|
|
// Àü¹æ ÂüÁ¶
|
|
struct sLogBase;
|
|
struct sCharLoginOut;
|
|
};
|
|
|
|
class CRegion
|
|
{
|
|
public:
|
|
explicit CRegion(const DWORD dwRadius, const DWORD dwXPos,
|
|
const DWORD dwYPos, const DWORD dwZPos);
|
|
|
|
explicit CRegion(const CString& Radius, const CString& XPos,
|
|
const CString& YPos, const CString& ZPos);
|
|
|
|
inline bool IsIn(const DWORD dwXPos, const DWORD dwYPos, const DWORD dwZPos);
|
|
inline bool IsValid() const { return (0 != m_dwRadiusSquare); }
|
|
|
|
protected:
|
|
DWORD m_dwRadiusSquare;
|
|
DWORD m_dwXPos;
|
|
DWORD m_dwYPos;
|
|
DWORD m_dwZPos;
|
|
|
|
inline DWORD DistanceSquare(const DWORD dwPos1, const DWORD dwPos2);
|
|
};
|
|
|
|
inline DWORD CRegion::DistanceSquare(const DWORD dwPos1, const DWORD dwPos2)
|
|
{
|
|
if(dwPos1 > dwPos2) { return (dwPos1-dwPos2)*(dwPos1-dwPos2); }
|
|
else if(dwPos1 < dwPos2) { return (dwPos2-dwPos1)*(dwPos2-dwPos1); }
|
|
return 0;
|
|
}
|
|
|
|
|
|
inline bool CRegion::IsIn(const DWORD dwXPos, const DWORD dwYPos, const DWORD dwZPos)
|
|
{
|
|
return (DistanceSquare(m_dwXPos, dwXPos) +
|
|
DistanceSquare(m_dwYPos, dwYPos) +
|
|
DistanceSquare(m_dwZPos, dwZPos)) < m_dwRadiusSquare;
|
|
}
|
|
|
|
class CCIDSearch
|
|
{
|
|
public:
|
|
CCIDSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
DWORD m_dwCID;
|
|
};
|
|
|
|
|
|
class CUIDSearch
|
|
{
|
|
public:
|
|
CUIDSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
DWORD m_dwUID;
|
|
};
|
|
|
|
|
|
class CPositionSearch
|
|
{
|
|
public:
|
|
CPositionSearch(const CRegion& Region);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
CRegion m_Region;
|
|
};
|
|
|
|
|
|
class CTimeSearch
|
|
{
|
|
public:
|
|
CTimeSearch(const CTime& StartTime, const CTime& StopTime);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
__time64_t m_startTime;
|
|
__time64_t m_stopTime;
|
|
};
|
|
|
|
|
|
class CItemUIDSearch
|
|
{
|
|
public:
|
|
CItemUIDSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
DWORD64 m_dwItemUID;
|
|
bool FindItem(const GAMELOG::sCharLoginOut* pLoginOut, const DBUpdateData::UpdateList eUpdateList);
|
|
};
|
|
|
|
class CItemTypeIDSearch
|
|
{
|
|
public:
|
|
CItemTypeIDSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
unsigned short m_usItemTypeID;
|
|
bool FindItem(const GAMELOG::sCharLoginOut* pLoginOut, const DBUpdateData::UpdateList eUpdateList);
|
|
};
|
|
|
|
class CIPSearch
|
|
{
|
|
public:
|
|
CIPSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
private:
|
|
SOCKADDR_IN m_sockaddr_In;
|
|
};
|
|
|
|
class CCategory
|
|
{
|
|
public:
|
|
|
|
typedef std::vector<unsigned char> CMDArray;
|
|
|
|
CCategory(const CMDArray& CMDs);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
|
|
private:
|
|
const CMDArray& m_CMDArray;
|
|
};
|
|
|
|
|
|
class CGIDSearch
|
|
{
|
|
public:
|
|
|
|
CGIDSearch(const CString& SearchValue_In);
|
|
bool operator() (const GAMELOG::sLogBase* lpLogBase);
|
|
protected:
|
|
unsigned long m_dwGID;
|
|
};
|
|
|
|
#endif |