Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Lib/Release/AuKbHook.exp
Binary file not shown.
Binary file modified Lib/Release/AuKbHook.lib
Binary file not shown.
Binary file modified Lib/Release/SoundLibrary.lib
Binary file not shown.
1 change: 0 additions & 1 deletion Modules/AClient/AgcmUICashMall/AgcmUICashMall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ BOOL AgcmUICashMall::RefreshCashEdit()
#ifdef _AREA_GLOBAL_
CashInfoGlobal pCash;

m_pagpmBillInfo->SetCashGlobal(m_pcsAgcmCharacter->GetSelfCharacter(), 100000, 100000);
m_pagpmBillInfo->GetCashGlobal(m_pcsAgcmCharacter->GetSelfCharacter(), pCash.m_WCoin, pCash.m_PCoin);

szBuffer.Format("%s : %d", m_pcsAgcmUIManager2->GetUIMessage(AGCMUIMESSAGE_CASHMALL_C_CASH), (INT64)pCash.m_WCoin);
Expand Down
8 changes: 7 additions & 1 deletion Modules/AClient/AgcmUIOption/AgcmUIOption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,10 @@ BOOL AgcmUIOption::LoadFromINI(char* szFile)
{
csStream.GetValue(&m_bAutolootOwn);
}
else if(!strcmp(szValueName, "REF_AL"))
{
csStream.GetValue(&m_bIsAutoPickItem);
}
else if(!strcmp(szValueName, "REF_PIN"))
{
csStream.GetValue(&m_bRefusePartyIn);
Expand Down Expand Up @@ -3494,6 +3498,7 @@ BOOL AgcmUIOption::SaveToINI(char* szFileName)
if(!csStream.WriteValue("REF_TRADE", m_bRefuseTrade)) return FALSE;
if(!csStream.WriteValue("REF_DXP", m_bDisableXP)) return FALSE;
if(!csStream.WriteValue("REF_ALOWN", m_bAutolootOwn)) return FALSE;
if(!csStream.WriteValue("REF_AL", m_bIsAutoPickItem)) return FALSE;
if(!csStream.WriteValue("REF_PIN", m_bRefusePartyIn)) return FALSE;
if(!csStream.WriteValue("REF_GIN", m_bRefuseGuildIn)) return FALSE;
if(!csStream.WriteValue("REF_GBAT", m_bRefuseGuildBattle)) return FALSE;
Expand Down Expand Up @@ -3849,8 +3854,9 @@ VOID AgcmUIOption::SendOptionFlag()
if (m_bRefuseGuildIn) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_REFUSE_GUILD_IN);
if (m_bRefuseGuildRelation) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_REFUSE_GUILD_RELATION);
if (m_bRefuseBuddy) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_REFUSE_BUDDY);
if (m_bIsAutoPickItem) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_AUTO_PICKUP_ONOFF);
if (m_bDisableXP) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_DISABLE_XP);
if (m_bAutolootOwn) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_AUTO_PICKUP_ONOFF);
if (m_bAutolootOwn) lOptionFlag = m_pcsAgpmCharacter->SetOptionFlag(lOptionFlag, AGPDCHAR_OPTION_AUTO_PICKUP_OWN_ONLY);

