Files
Sun1602/Server/ShopServer/PCCShopGiftProduct.hpp
2022-10-26 12:25:11 +08:00

30 lines
648 B
C++

#pragma once
#include "ProtocolCommand.h"
#include "ShopActionFactory.hpp"
class CPCCShopGiftProduct : public CProtocolCommand
{
public:
void Execute(DWORD_PTR pSession, PBYTE pBuf);
private:
CShopActionFactory m_factory;
};
void CPCCShopGiftProduct::Execute(DWORD_PTR pSession, PBYTE pBuf)
{
ShopProtocol::MSG_REQUEST_BASE<void>* GameCodeBase = (ShopProtocol::MSG_REQUEST_BASE<void>*)pBuf;
CShopAction* pAction = m_factory.GetShopActionObj();
if(NULL != pAction)
{
pAction->ExecuteGiftProduct(pSession, pBuf);
}
else
{
BILLING_LOG(WZPUBLIC::LEVEL_WARN, "Unknown GameCode (%ld) : GiftProduct", GameCodeBase->GetGameCode());
}
}