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