m_pcsAgcmCharacter->SendPacketOptionFlag(pcsSelfCharacter, lOptionFlag);
}
Expand Down
2 changes: 0 additions & 2 deletions Modules/APublic/AgpmBillInfo/AgpmBillInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,11 @@ BOOL AgpmBillInfo::IsPCBang(AgpdCharacter *pcsCharacter)
BOOL AgpmBillInfo::SetCashGlobal(AgpdCharacter* pcsCharacter, double WCoin, double PCoin)
{
if (!pcsCharacter){
printf("SetCashGlobal 1");
return FALSE;
}

AgpdBillInfo *pcsAttachData = GetADCharacter(pcsCharacter);
if(!pcsAttachData){
printf("SetCashGlobal 2");
return FALSE;
}

Expand Down
2 changes: 1 addition & 1 deletion Modules/APublic/AgpmCashMall/AgpdCashMall.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "ApDefine.h"

#define AGPMCASHMALL_MIN_INTERVAL_REFRESH_CASH 1000
#define AGPMCASHMALL_MIN_INTERVAL_REFRESH_CASH 100

typedef struct _AgpdCashMall
{
Expand Down
9 changes: 9 additions & 0 deletions Modules/APublic/AgpmCashMall/AgpmCashMall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ AgpmCashMall::AgpmCashMall()
AUTYPE_END, 0
);

// NOT THIS ONE, NEED TO REMOVE I THINK, OR MAYBE REMOVE THE OTHER
m_csPacketRequestCash.SetFlagLength(sizeof(INT64));
m_csPacketRequestCash.SetFieldType(
AUTYPE_INT8, 1, // operation
AUTYPE_CHAR, AGPACHARACTER_MAX_ID_STRING + 1, // Game ID
AUTYPE_INT32, 1, // cid
AUTYPE_END, 0
);

m_lIndexAttachData = 0;

m_bUseCashMall = TRUE;
Expand Down
1 change: 1 addition & 0 deletions Modules/APublic/AgpmCashMall/AgpmCashMall.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class AgpmCashMall : public ApModule

public:
AuPacket m_csPacket;
AuPacket m_csPacketRequestCash;

public:
AgpmCashMall();
Expand Down
10 changes: 5 additions & 5 deletions Modules/APublic/AgpmSiegeWar/AgpmSiegeWarApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ BOOL AgpmSiegeWar::CheckGuildRequirement(AgpdGuild *pcsGuild)
*/

// ��� �ο� 20�� �̻�.
if (m_pcsAgpmGuild->GetAllMemberCount(pcsGuild) < AGPMSIEGEWAR_GUILD_MEMBER_COUNT_REQUIREMENT)
return FALSE;
//if (m_pcsAgpmGuild->GetAllMemberCount(pcsGuild) < AGPMSIEGEWAR_GUILD_MEMBER_COUNT_REQUIREMENT)
//return FALSE;

//��� ���� �� 14�� �̻�
UINT32 ulCurrentTime = AuTimeStamp::GetCurrentTimeStamp();
if (ulCurrentTime - pcsGuild->m_lCreationDate < AGPMSIEGEWAR_GUILD_CREATE_TIME_REQUIREMENT)
return FALSE;
//UINT32 ulCurrentTime = AuTimeStamp::GetCurrentTimeStamp();
//if (ulCurrentTime - pcsGuild->m_lCreationDate < AGPMSIEGEWAR_GUILD_CREATE_TIME_REQUIREMENT)
//return FALSE;

return TRUE;
}
Expand Down
63 changes: 49 additions & 14 deletions Modules/AServer/AgsmCashMall/AgsmCashMall.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "AgsmCashMall.h"
#include "AgsmSystemMessage.h"
#include "AgsmBillingChina.h"
#include "AgppBillInfo.h"

