ClubMessages.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. /*-------------------------------------------------------------------------
  2. * \src\Club\ClubMessages.h
  3. *
  4. * Interface between AllClub and Allegiance
  5. *
  6. * Owner:
  7. *
  8. * Copyright 1986-2000 Microsoft Corporation, All Rights Reserved
  9. *-----------------------------------------------------------------------*/
  10. #ifndef _MESSAGES_ALLCLUB_H_
  11. #define _MESSAGES_ALLCLUB_H_
  12. #include "MessageCore.h"
  13. #define ALLCLUBVER 10
  14. #ifndef CivID
  15. typedef short CivID;
  16. #endif
  17. #ifndef RankID
  18. typedef short RankID;
  19. #endif
  20. /*
  21. *************************************************
  22. MESSAGES START HERE
  23. Messages range for this file is 321 - 400
  24. *************************************************
  25. Message prefixes:
  26. S_ AllClub to client
  27. C_ client to AllClub
  28. CS_ both ways
  29. */
  30. DEFINE_FEDMSG(C, LOGON_CLUB, 321)
  31. FM_VAR_ITEM(CharacterName);
  32. FM_VAR_ITEM(ZoneTicket); // Encrypted
  33. short verClub;
  34. END_FEDMSG
  35. DEFINE_FEDMSG(C, LOGOFF_CLUB, 322) // note: we don't care whether they joined a game or quit altogether
  36. END_FEDMSG
  37. DEFINE_FEDMSG(S, LOGON_CLUB_ACK, 323)
  38. int nMemberID;
  39. END_FEDMSG
  40. DEFINE_FEDMSG(S, LOGON_CLUB_NACK, 324) // tells client that they can't join the Club server
  41. FM_VAR_ITEM(Reason);
  42. bool fRetry;
  43. END_FEDMSG
  44. /****************************************************************************
  45. REQ_CHARACTER_INFO
  46. This message is sent when a zone character requests info about someone.
  47. Server responds with CHARACTER_INFO_GENERAL
  48. along with CHARACTER_INFO_BY_CIV messages.
  49. *****************************************************************************/
  50. DEFINE_FEDMSG(C, REQ_CHARACTER_INFO, 327)
  51. int nMemberID; // if -1, current member is used
  52. END_FEDMSG
  53. /****************************************************************************
  54. CHARACTER_INFO_BY_CIV
  55. This message is sent as a response to REQ_CHARACTER_INFO. All info
  56. is specific to a particular civ (or a sum of all civs).
  57. *****************************************************************************/
  58. DEFINE_FEDMSG(S, CHARACTER_INFO_BY_CIV, 329)
  59. FM_VAR_ITEM(szLastPlayed);
  60. CivID civid; // -1 means all civs
  61. short nRank;
  62. float fScore;
  63. short cBaseCaptures;
  64. short cBaseKills;
  65. short nRating;
  66. short cMinutesPlayed;
  67. short cKills;
  68. short cDeaths;
  69. short cWins;
  70. short cLosses;
  71. int nPromotionAt;
  72. END_FEDMSG
  73. /****************************************************************************
  74. CHARACTER_INFO_GENERAL
  75. This message is sent as a response to REQ_CHARACTER_INFO.
  76. It contains info that is not civ specific except medals.
  77. *****************************************************************************/
  78. DEFINE_FEDMSG(S, CHARACTER_INFO_GENERAL, 330)
  79. FM_VAR_ITEM(szName);
  80. FM_VAR_ITEM(szDescription);
  81. END_FEDMSG
  82. /****************************************************************************
  83. CHARACTER_INFO_MEDAL
  84. This message is sent as a response to REQ_CHARACTER_INFO.
  85. It contains info that is civ specific also related to medals.
  86. *****************************************************************************/
  87. DEFINE_FEDMSG(S, CHARACTER_INFO_MEDAL, 331)
  88. FM_VAR_ITEM(szName);
  89. FM_VAR_ITEM(szDescription);
  90. FM_VAR_ITEM(szSpecificInfo);
  91. FM_VAR_ITEM(szBitmap);
  92. int nSortRank;
  93. CivID civid;
  94. END_FEDMSG
  95. /****************************************************************************
  96. CHARACTER_INFO_EDIT_DESCRIPTION
  97. Client wants to change his description.
  98. *****************************************************************************/
  99. DEFINE_FEDMSG(C, CHARACTER_INFO_EDIT_DESCRIPTION, 332)
  100. FM_VAR_ITEM(szDescription);
  101. END_FEDMSG
  102. /****************************************************************************
  103. CHARACTER_INFO_SQUAD
  104. This message is sent as a response to REQ_CHARACTER_INFO.
  105. Several CHARACTER_INFO_SQUAD messages comprise all the squads the character
  106. belong to.
  107. *****************************************************************************/
  108. DEFINE_FEDMSG(S, CHARACTER_INFO_SQUAD, 334)
  109. FM_VAR_ITEM(szSquadName);
  110. int nSquadID;
  111. END_FEDMSG
  112. /****************************************************************************
  113. CHARACTER_INFO_METAL
  114. This message is sent as a response to REQ_CHARACTER_INFO.
  115. Several CHARACTER_INFO_METAL messages comprise all the metals the character
  116. has earned.
  117. *****************************************************************************/
  118. DEFINE_FEDMSG(S, CHARACTER_INFO_METAL, 335)
  119. FM_VAR_ITEM(szMetalName);
  120. FM_VAR_ITEM(szDescription);
  121. FM_VAR_ITEM(szSquadName);
  122. int nRanking; // not to be confused with player ranking
  123. END_FEDMSG
  124. DEFINE_FEDMSG(S, SQUAD_TEXT_MESSAGE, 336) // general text message sent to user at squads screen, usually an error
  125. FM_VAR_ITEM(szMsg);
  126. END_FEDMSG
  127. DEFINE_FEDMSG(C, SQUAD_NEXT_PAGE_ALL, 337)
  128. SQUAD_SORT_COLUMN column;
  129. int nSquadID; // -1 means top
  130. END_FEDMSG
  131. DEFINE_FEDMSG(C, SQUAD_NEXT_PAGE_MY, 338)
  132. END_FEDMSG
  133. DEFINE_FEDMSG(C, SQUAD_NEXT_PAGE_DUDEX, 339)
  134. int nMemberID;
  135. END_FEDMSG
  136. DEFINE_FEDMSG(C, SQUAD_PAGE_FIND, 340) // find squad based on a partial name
  137. FM_VAR_ITEM(szPartialName);
  138. END_FEDMSG
  139. DEFINE_FEDMSG(C, SQUAD_DUDEX_LIST, 341)
  140. // This message is sent when an interactive user presses on the My or DudeX tab.
  141. // Server Responds with several SQUAD_INFO messages. The squads sent are the ones associated with DudeX.
  142. int nMemberID; // Same Member ID as Interactive User for "My" tab
  143. END_FEDMSG
  144. DEFINE_FEDMSG(C, SQUAD_CREATE, 342)
  145. FM_VAR_ITEM(szName);
  146. FM_VAR_ITEM(szDescription);
  147. FM_VAR_ITEM(szURL);
  148. CivID civid;
  149. int nClientSquadID;
  150. END_FEDMSG
  151. DEFINE_FEDMSG(S, SQUAD_CREATE_ACK, 343) // map client's squad ID to the true squad ID, determined by Zone database server
  152. int nClientSquadID;
  153. int nSquadID; // true ID
  154. bool bSuccessful; // was create successful
  155. END_FEDMSG
  156. DEFINE_FEDMSG(C, SQUAD_EDIT, 344)
  157. FM_VAR_ITEM(szDescription);
  158. FM_VAR_ITEM(szURL);
  159. CivID civid;
  160. int nSquadID;
  161. END_FEDMSG
  162. DEFINE_FEDMSG(C, SQUAD_DETAILS_REQ, 345)
  163. // Server Responds with SQUAD_DETAILS
  164. int nSquadID;
  165. END_FEDMSG
  166. DEFINE_FEDMSG(C, SQUAD_LOG_REQ, 346)
  167. // Server Responds with a LOG_INFO
  168. int nSquadID;
  169. END_FEDMSG
  170. DEFINE_FEDMSG(C, SQUAD_MAKE_JOIN_REQUEST, 348)
  171. int nSquadID;
  172. END_FEDMSG
  173. DEFINE_FEDMSG(C, SQUAD_CANCEL_JOIN_REQUEST, 349)
  174. int nSquadID;
  175. END_FEDMSG
  176. DEFINE_FEDMSG(C, SQUAD_REJECT_JOIN_REQUEST, 350)
  177. int nMemberID;
  178. int nSquadID;
  179. END_FEDMSG
  180. DEFINE_FEDMSG(C, SQUAD_ACCEPT_JOIN_REQUEST, 351)
  181. int nMemberID;
  182. int nSquadID;
  183. END_FEDMSG
  184. DEFINE_FEDMSG(C, SQUAD_BOOT_MEMBER, 352)
  185. int nMemberID;
  186. int nSquadID;
  187. END_FEDMSG
  188. DEFINE_FEDMSG(C, SQUAD_QUIT, 353)
  189. int nSquadID;
  190. END_FEDMSG
  191. DEFINE_FEDMSG(C, SQUAD_PROMOTE_TO_ASL, 354)
  192. int nMemberID;
  193. int nSquadID;
  194. END_FEDMSG
  195. DEFINE_FEDMSG(C, SQUAD_DEMOTE_TO_MEMBER, 355)
  196. int nMemberID;
  197. int nSquadID;
  198. END_FEDMSG
  199. DEFINE_FEDMSG(C, SQUAD_TRANSFER_CONTROL, 356)
  200. // Previous leader becomes an ASL
  201. int nMemberID;
  202. int nSquadID;
  203. END_FEDMSG
  204. DEFINE_FEDMSG(S, SQUAD_INFO, 358)
  205. FM_VAR_ITEM(szName);
  206. bool bSearchResult:1; // true iff result of a search
  207. unsigned char column:3; // ranking is always in terms of a column
  208. int nSquadID;
  209. int nRanking;
  210. short cWins;
  211. short cLosses;
  212. short nScore;
  213. // float fHours; // hours that interactive user has played on this squad
  214. END_FEDMSG
  215. DEFINE_FEDMSG(S, SQUAD_INFO_DUDEX, 359)
  216. FM_VAR_ITEM(szName);
  217. bool bMyTab; // false for DudeX tab
  218. int nSquadID;
  219. short cWins;
  220. short cLosses;
  221. short nScore;
  222. // float fHours; // hours that interactive user has played on this squad
  223. END_FEDMSG
  224. DEFINE_FEDMSG(S, SQUAD_DETAILS, 361)
  225. FM_VAR_ITEM(szDescription);
  226. FM_VAR_ITEM(szURL);
  227. FM_VAR_ITEM(szInceptionDate);
  228. int nSquadID; // used to ensure robustness
  229. CivID civid;
  230. END_FEDMSG
  231. DEFINE_FEDMSG(S, SQUAD_DETAILS_PLAYER, 362) // these aways follow a SQUAD_DETAILS message
  232. FM_VAR_ITEM(szName);
  233. FM_VAR_ITEM(szLastPlayed);
  234. int nMemberID;
  235. IMemberBase::Rank sqRank;
  236. IMemberBase::DetailedStatus detailedstatus;
  237. END_FEDMSG
  238. DEFINE_FEDMSG(S, SQUAD_LOG_INFO, 363)
  239. FM_VAR_ITEM(LogInfo);
  240. int nSquadID; // used to ensure robustness
  241. END_FEDMSG
  242. DEFINE_FEDMSG(S, SQUAD_DELETED, 364)
  243. int nSquadID;
  244. END_FEDMSG
  245. enum LeaderBoardSort
  246. {
  247. lbSortName,
  248. lbSortRank,
  249. lbSortRating,
  250. lbSortScore,
  251. lbSortTimePlayed,
  252. lbSortBaseKills,
  253. lbSortBaseCaptures,
  254. lbSortKills,
  255. lbSortGamesPlayed,
  256. lbSortDeaths,
  257. lbSortWins,
  258. lbSortLosses,
  259. lbSortCommanderWins
  260. };
  261. DEFINE_FEDMSG(C, LEADER_BOARD_QUERY, 365)
  262. char szBasis[c_cbName]; // the character to use as a refrence
  263. // point for the location in the list,
  264. // or "" to use idBasis.
  265. int idBasis; // the id of the basis character, or -1 for the top of the list
  266. CivID civid; // the civ to retrieve scores from, or NA for any civ
  267. LeaderBoardSort sort; // the sort to use
  268. END_FEDMSG
  269. struct LeaderBoardEntry
  270. {
  271. char CharacterName[c_cbName];
  272. int idCharacter;
  273. int nPosition;
  274. float fTotalScore;
  275. int nMinutesPlayed;
  276. short cTotalBaseKills;
  277. short cTotalBaseCaptures;
  278. short cTotalKills;
  279. short cTotalDeaths;
  280. short rank;
  281. short rating;
  282. unsigned short cTotalWins;
  283. unsigned short cTotalLosses;
  284. unsigned short cTotalGamesPlayed;
  285. unsigned short cTotalCommanderWins;
  286. };
  287. DEFINE_FEDMSG(S, LEADER_BOARD_QUERY_FAIL, 366)
  288. char szBasis[c_cbName]; // the character we failed to find
  289. END_FEDMSG
  290. DEFINE_FEDMSG(S, LEADER_BOARD_LIST, 367)
  291. FM_VAR_ITEM(ventryPlayers); // an array of LeaderBoardEntry structures (first entry is number 1)
  292. int cEntries;
  293. LeaderBoardEntry entryNumber1; // the highest or lowest ranked player
  294. END_FEDMSG
  295. #ifndef _MESSAGES_
  296. // keep in sync with copy in Messages.h
  297. struct RankInfo
  298. {
  299. int requiredRanking;
  300. CivID civ;
  301. RankID rank;
  302. char RankName[c_cbName];
  303. };
  304. #endif //_MESSAGES_
  305. DEFINE_FEDMSG(S, CLUB_RANK_INFO, 368)
  306. FM_VAR_ITEM(ranks); // an array of RankInfo sorted by civ, then rank
  307. short cRanks;
  308. END_FEDMSG
  309. #endif // _MESSAGES_ALLCLUB_H_