Предоставляю услуги по обратной разработке Lineage 2.
Имею опыт с:
- IL сервер (C4 PTS up)
- GF сервер, HF сервер
Стоимость услуг договорная. Пишите либо тут в лс, либо в дискорд envydeveloper, либо в тг @envydeveloper. Согласен на работу через гаранта \ оплату по итогу работы
I provide Lineage 2 reverse engineering services.
I have experience with:
- IL server (extended C4)
- GF server, HF server
The price of services is negotiable. Contact me either here in private or on Discord envydeveloper or in Telegram @envydeveloper. I agree to work through a guarantor / payment upon completion of the work
Имею опыт с:
- IL сервер (C4 PTS up)
- GF сервер, HF сервер
Стоимость услуг договорная. Пишите либо тут в лс, либо в дискорд envydeveloper, либо в тг @envydeveloper. Согласен на работу через гаранта \ оплату по итогу работы
I provide Lineage 2 reverse engineering services.
I have experience with:
- IL server (extended C4)
- GF server, HF server
The price of services is negotiable. Contact me either here in private or on Discord envydeveloper or in Telegram @envydeveloper. I agree to work through a guarantor / payment upon completion of the work
cpp:
Header:
C++:
// 0x43B140
bool CAuctionAgit::CanAttend(int nPledgeId, User *pUser)
{
if(nPledgeId <= 0)
{
pUser->SendSystemMessage(0x2A8);
return false;
}
if(GetSaleState() != SALE_STATE_AUCTION)
{
pUser->SendSystemMessage(0x2A8);
return false;
}
int nOwnerPledgeId = 0;
if(pRD)
nOwnerPledgeId = pRD->nPledgeID;
if(nPledgeId == nOwnerPledgeId)
{
pUser->SendSystemMessage(0x2A1);
return false;
}
CPledge *pPledge = GetPledgeByID(nPledgeId);
if(!pPledge)
{
pUser->SendSystemMessage(0x2A8);
return false;
}
if(pPledge->pAgit != NULL)
{
pUser->SendSystemMessage(0x2A8);
return false;
}
if((UINT)pPledge->pSD->nLevel < AGIT_MIN_CLAN_LEVEL)
{
pUser->SendSystemMessage(0x2A1);
return false;
}
if(pPledge->pSD->nState != 0)
{
pUser->SendSystemMessage(0x2A8);
return false;
}
int nAgitId = 0;
int nAuctionid = 0;
int nResult = 0;
IsInAllAuctions(nPledgeId, &nAgitId, &nAuctionid, &nResult);
if(nResult != 0)
{
if(nResult & 1)
{
pUser->SendSystemMessage(0x2A4);
}
else if(nResult & 2)
{
pUser->SendSystemMessage(0x2A8);
}
return false;
}
return true;
}
// 0x43A600
void CAuctionAgit::TimerExpired(int id)
{
if(GetSaleState() == SALE_STATE_AUCTION)
{
if(bCanDoAuction == true && _time32(NULL) >= auctionEndTime)
{
EnterDoAuction();
g_DB.RequestSetAgitAuction(pRD->nResidenceID, nAuctionId);
}
}
if(pRD->nPledgeID > 0 && costTime == 0
&& pRD->nPrice > 0
&& GetSaleState() == SALE_STATE_ACTIVE)
{
costTime = -1;
g_DB.RequestAgitCost(pRD->nResidenceID, pRD->nPledgeID, pRD->nPrice, -1);
}
if(pRD->nPledgeID > 0 && costTime > 0
&& pRD->nPrice > 0
&& _time32(NULL) >= costTime
&& GetSaleState() == SALE_STATE_ACTIVE)
{
costTime = -1;
g_DB.RequestAgitCost(pRD->nResidenceID, pRD->nPledgeID, pRD->nPrice, pRD->nLastBid);
}
if(pRD->nPledgeID == 0)
{
if(GetSaleState() == SALE_STATE_INITIAL)
{
SetSaleState(SALE_STATE_AUTO_SELL);
wcscpy_s(wszComment, AGIT_COMMENT_SIZE, L"");
g_DB.RequestAgitAutoSell(pRD->nResidenceID, pRD->nAcquireId,
AGIT_AUTO_SELL_PRICE, AGIT_AUTO_SELL_DAYS, 0);
}
}
if(pRD->nPledgeID == 0
&& pRD->nCancelFlag == 1
&& _time32(NULL) >= pRD->nCancelEndTime
&& GetSaleState() == SALE_STATE_CANCEL_PENALTY)
{
SetSaleState(SALE_STATE_AUTO_SELL);
wcscpy_s(wszComment, AGIT_COMMENT_SIZE, L"");
g_DB.RequestAgitAutoSell(pRD->nResidenceID, pRD->nAcquireId,
AGIT_AUTO_SELL_PRICE, AGIT_AUTO_SELL_DAYS, 0);
}
CAgit::TimerExpired(id);
}
Header:
C++:
#define SECONDS_PER_DAY 86400
#define SECONDS_PER_HOUR 3600
#define SECONDS_PER_MINUTE 60
#define SECONDS_PER_WEEK 604800
#define AGIT_AUCTION_DATE_OFFSET 0x10F950
#define AGIT_COMMENT_SIZE 255
#define AGIT_AUTO_SELL_PRICE 10
#define AGIT_AUTO_SELL_DAYS 7
#define AGIT_MAX_AUCTION_PRICE 2000000000
#define AGIT_MIN_CLAN_LEVEL 2
enum SaleState
{
SALE_STATE_NONE = 0,
SALE_STATE_INITIAL = 1,
SALE_STATE_AUTO_SELL = 2,
SALE_STATE_ACTIVE = 3,
SALE_STATE_CANCEL_PENALTY = 4,
SALE_STATE_AUCTION = 8
};
struct AuctionBidInfo
{
int nPledgeId;
int nPrice;
int _unk;
};
class CAuctionAgit : public CAgit
{
public:
/* 04F0 */ LPCIOCriticalSection pAuctionLock;
/* 0520 */ int _n0520;
/* 0524 */ __time32_t auctionEndTime;
/* 0528 */ __time32_t cancelTimestamp;
/* 052C */ __time32_t costTime;
/* 0530 */ int _n0530;
/* 0534 */ int _pad0534;
/* 0538 */ int _n0538;
/* 053C */ int _n053C;
/* 0540 */ WCHAR wszComment[AGIT_COMMENT_SIZE];
/* 0740 */ vector<AuctionBidInfo> bidList;
/* 0760 */ int nSaleState;
/* 0764 */ int nAuctionId;
/* 0768 */ int _n0768;
/* 076C */ bool bCanDoAuction;
bool InCancelPenalty()
{
typedef bool (*f)(CAuctionAgit*);
return f(0x439AB0L)(this);
}
void StartAuctionTimer()
{
typedef void (*f)(CAuctionAgit*);
f(0x439BE0L)(this);
}
bool CheckSendable(int nFlag)
{
typedef bool (*f)(CAuctionAgit*, int);
return f(0x439CD0L)(this, nFlag);
}
void UnCheckSendable(int nFlag)
{
typedef void (*f)(CAuctionAgit*, int);
f(0x439E50L)(this, nFlag);
}
void SetSaleState(SaleState state)
{
typedef void (*f)(CAuctionAgit*, int);
f(0x439FD0L)(this, (int)state);
}
SaleState GetSaleState()
{
typedef int (*f)(CAuctionAgit*);
return (SaleState)f(0x43A0C0L)(this);
}
int GetAuctionCount()
{
typedef int (*f)(CAuctionAgit*);
return f(0x43A190L)(this);
}
bool CanDoAuction()
{
typedef bool (*f)(CAuctionAgit*);
return f(0x43A290L)(this);
}
void EnterDoAuction()
{
typedef void (*f)(CAuctionAgit*);
f(0x43A360L)(this);
}
void LeaveDoAuction()
{
typedef void (*f)(CAuctionAgit*);
f(0x43A4B0L)(this);
}
bool IsInAuction(int nPledgeId)
{
typedef bool (*f)(CAuctionAgit*, int);
return f(0x43AC40L)(this, nPledgeId);
}
int GetAuctionPrice(int nPledgeId)
{
typedef int (*f)(CAuctionAgit*, int);
return f(0x43AE90L)(this, nPledgeId);
}
bool CanAttend(int nPledgeId, User *pUser);
void DelAuction(int nPledgeId)
{
typedef void (*f)(CAuctionAgit*, int);
f(0x43B680L)(this, nPledgeId);
}
void SetNextCost(int nPledgeId)
{
typedef void (*f)(CAuctionAgit*, int);
f(0x43B950L)(this, nPledgeId);
}
void ResetAuction()
{
typedef void (*f)(CAuctionAgit*);
f(0x43BE70L)(this);
}
void AddAuction(int nPledgeId, int nPrice)
{
typedef void (*f)(CAuctionAgit*, int, int);
f(0x43CCA0L)(this, nPledgeId, nPrice);
}
void TimerExpired(int id);
};
Последнее редактирование:













