AVA2 cross-platform client parity baseline
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
#pragma once
|
||||
|
||||
#include "Packet.h"
|
||||
|
||||
/*
|
||||
* 교환 창 관련
|
||||
*/
|
||||
class CPythonExchange : public CSingleton<CPythonExchange>
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
EXCHANGE_ITEM_MAX_NUM = 12,
|
||||
};
|
||||
|
||||
typedef struct trade
|
||||
{
|
||||
char name[CHARACTER_NAME_MAX_LEN + 1];
|
||||
#ifdef ENABLE_LEVEL_IN_TRADE
|
||||
DWORD level;
|
||||
#endif
|
||||
|
||||
DWORD item_vnum[EXCHANGE_ITEM_MAX_NUM];
|
||||
DWORD item_count[EXCHANGE_ITEM_MAX_NUM];
|
||||
DWORD item_metin[EXCHANGE_ITEM_MAX_NUM][ITEM_SOCKET_SLOT_MAX_NUM];
|
||||
TPlayerItemAttribute item_attr[EXCHANGE_ITEM_MAX_NUM][ITEM_ATTRIBUTE_SLOT_MAX_NUM];
|
||||
#ifdef ENABLE_GLOVE_SYSTEM
|
||||
TPlayerItemAttribute item_random_attr[EXCHANGE_ITEM_MAX_NUM][GLOVE_ATTR_MAX_NUM];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NEW_NAME_ITEM
|
||||
std::string item_name[EXCHANGE_ITEM_MAX_NUM];
|
||||
#endif
|
||||
BYTE accept;
|
||||
long long elk;
|
||||
#ifdef ELEMENT_SPELL_WORLDARD
|
||||
BYTE item_grade_element[EXCHANGE_ITEM_MAX_NUM];
|
||||
DWORD item_attack_element[EXCHANGE_ITEM_MAX_NUM][MAX_ELEMENTS_SPELL];
|
||||
BYTE item_element_type_bonus[EXCHANGE_ITEM_MAX_NUM];
|
||||
short item_elements_value_bonus[EXCHANGE_ITEM_MAX_NUM][MAX_ELEMENTS_SPELL];
|
||||
#endif
|
||||
} TExchangeData;
|
||||
|
||||
public:
|
||||
CPythonExchange();
|
||||
virtual ~CPythonExchange();
|
||||
|
||||
void Clear();
|
||||
|
||||
void Start();
|
||||
void End();
|
||||
bool isTrading();
|
||||
|
||||
// Interface
|
||||
|
||||
void SetSelfName(const char *name);
|
||||
void SetTargetName(const char *name);
|
||||
|
||||
char *GetNameFromSelf();
|
||||
char *GetNameFromTarget();
|
||||
|
||||
#ifdef ENABLE_LEVEL_IN_TRADE
|
||||
void SetSelfLevel(DWORD level);
|
||||
void SetTargetLevel(DWORD level);
|
||||
|
||||
DWORD GetLevelFromSelf();
|
||||
DWORD GetLevelFromTarget();
|
||||
#endif
|
||||
|
||||
#ifdef ELEMENT_SPELL_WORLDARD
|
||||
void SetItemElementToTarget(int pos, BYTE value_grade_element, BYTE type_element);
|
||||
void SetItemElementAttackToTarget(int pos, DWORD attack_element_index, DWORD attack_element);
|
||||
void SetItemElementValueToTarget(int pos, DWORD elements_value_bonus_index, short elements_value_bonus);
|
||||
BYTE GetItemElementGradeFromTarget(BYTE pos);
|
||||
DWORD GetItemElementAttackFromTarget(BYTE pos, DWORD attack_element_index);
|
||||
BYTE GetItemElementTypeFromTarget(BYTE pos);
|
||||
short GetItemElementValueFromTarget(BYTE pos, DWORD elements_value_bonus_index);
|
||||
void SetItemElementToSelf(int pos, BYTE value_grade_element, BYTE type_element);
|
||||
void SetItemElementAttackToSelf(int pos, DWORD attack_element_index, DWORD attack_element);
|
||||
void SetItemElementValueToSelf(int pos, DWORD elements_value_bonus_index, short elements_value_bonus);
|
||||
BYTE GetItemElementGradeFromSelf(BYTE pos);
|
||||
DWORD GetItemElementAttackFromSelf(BYTE pos, DWORD attack_element_index);
|
||||
BYTE GetItemElementTypeFromSelf(BYTE pos);
|
||||
short GetItemElementValueFromSelf(BYTE pos, DWORD elements_value_bonus_index);
|
||||
#endif
|
||||
|
||||
void SetElkToTarget(long long elk);
|
||||
void SetElkToSelf(long long elk);
|
||||
|
||||
long long GetElkFromTarget();
|
||||
long long GetElkFromSelf();
|
||||
#ifdef ENABLE_NEW_NAME_ITEM
|
||||
void SetItemNewName(int iPos, const char* name, bool bSelf);
|
||||
const char* GetItemNewName(int iPos, bool bSelf);
|
||||
#endif
|
||||
void SetItemToTarget(DWORD pos, DWORD vnum, DWORD count);
|
||||
void SetItemToSelf(DWORD pos, DWORD vnum, DWORD count);
|
||||
|
||||
void SetItemMetinSocketToTarget(int pos, int imetinpos, DWORD vnum);
|
||||
void SetItemMetinSocketToSelf(int pos, int imetinpos, DWORD vnum);
|
||||
|
||||
void SetItemAttributeToTarget(int pos, int iattrpos, BYTE byType, short sValue);
|
||||
void SetItemAttributeToSelf(int pos, int iattrpos, BYTE byType, short sValue);
|
||||
#ifdef ENABLE_GLOVE_SYSTEM
|
||||
void SetItemRandomAttributeToTarget(int pos, int iattrpos, BYTE byType, short sValue);
|
||||
void SetItemRandomAttributeToSelf(int pos, int iattrpos, BYTE byType, short sValue);
|
||||
#endif
|
||||
|
||||
|
||||
void DelItemOfTarget(BYTE pos);
|
||||
void DelItemOfSelf(BYTE pos);
|
||||
|
||||
DWORD GetItemVnumFromTarget(BYTE pos);
|
||||
DWORD GetItemVnumFromSelf(BYTE pos);
|
||||
|
||||
DWORD GetItemCountFromTarget(BYTE pos);
|
||||
DWORD GetItemCountFromSelf(BYTE pos);
|
||||
|
||||
DWORD GetItemMetinSocketFromTarget(BYTE pos, int iMetinSocketPos);
|
||||
DWORD GetItemMetinSocketFromSelf(BYTE pos, int iMetinSocketPos);
|
||||
|
||||
void GetItemAttributeFromTarget(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||
void GetItemAttributeFromSelf(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||
#ifdef ENABLE_GLOVE_SYSTEM
|
||||
void GetItemRandomAttributeFromTarget(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||
void GetItemRandomAttributeFromSelf(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||
#endif
|
||||
void SetAcceptToTarget(BYTE Accept);
|
||||
void SetAcceptToSelf(BYTE Accept);
|
||||
|
||||
bool GetAcceptFromTarget();
|
||||
bool GetAcceptFromSelf();
|
||||
|
||||
bool GetElkMode();
|
||||
void SetElkMode(bool value);
|
||||
|
||||
protected:
|
||||
bool m_isTrading;
|
||||
|
||||
bool m_elk_mode; // 엘크를 클릭해서 교환했을때를 위한 변종임.
|
||||
TExchangeData m_self;
|
||||
TExchangeData m_victim;
|
||||
};
|
||||
Reference in New Issue
Block a user