#ifndef GAMESERVER_ITEMMANAGER_TRADING_H #define GAMESERVER_ITEMMANAGER_TRADING_H class SCItemSlotContainer; class ItemManager; //================================================================================================== namespace nsSlot { ; //================================================================================================== // NOTE: f110611.1L, Sub-Manager of the ItemManager // about trading in npc shop and between player trading class ItemTradingImpl { public: ItemTradingImpl(); // called by ItemManager::Init ItemTradingImpl(ItemManager* item_manager); // // ¸¶À»¿¡¼­¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Â °Íµé! NPC¸¦ ÅëÇØ °¡´É RC::eITEM_RESULT Sell( const SLOTIDX slot_type, const POSTYPE slot_position, const DURATYPE sell_quantity); RC::eITEM_RESULT Buy( const DWORD shop_list_id, const BYTE shop_tab_index, const BYTE shop_item_index, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg, const DURATYPE buy_quantity); RC::eITEM_RESULT Exchange(POSTYPE item_pos, INVENTORY_TOTAL_INFO* OUT total_info); #ifdef __NA_001027_20080423_RANDOM_REWARD_EVENT_ RC::eITEM_RESULT ExchangeRewardItem(SLOTCODE ItemCode, DURATYPE num, INVENTORY_TOTAL_INFO* OUT pTotalInfo); #endif void RegisterSaleItem(SCItemSlot&); RC::eITEM_RESULT Repurchase(POSTYPE, INVENTORY_TOTAL_INFO*); #ifdef _NA_20100106_REPURCHAS_BUGFIX_2496 VOID SerializeRepurchaseItems(REPURCHASITEM_TOTAL_INFO & RepurchasItems, eSERIALIZE eType); #endif VOID ClearRepurchasItemList(); private: #ifdef _NA_20110303_ADD_TYPE_OF_NPCSHOP //»óÁ¡ ŸÀÔº° Áö±Þ ó¸® Çڵ鸵 RC::eITEM_RESULT _PayProcessing(const BYTE shop_tab_index, const DURATYPE number_of_buy_wanted_item, const SCItemSlot buy_wanted_item_slot, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg, SHOPINFO* shop_info, SHOPINFO::SHOP_ITEM* const shop_item); //ÀÏ¹Ý »óÁ¡ RC::eITEM_RESULT _PayNormalShop(SHOPINFO* shop_info, const BYTE shop_tab_index, const SCItemSlot buy_wanted_item_slot, const DURATYPE number_of_buy_wanted_item, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg); //¾ÆÀÌÅÛ »óÁ¡ RC::eITEM_RESULT _PayItemShop(SHOPINFO* shop_info, SHOPINFO::SHOP_ITEM* const shop_item, const SCItemSlot buy_wanted_item_slot, const DURATYPE number_of_buy_wanted_item, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg); //Àû¸³ Æ÷ÀÎÆ® »óÁ¡ RC::eITEM_RESULT _PayAccumulatePointShop(SHOPINFO* shop_info, SHOPINFO::SHOP_ITEM* const shop_item, const SCItemSlot buy_wanted_item_slot, const DURATYPE number_of_buy_wanted_item, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg); #else//_NA_20110303_ADD_TYPE_OF_NPCSHOP RC::eITEM_RESULT _PayProcessing(const BYTE shop_tab_index, const DURATYPE number_of_buy_wanted_item, const SCItemSlot buy_wanted_item_slot, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg, SHOPINFO* shop_info); #endif//_NA_20110303_ADD_TYPE_OF_NPCSHOP #ifdef _NA004034_20120102_POINT_WALLET_SYSTEM // Æ÷ÀÎÆ® »óÁ¡ RC::eITEM_RESULT _PayPointWalletShop( SHOPINFO* shop_info, SHOPINFO::SHOP_ITEM* const shop_item, const SCItemSlot buy_wanted_item_slot, const DURATYPE number_of_buy_wanted_item, MSG_CG_ITEM_BUY_ACK* OUT const buy_msg); #endif //_NA004034_20120102_POINT_WALLET_SYSTEM //----------------------------------------------- // fields... ItemManager* const root_; // friend class ItemManager; // __DISABLE_COPY(ItemTradingImpl); }; //================================================================================================== inline ItemTradingImpl::ItemTradingImpl() : root_(NULL) { } inline ItemTradingImpl::ItemTradingImpl(ItemManager* item_manager) : root_(item_manager) { } //================================================================================================== }; //end of namespace //================================================================================================== #endif //GAMESERVER_ITEMMANAGER_TRADING_H