ManaPlus
Public Member Functions
EAthena::SearchStoreHandler Class Reference

#include <searchstorehandler.h>

Inheritance diagram for EAthena::SearchStoreHandler:
Net::SearchStoreHandler

Public Member Functions

 SearchStoreHandler ()
 
 ~SearchStoreHandler ()
 
void search (const StoreSearchTypeT type, const int minPrice, const int maxPrice, const int itemId) const
 
void nextPage () const
 
void close () const
 
void select (const int accountId, const int storeId, const int itemId) const
 
- Public Member Functions inherited from Net::SearchStoreHandler
 SearchStoreHandler ()
 

Detailed Description

Definition at line 29 of file searchstorehandler.h.

Constructor & Destructor Documentation

◆ SearchStoreHandler()

EAthena::SearchStoreHandler::SearchStoreHandler ( )

Definition at line 34 of file searchstorehandler.cpp.

34  :
36 {
37  searchStoreHandler = this;
38 }
Net::SearchStoreHandler * searchStoreHandler
Definition: net.cpp:121

References searchStoreHandler.

◆ ~SearchStoreHandler()

EAthena::SearchStoreHandler::~SearchStoreHandler ( )
virtual

Reimplemented from Net::SearchStoreHandler.

Definition at line 40 of file searchstorehandler.cpp.

41 {
42  searchStoreHandler = nullptr;
43 }

References searchStoreHandler.

Member Function Documentation

◆ close()

void EAthena::SearchStoreHandler::close ( ) const
virtual

Implements Net::SearchStoreHandler.

Definition at line 71 of file searchstorehandler.cpp.

72 {
73  if (packetVersion < 20100608)
74  return;
75  createOutPacket(CMSG_SEARCHSTORE_CLOSE);
76 }
int packetVersion
Definition: client.cpp:125
#define createOutPacket(name)
Definition: messageout.h:37

References createOutPacket, and packetVersion.

◆ nextPage()

void EAthena::SearchStoreHandler::nextPage ( ) const
virtual

Implements Net::SearchStoreHandler.

Definition at line 64 of file searchstorehandler.cpp.

65 {
66  if (packetVersion < 20100608)
67  return;
68  createOutPacket(CMSG_SEARCHSTORE_NEXT_PAGE);
69 }

References createOutPacket, and packetVersion.

◆ search()

void EAthena::SearchStoreHandler::search ( const StoreSearchTypeT  type,
const int  minPrice,
const int  maxPrice,
const int  itemId 
) const
virtual

Implements Net::SearchStoreHandler.

Definition at line 45 of file searchstorehandler.cpp.

49 {
50  if (packetVersion < 20100601)
51  return;
52 
53  createOutPacket(CMSG_SEARCHSTORE_SEARCH);
54  outMsg.writeInt16(23, "len");
55  outMsg.writeInt8(CAST_U8(type), "search type");
56  outMsg.writeInt32(maxPrice, "max price");
57  outMsg.writeInt32(minPrice, "min price");
58  outMsg.writeInt32(1, "items count");
59  outMsg.writeInt32(0, "cards count");
60  outMsg.writeItemId(itemId, "item id");
61  // +++ missing for by items and cards
62 }
#define CAST_U8
Definition: cast.h:27

References CAST_U8, createOutPacket, and packetVersion.

◆ select()

void EAthena::SearchStoreHandler::select ( const int  accountId,
const int  storeId,
const int  itemId 
) const
virtual

Implements Net::SearchStoreHandler.

Definition at line 78 of file searchstorehandler.cpp.

81 {
82  if (packetVersion < 20100608)
83  return;
84  createOutPacket(CMSG_SEARCHSTORE_CLICK);
85  outMsg.writeInt32(accountId, "account id");
86  outMsg.writeInt32(storeId, "store id");
87  outMsg.writeItemId(itemId, "item id");
88 }

References createOutPacket, and packetVersion.


The documentation for this class was generated from the following files: