ManaPlus
Functions
EAthena::SearchStoreRecv Namespace Reference

Functions

void processSearchAck (Net::MessageIn &msg)
 
void processSearchFailed (Net::MessageIn &msg)
 
void processSearchOpen (Net::MessageIn &msg)
 
void processSearchClickAck (Net::MessageIn &msg)
 

Function Documentation

◆ processSearchAck()

void EAthena::SearchStoreRecv::processSearchAck ( Net::MessageIn msg)

Definition at line 40 of file searchstorerecv.cpp.

41 {
43  const int count = (msg.readInt16("len") - 7) / (104 + itemIdLen);
44  msg.readUInt8("is first page");
45  msg.readUInt8("is next page");
46  msg.readUInt8("remain uses");
47  for (int f = 0; f < count; f ++)
48  {
49  msg.readInt32("store id");
50  msg.readInt32("aoount id");
51  msg.readString(80, "store name");
52  msg.readItemId("item id");
53  msg.readUInt8("item type");
54  msg.readInt32("price");
55  msg.readInt16("amount");
56  msg.readUInt8("refine");
57  for (int d = 0; d < maxCards; d++)
58  msg.readItemId("card");
59  if (msg.getVersion() >= 20150226)
60  {
61  for (int d = 0; d < 5; d ++)
62  {
63  msg.readInt16("option index");
64  msg.readInt16("option value");
65  msg.readUInt8("option param");
66  }
67  }
68 
69  // +++ need use ItemColorManager for colors
70  }
71 }
#define maxCards
Definition: cards.h:25
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56
bool msg(InputEvent &event)
Definition: chat.cpp:39
int itemIdLen
Definition: client.cpp:130

References itemIdLen, maxCards, Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processSearchClickAck()

void EAthena::SearchStoreRecv::processSearchClickAck ( Net::MessageIn msg)

Definition at line 114 of file searchstorerecv.cpp.

115 {
117  msg.readInt16("x");
118  msg.readInt16("y");
119 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processSearchFailed()

void EAthena::SearchStoreRecv::processSearchFailed ( Net::MessageIn msg)

Definition at line 73 of file searchstorerecv.cpp.

74 {
76  const int result = msg.readUInt8("result");
77  switch (result)
78  {
79  case 0:
82  break;
83  case 1:
86  break;
87  case 2:
90  break;
91  case 3:
94  break;
95  case 4:
98  break;
99  default:
102  break;
103  }
104 }
void notify(const unsigned int message)
@ SEARCH_STORE_FAILED_CANT_SEARCH_YET
Definition: notifytypes.h:145
@ SEARCH_STORE_FAILED_MANY_RESULTS
Definition: notifytypes.h:143
@ SEARCH_STORE_FAILED_NO_STORES
Definition: notifytypes.h:142
@ SEARCH_STORE_FAILED
Definition: notifytypes.h:141
@ SEARCH_STORE_FAILED_CANT_SEARCH_ANYMORE
Definition: notifytypes.h:144
@ SEARCH_STORE_FAILED_NO_INFORMATION
Definition: notifytypes.h:146

References Actions::msg(), NotifyManager::notify(), NotifyTypes::SEARCH_STORE_FAILED, NotifyTypes::SEARCH_STORE_FAILED_CANT_SEARCH_ANYMORE, NotifyTypes::SEARCH_STORE_FAILED_CANT_SEARCH_YET, NotifyTypes::SEARCH_STORE_FAILED_MANY_RESULTS, NotifyTypes::SEARCH_STORE_FAILED_NO_INFORMATION, NotifyTypes::SEARCH_STORE_FAILED_NO_STORES, and UNIMPLEMENTEDPACKET.

◆ processSearchOpen()

void EAthena::SearchStoreRecv::processSearchOpen ( Net::MessageIn msg)

Definition at line 106 of file searchstorerecv.cpp.

107 {
109  msg.readInt16("effect");
110  if (msg.getVersion() >= 20100701)
111  msg.readUInt8("uses");
112 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.