AgsmCashMall::AgsmCashMall()
{
Expand Down Expand Up @@ -147,7 +148,6 @@ BOOL AgsmCashMall::CBRequestBuyItem(PVOID pData, PVOID pClass, PVOID pCustData)

BOOL AgsmCashMall::CBRefreshCash(PVOID pData, PVOID pClass, PVOID pCustData)
{
printf("Refreshing cash...\n");
if (!pData || !pClass)
return FALSE;

Expand All @@ -156,30 +156,48 @@ BOOL AgsmCashMall::CBRefreshCash(PVOID pData, PVOID pClass, PVOID pCustData)

AgpdCashMall *pcsAttachData = pThis->m_pcsAgpmCashMall->GetADCharacter(pcsCharacter);
if (!pcsAttachData){
printf("1");
return FALSE;
}

if (pcsAttachData->m_ulLastRefreshCashTimeMsec + AGPMCASHMALL_MIN_INTERVAL_REFRESH_CASH > pThis->GetClockCount()){
printf("2");
return TRUE;
}

pcsAttachData->m_ulLastRefreshCashTimeMsec = pThis->GetClockCount() + AGPMCASHMALL_MIN_INTERVAL_REFRESH_CASH;

// request to billing server
// Request to billing server.
INT8 cOperation = AGPMCASH_OPERATION_REFRESH_CASH;
INT16 nPacketLength = 0;
PVOID pvPacket = pThis->m_pcsAgpmCashMall->m_csPacketRequestCash.MakePacket(
TRUE,
&nPacketLength,
AGPMCASHMALL_PACKET_TYPE,
&cOperation,
&pcsCharacter->m_szID,
&pcsCharacter->m_lID
);

BOOL bResult = pThis->SendPacket(pvPacket, nPacketLength, pThis->_GetCharacterNID(pcsCharacter));
pThis->m_pcsAgpmCashMall->m_csPacketRequestCash.FreePacket(pvPacket);

CashInfoGlobal pCash;
pThis->m_pcsAgpmBillInfo->GetCashGlobal(pcsCharacter, pCash.m_WCoin, pCash.m_PCoin);
printf("Increasing from %f to %f\n", pCash.m_WCoin, 2500.0);
pThis->m_pcsAgpmBillInfo->SetCashGlobal(pcsCharacter, 2500.0, 0);
return bResult;
}

pThis->m_pcsAgpmBillInfo->GetCashGlobal(pcsCharacter, pCash.m_WCoin, pCash.m_PCoin);
printf("Now %f\n", pCash.m_WCoin);
// Helper
//===============================================
//
UINT32 AgsmCashMall::_GetCharacterNID(INT32 lCID)
{
ASSERT(NULL != m_pAgsmCharacter);
return m_pcsAgsmCharacter->GetCharDPNID(lCID);
}


return TRUE;
}
UINT32 AgsmCashMall::_GetCharacterNID(AgpdCharacter *pAgpdCharacter)
{
ASSERT(NULL != m_pAgsmCharacter);
return m_pcsAgsmCharacter->GetCharDPNID(pAgpdCharacter);
}

BOOL AgsmCashMall::CBCheckListVersion(PVOID pData, PVOID pClass, PVOID pCustData)
{
Expand Down Expand Up @@ -291,7 +309,7 @@ INT32 AgsmCashMall::CheckBuyRequirement(AgpdCharacter *pcsCharacter, INT32 lProd
return AGPMCASH_BUY_RESULT_NOT_ENOUGH_CASH;
}
#else
/*CashInfoGlobal pCash;
CashInfoGlobal pCash;
m_pcsAgpmBillInfo->GetCashGlobal(pcsCharacter, pCash.m_WCoin, pCash.m_PCoin);

switch(lType)
Expand All @@ -311,7 +329,7 @@ INT32 AgsmCashMall::CheckBuyRequirement(AgpdCharacter *pcsCharacter, INT32 lProd
} break;
default:
return AGPMCASH_BUY_RESULT_FAIL;
}*/
}
#endif

if (!m_pcsAgpmItem->IsAnyEmptyCashInventory(pcsCharacter))
Expand Down Expand Up @@ -418,6 +436,23 @@ BOOL AgsmCashMall::ProcessBuyItem(AgpdCharacter *pcsCharacter, INT32 lProductID,
pcsItem->m_lStatusFlag |= AGPMITEM_STATUS_CASH_PPCARD;
}

// Deduct credits
CashInfoGlobal pCash;
m_pcsAgpmBillInfo->GetCashGlobal(pcsCharacter, pCash.m_WCoin, pCash.m_PCoin);
switch (lType) {
case AGPMCASHMALL_TYPE_WCOIN:
pCash.m_WCoin = pCash.m_WCoin - pCashItemInfo->m_llPrice;
break;
case AGPMCASHMALL_TYPE_WCOIN_PPCARD:
pCash.m_PCoin = pCash.m_PCoin - pCashItemInfo->m_llPrice;
break;
}

// Call refresh instead maybe?
m_pcsAgpmBillInfo->SetCashGlobal(pcsCharacter, pCash.m_WCoin, pCash.m_PCoin);
PACKET_BILLINGINFO_CASHINFO pPacket(pcsCharacter->m_lID, pCash.m_WCoin, pCash.m_PCoin);
SendPacketUser(pPacket, m_pcsAgsmCharacter->GetCharDPNID(pcsCharacter));

// insert item into cash inventory
if (!m_pcsAgpmItem->AddItemToCashInventory(pcsCharacter, pcsItem))
{
Expand Down
6 changes: 6 additions & 0 deletions Modules/AServer/AgsmCashMall/AgsmCashMall.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "AgsmItemManager.h"
#include "AgsmCharManager.h"
#include "AgsmBilling.h"
#include "AgppBillInfo.h"

class AgsmSystemMessage;
class CCallBackFunc;
Expand Down Expand Up @@ -50,4 +51,9 @@ class AgsmCashMall : public AgsModule {
BOOL ProcessBuyItem(AgpdCharacter *pcsCharacter, INT32 lProductID, UINT8 ucMallListVersion, INT32 lType);
BOOL ProcessBuyItemResult(AgpdCharacter *pcsCharacter, AgsdBillingItem *pcsBilling);
BOOL SendMallProductList(AgpdCharacter *pcsCharacter, INT32 lTab);

protected:
// Helper
UINT32 _GetCharacterNID(INT32 lCID);
UINT32 _GetCharacterNID(AgpdCharacter *pAgpdCharacter);
};
2 changes: 0 additions & 2 deletions Modules/AServer/AgsmCharManager/AgsmCharManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,6 @@ INT16 AgsmCharManager::EnterGameWorld(AgpdCharacter *pcsCharacter, BOOL bIsCheck
*/

//m_pagsmCharacter->CheckRecvCharList(pcsCharacter->m_lID);

m_pagpmBillInfo->SetCashGlobal(pcsCharacter, 10000, 0);

// �� character�� ������ ����ɰŶ�� ��Ŷ�� �����ش�.
if (!SendCharacterSettingOK(pcsCharacter, pcsAgsdCharacter->m_dpnidCharacter))
Expand Down
1 change: 1 addition & 0 deletions Modules/AServer/AgsmCharManager/AgsmCharManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Last Update: 2002. 08. 23
#include "ApmMap.h"
#include "AgpmFactors.h"
#include "AgpmCharacter.h"
#include "AgpmCashMall.h"
#include "AgpdCharacter.h"
#include "AgpmItem.h"
#include "AgpmEventBinding.h"
Expand Down
26 changes: 17 additions & 9 deletions Modules/AServer/AgsmDropItem2/AgsmDropItem2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ BOOL AgsmDropItem2::CBDropItem(PVOID pData, PVOID pClass, PVOID pCustData)
return TRUE;
}

BOOL autolootOwn = ((AgpmCharacter *) pcsDropInfo->m_pcsFirstLooter)->IsOptionFlag(((AgpdCharacter *) pcsDropInfo->m_pcsFirstLooter), AGPDCHAR_OPTION_AUTO_PICKUP_OWN_ONLY) == TRUE;
BOOL autolootOwnConfig = ((AgpmCharacter *) pcsDropInfo->m_pcsFirstLooter)->IsOptionFlag(((AgpdCharacter *) pcsDropInfo->m_pcsFirstLooter), AGPDCHAR_OPTION_AUTO_PICKUP_OWN_ONLY) == TRUE;

INT32 lCharClass = pThis->m_pcsAgpmFactors->GetClass(&((AgpdCharacter *) pcsDropInfo->m_pcsFirstLooter)->m_csFactor);
INT32 lCharRace = pThis->m_pcsAgpmFactors->GetRace(&((AgpdCharacter *) pcsDropInfo->m_pcsFirstLooter)->m_csFactor);
Expand All @@ -369,14 +369,22 @@ BOOL AgsmDropItem2::CBDropItem(PVOID pData, PVOID pClass, PVOID pCustData)
pThis->m_pcsAgsmCharacter->IsAutoPickup((AgpdCharacter *) pcsDropInfo->m_pcsFirstLooter) &&
pcsItem->m_pcsItemTemplate->m_lID != 4608)
{
if (
autolootOwn &&
!(
pThis->m_pcsAgpmFactors->CheckClass((AuCharClassType)lCharClass, &pcsItem->m_csRestrictFactor) &&
pThis->m_pcsAgpmFactors->CheckRace ((AuRaceType) lCharRace, &pcsItem->m_csRestrictFactor) &&
pThis->m_pcsAgpmFactors->GetClass (&pcsItem->m_csRestrictFactor) != AUCHARCLASS_TYPE_NONE
)
) {
/*printf(
"Dropping %s. Class %d, Race: %d, Rank: %d\n",
pcsItem->m_pcsItemTemplate->m_szName,
pThis->m_pcsAgpmFactors->GetClass (&pcsItem->m_csRestrictFactor),
pThis->m_pcsAgpmFactors->GetRace (&pcsItem->m_csRestrictFactor),
pcsADItemTemplate->m_lDropRank
);*/

BOOL notForMe = !(
pThis->m_pcsAgpmFactors->CheckClass((AuCharClassType)lCharClass, &pcsItem->m_csRestrictFactor) &&
pThis->m_pcsAgpmFactors->CheckRace ((AuRaceType) lCharRace, &pcsItem->m_csRestrictFactor)
);

BOOL classless = pThis->m_pcsAgpmFactors->GetClass (&pcsItem->m_csRestrictFactor) == AUCHARCLASS_TYPE_NONE;

if (autolootOwnConfig && notForMe && !classless) {
return pThis->DropItemToField(pcsDropInfo->m_pcsDropCharacter, pcsDropInfo->m_pcsFirstLooter, pcsItem);
}

Expand Down
23 changes: 23 additions & 0 deletions Modules/AServer/AgsmRelay2/AgsdRelay2.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ typedef enum _eAgsmRelay2Param
AGSMRELAY_PARAM_COUPON, // 82. Coupon

AGSMRELAY_PARAM_SERVERMOVE, // 83. Ư��ȭ ���� �����̵� //JK_Ư��ȭ����
AGSMRELAY_PARAM_REQUEST_CASH, // 84.
} eAgsmRelay2Param;


Expand Down Expand Up @@ -573,6 +574,28 @@ class AgsdRelay2CashItemBuyList : public AgsdDBParam, public ApMemory<AgsdRelay2
};


//
// ========== Cash Item Buy List ==========
//
class AgsdRelay2RequestCash : public AgsdDBParam, public ApMemory<AgsdRelay2RequestCash, 20000>
{
public:
CHAR m_szAccountID[AGSMACCOUNT_MAX_ACCOUNT_NAME + 1];

protected:
BOOL SetParamSelect(AuStatement *pStatement);
BOOL SetParamUpdate(AuStatement *pStatement);
BOOL SetParamInsert(AuStatement *pStatement);
BOOL SetParamExecute(AuStatement *pStatement);

public:
AgsdRelay2RequestCash();
virtual ~AgsdRelay2RequestCash() {}
virtual void Release() { delete this; }

virtual void Dump(CHAR *pszOp);
};

//
// ========== Wanted Criminal ==========
//
Expand Down
Loading