clif.hpp 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef CLIF_HPP
  4. #define CLIF_HPP
  5. #include <cstdarg>
  6. #include <vector>
  7. #include <common/cbasetypes.hpp>
  8. #include <common/db.hpp> //dbmap
  9. #include <common/mmo.hpp>
  10. #include <common/timer.hpp> // t_tick
  11. #include "packets.hpp"
  12. #include "script.hpp"
  13. #include "trade.hpp"
  14. struct Channel;
  15. struct clan;
  16. struct item;
  17. struct s_storage;
  18. //#include "map.hpp"
  19. struct block_list;
  20. struct unit_data;
  21. class map_session_data;
  22. struct homun_data;
  23. struct pet_data;
  24. struct mob_data;
  25. struct npc_data;
  26. struct chat_data;
  27. struct flooritem_data;
  28. struct skill_unit;
  29. struct s_vending;
  30. struct party;
  31. struct party_data;
  32. struct mmo_guild;
  33. struct s_battleground_data;
  34. struct quest;
  35. struct party_booking_ad_info;
  36. struct sale_item_data;
  37. struct mail_message;
  38. struct achievement;
  39. struct guild_log_entry;
  40. enum e_guild_storage_log : uint16;
  41. enum e_bg_queue_apply_ack : uint16;
  42. enum e_instance_notify : uint8;
  43. struct s_laphine_synthesis;
  44. struct s_laphine_upgrade;
  45. struct s_captcha_data;
  46. enum e_macro_detect_status : uint8;
  47. enum e_macro_report_status : uint8;
  48. enum e_hom_state2 : uint8;
  49. enum _sp;
  50. enum e_searchstore_failure : uint16;
  51. enum e_PacketDBVersion { // packet DB
  52. MIN_PACKET_DB = 0x064,
  53. MAX_PACKET_DB = 0xCFF,
  54. #if !defined(MAX_PACKET_POS)
  55. MAX_PACKET_POS = 20,
  56. #endif
  57. };
  58. struct s_packet_db {
  59. int16 len;
  60. void (*func)(int32, map_session_data *);
  61. int16 pos[MAX_PACKET_POS];
  62. };
  63. #ifdef PACKET_OBFUSCATION
  64. /// Keys based on packet versions
  65. struct s_packet_keys {
  66. uint32 keys[3]; ///< 3-Keys
  67. };
  68. #endif
  69. enum e_CASHSHOP_ACK : uint8_t{
  70. ERROR_TYPE_NONE = 0, ///< The deal has successfully completed.
  71. ERROR_TYPE_NPC = 1, ///< The Purchase has failed because the NPC does not exist.
  72. ERROR_TYPE_SYSTEM = 2, ///< The Purchase has failed because the Kafra Shop System is not working correctly.
  73. ERROR_TYPE_INVENTORY_WEIGHT = 3, ///< You are over your Weight Limit.
  74. ERROR_TYPE_EXCHANGE = 4, ///< You cannot purchase items while you are in a trade.
  75. ERROR_TYPE_ITEM_ID = 5, ///< The Purchase has failed because the Item Information was incorrect.
  76. ERROR_TYPE_MONEY = 6, ///< You do not have enough Kafra Credit Points.
  77. ERROR_TYPE_AMOUNT = 7, ///< You can purchase up to 10 items.
  78. ERROR_TYPE_PURCHASE_FAIL = 8, ///< Some items could not be purchased.
  79. };
  80. enum e_BANKING_DEPOSIT_ACK : uint8_t {
  81. BDA_SUCCESS = 0x0,
  82. BDA_ERROR = 0x1,
  83. BDA_NO_MONEY = 0x2,
  84. BDA_OVERFLOW = 0x3,
  85. };
  86. enum e_BANKING_WITHDRAW_ACK : uint8_t {
  87. BWA_SUCCESS = 0x0,
  88. BWA_NO_MONEY = 0x1,
  89. BWA_UNKNOWN_ERROR = 0x2,
  90. };
  91. enum RECV_ROULETTE_ITEM_REQ : uint8_t {
  92. RECV_ITEM_SUCCESS = 0x0,
  93. RECV_ITEM_FAILED = 0x1,
  94. RECV_ITEM_OVERCOUNT = 0x2,
  95. RECV_ITEM_OVERWEIGHT = 0x3,
  96. };
  97. enum RECV_ROULETTE_ITEM_ACK : uint8_t {
  98. RECV_ITEM_NORMAL = 0x0,
  99. RECV_ITEM_LOSING = 0x1,
  100. };
  101. enum GENERATE_ROULETTE_ACK : uint8_t {
  102. GENERATE_ROULETTE_SUCCESS = 0x0,
  103. GENERATE_ROULETTE_FAILED = 0x1,
  104. GENERATE_ROULETTE_NO_ENOUGH_POINT = 0x2,
  105. GENERATE_ROULETTE_LOSING = 0x3,
  106. };
  107. enum OPEN_ROULETTE_ACK : uint8_t {
  108. OPEN_ROULETTE_SUCCESS = 0x0,
  109. OPEN_ROULETTE_FAILED = 0x1,
  110. };
  111. enum CLOSE_ROULETTE_ACK : uint8_t {
  112. CLOSE_ROULETTE_SUCCESS = 0x0,
  113. CLOSE_ROULETTE_FAILED = 0x1,
  114. };
  115. enum MERGE_ITEM_ACK : uint8_t {
  116. MERGE_ITEM_SUCCESS = 0x0,
  117. MERGE_ITEM_FAILED_NOT_MERGE = 0x1,
  118. MERGE_ITEM_FAILED_MAX_COUNT = 0x2,
  119. };
  120. enum BROADCASTING_SPECIAL_ITEM_OBTAIN : uint8_t {
  121. ITEMOBTAIN_TYPE_BOXITEM = 0x0,
  122. ITEMOBTAIN_TYPE_MONSTER_ITEM = 0x1,
  123. ITEMOBTAIN_TYPE_NPC = 0x2,
  124. };
  125. enum e_adopt_reply : uint8_t {
  126. ADOPT_REPLY_MORE_CHILDREN = 0,
  127. ADOPT_REPLY_LEVEL_70,
  128. ADOPT_REPLY_MARRIED,
  129. };
  130. enum e_wip_block : uint8_t {
  131. WIP_DISABLE_NONE = 0x0,
  132. WIP_DISABLE_SKILLITEM = 0x1,
  133. WIP_DISABLE_NPC = 0x2,
  134. WIP_DISABLE_ALL = 0x3,
  135. };
  136. enum e_party_invite_reply {
  137. PARTY_REPLY_JOIN_OTHER_PARTY = 0, ///< result=0 : "The Character already joined another party." -> MsgStringTable[80]
  138. PARTY_REPLY_REJECTED, ///< result=1 : "Request for party rejected." -> MsgStringTable[81]
  139. PARTY_REPLY_ACCEPTED, ///< result=2 : "Request for party accepted." -> MsgStringTable[82]
  140. PARTY_REPLY_FULL, ///< result=3 : "Party Capacity exceeded." -> MsgStringTable[83]
  141. PARTY_REPLY_DUAL, ///< result=4 : "Character in the same account already joined." -> MsgStringTable[608]
  142. PARTY_REPLY_JOINMSG_REFUSE, ///< result=5 : "The character blocked the party invitation." -> MsgStringTable[1324] (since 20070904)
  143. PARTY_REPLY_UNKNOWN_ERROR, ///< result=6 : ??
  144. PARTY_REPLY_OFFLINE, ///< result=7 : "The Character is not currently online or does not exist." -> MsgStringTable[71] (since 20070904)
  145. PARTY_REPLY_INVALID_MAPPROPERTY, ///< result=8 : !TODO "Unable to organize a party in this map" -> MsgStringTable[1388] (since 20080527)
  146. PARTY_REPLY_INVALID_MAPPROPERTY_ME, ///< return=9 : !TODO "Cannot join a party in this map" -> MsgStringTable[1871] (since 20110205)
  147. PARTY_REPLY_MEMORIALDUNGEON, ///< return=10: "You cannot invite or withdraw while in memorial dungeon" -> MsgStringTable[3027] (since 20161130)
  148. };
  149. /// Enum for Convex Mirror (SC_BOSSMAPINFO)
  150. enum e_bossmap_info {
  151. BOSS_INFO_NOT = 0,
  152. BOSS_INFO_ALIVE,
  153. BOSS_INFO_ALIVE_WITHMSG,
  154. BOSS_INFO_DEAD,
  155. };
  156. enum class e_purchase_result : uint8{
  157. PURCHASE_SUCCEED = 0x0,
  158. PURCHASE_FAIL_MONEY,
  159. PURCHASE_FAIL_WEIGHT,
  160. PURCHASE_FAIL_COUNT,
  161. PURCHASE_FAIL_STOCK,
  162. PURCHASE_FAIL_ITEM_EXCHANGING,
  163. PURCHASE_FAIL_INVALID_MCSTORE,
  164. PURCHASE_FAIL_OPEN_MCSTORE_ITEMLIST,
  165. PURCHASE_FAIL_GIVE_MONEY,
  166. PURCHASE_FAIL_EACHITEM_COUNT,
  167. // Unknown names
  168. PURCHASE_FAIL_RODEX,
  169. PURCHASE_FAIL_EXCHANGE_FAILED,
  170. PURCHASE_FAIL_EXCHANGE_DONE,
  171. PURCHASE_FAIL_STOCK_EMPTY,
  172. PURCHASE_FAIL_GOODS,
  173. // End unknown names
  174. PURCHASE_FAIL_ADD = 0xff,
  175. };
  176. #define packet_len(cmd) packet_db[cmd].len
  177. extern struct s_packet_db packet_db[MAX_PACKET_DB+1];
  178. // local define
  179. enum send_target : uint8_t {
  180. ALL_CLIENT = 0,
  181. ALL_SAMEMAP,
  182. AREA, // area
  183. AREA_WOS, // area, without self
  184. AREA_WOC, // area, without chatrooms
  185. AREA_WOSC, // area, without own chatroom
  186. AREA_CHAT_WOC, // hearable area, without chatrooms
  187. CHAT, // current chatroom
  188. CHAT_WOS, // current chatroom, without self
  189. PARTY,
  190. PARTY_WOS,
  191. PARTY_SAMEMAP,
  192. PARTY_SAMEMAP_WOS,
  193. PARTY_AREA,
  194. PARTY_AREA_WOS,
  195. GUILD,
  196. GUILD_WOS,
  197. GUILD_SAMEMAP,
  198. GUILD_SAMEMAP_WOS,
  199. GUILD_AREA,
  200. GUILD_AREA_WOS,
  201. GUILD_NOBG,
  202. DUEL,
  203. DUEL_WOS,
  204. SELF,
  205. BG, // BattleGround System
  206. BG_WOS,
  207. BG_SAMEMAP,
  208. BG_SAMEMAP_WOS,
  209. BG_AREA,
  210. BG_AREA_WOS,
  211. CLAN, // Clan System
  212. };
  213. enum broadcast_flags : uint8_t {
  214. BC_ALL = 0,
  215. BC_MAP = 1,
  216. BC_AREA = 2,
  217. BC_SELF = 3,
  218. BC_TARGET_MASK = 0x07,
  219. BC_PC = 0x00,
  220. BC_NPC = 0x08,
  221. BC_SOURCE_MASK = 0x08, // BC_PC|BC_NPC
  222. BC_YELLOW = 0x00,
  223. BC_BLUE = 0x10,
  224. BC_WOE = 0x20,
  225. BC_COLOR_MASK = 0x30, // BC_YELLOW|BC_BLUE|BC_WOE
  226. BC_DEFAULT = BC_ALL|BC_PC|BC_YELLOW
  227. };
  228. enum emotion_type {
  229. ET_SURPRISE = 0, // /!
  230. ET_QUESTION, // /?
  231. ET_DELIGHT,
  232. ET_THROB,
  233. ET_SWEAT,
  234. ET_AHA,
  235. ET_FRET,
  236. ET_ANGER,
  237. ET_MONEY, // /$
  238. ET_THINK, // /...
  239. ET_SCISSOR, // /gawi --- 10
  240. ET_ROCK, // /bawi
  241. ET_WRAP, // /bo
  242. ET_FLAG,
  243. ET_BIGTHROB,
  244. ET_THANKS,
  245. ET_KEK,
  246. ET_SORRY,
  247. ET_SMILE,
  248. ET_PROFUSELY_SWEAT,
  249. ET_SCRATCH, // --- 20
  250. ET_BEST,
  251. ET_STARE_ABOUT, // /??
  252. ET_HUK,
  253. ET_O,
  254. ET_X,
  255. ET_HELP,
  256. ET_GO,
  257. ET_CRY,
  258. ET_KIK,
  259. ET_CHUP, // --- 30
  260. ET_CHUPCHUP,
  261. ET_HNG,
  262. ET_OK,
  263. ET_CHAT_PROHIBIT, // red /... used for muted characters
  264. ET_INDONESIA_FLAG,
  265. ET_STARE, // /bzz, /stare
  266. ET_HUNGRY,
  267. ET_COOL, // /awsm, /cool
  268. ET_MERONG,
  269. ET_SHY, // --- 40
  270. ET_GOODBOY, // /pat, /goodboy
  271. ET_SPTIME, // /mp, /sptime
  272. ET_SEXY,
  273. ET_COMEON, // /com, /comeon
  274. ET_SLEEPY, // /yawn, /sleepy
  275. ET_CONGRATULATION, // /grat, /congrats
  276. ET_HPTIME, // /hp, /hptime
  277. ET_PH_FLAG,
  278. ET_MY_FLAG,
  279. ET_SI_FLAG, // --- 50
  280. ET_BR_FLAG,
  281. ET_SPARK, // /fsh
  282. ET_CONFUSE, // /spin
  283. ET_OHNO,
  284. ET_HUM, // /dum
  285. ET_BLABLA, // /crwd
  286. ET_OTL, // /otl, /desp
  287. ET_DICE1,
  288. ET_DICE2,
  289. ET_DICE3, // --- 60
  290. ET_DICE4,
  291. ET_DICE5,
  292. ET_DICE6,
  293. ET_INDIA_FLAG,
  294. ET_LUV, // /love
  295. ET_FLAG8,
  296. ET_FLAG9,
  297. ET_MOBILE,
  298. ET_MAIL,
  299. ET_ANTENNA0, // --- 70
  300. ET_ANTENNA1,
  301. ET_ANTENNA2,
  302. ET_ANTENNA3,
  303. ET_HUM2,
  304. ET_ABS,
  305. ET_OOPS,
  306. ET_SPIT,
  307. ET_ENE,
  308. ET_PANIC,
  309. ET_WHISP, // --- 80
  310. ET_YUT1,
  311. ET_YUT2,
  312. ET_YUT3,
  313. ET_YUT4,
  314. ET_YUT5,
  315. ET_YUT6,
  316. ET_YUT7,
  317. //
  318. ET_MAX
  319. };
  320. enum clr_type : uint8_t
  321. {
  322. CLR_OUTSIGHT = 0,
  323. CLR_DEAD,
  324. CLR_RESPAWN,
  325. CLR_TELEPORT,
  326. CLR_TRICKDEAD,
  327. };
  328. enum map_property : uint8_t
  329. {// clif_map_property
  330. MAPPROPERTY_NOTHING = 0,
  331. MAPPROPERTY_FREEPVPZONE = 1,
  332. MAPPROPERTY_EVENTPVPZONE = 2,
  333. MAPPROPERTY_AGITZONE = 3,
  334. MAPPROPERTY_PKSERVERZONE = 4, // message "You are in a PK area. Please beware of sudden attacks." in color 0x9B9BFF (light red)
  335. MAPPROPERTY_PVPSERVERZONE = 5,
  336. MAPPROPERTY_DENYSKILLZONE = 6,
  337. };
  338. enum e_map_type : uint8_t
  339. {// clif_map_type
  340. MAPTYPE_VILLAGE = 0,
  341. MAPTYPE_VILLAGE_IN = 1,
  342. MAPTYPE_FIELD = 2,
  343. MAPTYPE_DUNGEON = 3,
  344. MAPTYPE_ARENA = 4,
  345. MAPTYPE_PENALTY_FREEPKZONE = 5,
  346. MAPTYPE_NOPENALTY_FREEPKZONE = 6,
  347. MAPTYPE_EVENT_GUILDWAR = 7,
  348. MAPTYPE_AGIT = 8,
  349. MAPTYPE_DUNGEON2 = 9,
  350. MAPTYPE_DUNGEON3 = 10,
  351. MAPTYPE_PKSERVER = 11,
  352. MAPTYPE_PVPSERVER = 12,
  353. MAPTYPE_DENYSKILL = 13,
  354. MAPTYPE_TURBOTRACK = 14,
  355. MAPTYPE_JAIL = 15,
  356. MAPTYPE_MONSTERTRACK = 16,
  357. MAPTYPE_PORINGBATTLE = 17,
  358. MAPTYPE_AGIT_SIEGEV15 = 18,
  359. MAPTYPE_BATTLEFIELD = 19,
  360. MAPTYPE_PVP_TOURNAMENT = 20,
  361. //Map types 21 - 24 not used.
  362. MAPTYPE_SIEGE_LOWLEVEL = 25,
  363. //Map types 26 - 28 remains opens for future types.
  364. MAPTYPE_UNUSED = 29,
  365. };
  366. enum useskill_fail_cause : uint8_t
  367. {// clif_skill_fail
  368. USESKILL_FAIL_LEVEL = 0,
  369. USESKILL_FAIL_SP_INSUFFICIENT = 1,
  370. USESKILL_FAIL_HP_INSUFFICIENT = 2,
  371. USESKILL_FAIL_STUFF_INSUFFICIENT = 3,
  372. USESKILL_FAIL_SKILLINTERVAL = 4,
  373. USESKILL_FAIL_MONEY = 5,
  374. USESKILL_FAIL_THIS_WEAPON = 6,
  375. USESKILL_FAIL_REDJAMSTONE = 7,
  376. USESKILL_FAIL_BLUEJAMSTONE = 8,
  377. USESKILL_FAIL_WEIGHTOVER = 9,
  378. USESKILL_FAIL = 10,
  379. USESKILL_FAIL_TOTARGET = 11,
  380. USESKILL_FAIL_ANCILLA_NUMOVER = 12,
  381. USESKILL_FAIL_HOLYWATER = 13,
  382. USESKILL_FAIL_ANCILLA = 14,
  383. USESKILL_FAIL_DUPLICATE_RANGEIN = 15,
  384. USESKILL_FAIL_NEED_OTHER_SKILL = 16,
  385. USESKILL_FAIL_NEED_HELPER = 17,
  386. USESKILL_FAIL_INVALID_DIR = 18,
  387. USESKILL_FAIL_SUMMON = 19,
  388. USESKILL_FAIL_SUMMON_NONE = 20,
  389. USESKILL_FAIL_IMITATION_SKILL_NONE = 21,
  390. USESKILL_FAIL_DUPLICATE = 22,
  391. USESKILL_FAIL_CONDITION = 23,
  392. USESKILL_FAIL_PAINTBRUSH = 24,
  393. USESKILL_FAIL_DRAGON = 25,
  394. USESKILL_FAIL_POS = 26,
  395. USESKILL_FAIL_HELPER_SP_INSUFFICIENT = 27,
  396. USESKILL_FAIL_NEER_WALL = 28,
  397. USESKILL_FAIL_NEED_EXP_1PERCENT = 29,
  398. USESKILL_FAIL_CHORUS_SP_INSUFFICIENT = 30,
  399. USESKILL_FAIL_GC_WEAPONBLOCKING = 31,
  400. USESKILL_FAIL_GC_POISONINGWEAPON = 32,
  401. USESKILL_FAIL_MADOGEAR = 33,
  402. USESKILL_FAIL_NEED_EQUIPMENT_KUNAI = 34,
  403. USESKILL_FAIL_TOTARGET_PLAYER = 35,
  404. USESKILL_FAIL_SIZE = 36,
  405. USESKILL_FAIL_CANONBALL = 37,
  406. //XXX_USESKILL_FAIL_II_MADOGEAR_ACCELERATION = 38,
  407. //XXX_USESKILL_FAIL_II_MADOGEAR_HOVERING_BOOSTER = 39,
  408. USESKILL_FAIL_MADOGEAR_HOVERING = 40,
  409. //XXX_USESKILL_FAIL_II_MADOGEAR_SELFDESTRUCTION_DEVICE = 41,
  410. //XXX_USESKILL_FAIL_II_MADOGEAR_SHAPESHIFTER = 42,
  411. USESKILL_FAIL_GUILLONTINE_POISON = 43,
  412. //XXX_USESKILL_FAIL_II_MADOGEAR_COOLING_DEVICE = 44,
  413. //XXX_USESKILL_FAIL_II_MADOGEAR_MAGNETICFIELD_GENERATOR = 45,
  414. //XXX_USESKILL_FAIL_II_MADOGEAR_BARRIER_GENERATOR = 46,
  415. //XXX_USESKILL_FAIL_II_MADOGEAR_OPTICALCAMOUFLAGE_GENERATOR = 47,
  416. //XXX_USESKILL_FAIL_II_MADOGEAR_REPAIRKIT = 48,
  417. //XXX_USESKILL_FAIL_II_MONKEY_SPANNER = 49,
  418. USESKILL_FAIL_MADOGEAR_RIDE = 50,
  419. USESKILL_FAIL_SPELLBOOK = 51,
  420. USESKILL_FAIL_SPELLBOOK_DIFFICULT_SLEEP = 52,
  421. USESKILL_FAIL_SPELLBOOK_PRESERVATION_POINT = 53,
  422. USESKILL_FAIL_SPELLBOOK_READING = 54,
  423. //XXX_USESKILL_FAIL_II_FACE_PAINTS = 55,
  424. //XXX_USESKILL_FAIL_II_MAKEUP_BRUSH = 56,
  425. USESKILL_FAIL_CART = 57,
  426. //XXX_USESKILL_FAIL_II_THORNS_SEED = 58,
  427. //XXX_USESKILL_FAIL_II_BLOOD_SUCKER_SEED = 59,
  428. USESKILL_FAIL_NO_MORE_SPELL = 60,
  429. //XXX_USESKILL_FAIL_II_BOMB_MUSHROOM_SPORE = 61,
  430. //XXX_USESKILL_FAIL_II_GASOLINE_BOOMB = 62,
  431. //XXX_USESKILL_FAIL_II_OIL_BOTTLE = 63,
  432. //XXX_USESKILL_FAIL_II_EXPLOSION_POWDER = 64,
  433. //XXX_USESKILL_FAIL_II_SMOKE_POWDER = 65,
  434. //XXX_USESKILL_FAIL_II_TEAR_GAS = 66,
  435. //XXX_USESKILL_FAIL_II_HYDROCHLORIC_ACID_BOTTLE = 67,
  436. //XXX_USESKILL_FAIL_II_HELLS_PLANT_BOTTLE = 68,
  437. //XXX_USESKILL_FAIL_II_MANDRAGORA_FLOWERPOT = 69,
  438. USESKILL_FAIL_MANUAL_NOTIFY = 70,
  439. // CAUTION: client uses unidentified display name for displaying the required item. Still broken on 2017-05-31 [Lemongrass]
  440. USESKILL_FAIL_NEED_ITEM = 71,
  441. USESKILL_FAIL_NEED_EQUIPMENT = 72,
  442. USESKILL_FAIL_COMBOSKILL = 73,
  443. USESKILL_FAIL_SPIRITS = 74,
  444. USESKILL_FAIL_EXPLOSIONSPIRITS = 75,
  445. USESKILL_FAIL_HP_TOOMANY = 76,
  446. USESKILL_FAIL_NEED_ROYAL_GUARD_BANDING = 77,
  447. USESKILL_FAIL_NEED_EQUIPPED_WEAPON_CLASS = 78,
  448. USESKILL_FAIL_EL_SUMMON = 79,
  449. USESKILL_FAIL_RELATIONGRADE = 80,
  450. USESKILL_FAIL_STYLE_CHANGE_FIGHTER = 81,
  451. USESKILL_FAIL_STYLE_CHANGE_GRAPPLER = 82,
  452. USESKILL_FAIL_THERE_ARE_NPC_AROUND = 83,
  453. USESKILL_FAIL_NEED_MORE_BULLET = 84,
  454. USESKILL_FAIL_COINS = 85,
  455. USESKILL_FAIL_SH_TEMPORARY_COMMUNION,
  456. USESKILL_FAIL_MAP,
  457. USESKILL_FAIL_NEED_SUMMON_SP,
  458. USESKILL_FAIL_SAME_VEND,
  459. USESKILL_FAIL_NEED_BULLETS,
  460. USESKILL_FAIL_NEED_ARROWS,
  461. USESKILL_FAIL_NEED_PARTY,
  462. USESKILL_FAIL_NEED_PARTY_LEADER,
  463. USESKILL_FAIL_NEED_PARTNER_SP,
  464. USESKILL_FAIL_NEED_WEAPON,
  465. USESKILL_FAIL_NEED_ENERGY_SPHERE,
  466. USESKILL_FAIL_NEED_WEAPON_BLOCKING,
  467. USESKILL_FAIL_MAX_TRAPS,
  468. USESKILL_FAIL_NEED_MAGIC_SPELLBOOK,
  469. USESKILL_FAIL_AP_INSUFFICIENT,
  470. USESKILL_FAIL_NEED_SERVANT_WEAPON,
  471. USESKILL_FAIL_NEED_TWINKLING_GALAXY,
  472. USESKILL_FAIL_NEED_SOUL_ENGERY,
  473. USESKILL_FAIL_NEED_AMULET,
  474. USESKILL_FAIL_NEED_GATLING_SHOTGUT,
  475. USESKILL_FAIL_NEED_RIFLE_REVOLVER,
  476. USESKILL_FAIL_NEED_GLAUNCHER_RIFLE,
  477. USESKILL_FAIL_NEED_GATLING_REVOLVER,
  478. USESKILL_FAIL_NEED_SHOTGUN_GLAUNCHER,
  479. USESKILL_FAIL_NEED_SHIELD,
  480. USESKILL_FAIL_TARGET_SHADOW_SPACE,
  481. USESKILL_FAIL_MAX
  482. };
  483. enum clif_equipitemack_flag : uint8_t {
  484. #if PACKETVER_MAIN_NUM >= 20121205 || PACKETVER_RE_NUM >= 20121107 || defined(PACKETVER_ZERO)
  485. ITEM_EQUIP_ACK_OK = 0,
  486. ITEM_EQUIP_ACK_FAIL = 2,
  487. ITEM_EQUIP_ACK_FAILLEVEL = 1,
  488. #else
  489. ITEM_EQUIP_ACK_OK = 1,
  490. ITEM_EQUIP_ACK_FAIL = 0,
  491. ITEM_EQUIP_ACK_FAILLEVEL = 0,
  492. #endif
  493. };
  494. //! NOTE: These values below need client version validation
  495. // These values correspond to the msgstringtable line number minus 1
  496. enum e_clif_messages : uint16 {
  497. // You cannot carry more items because you are overweight.
  498. MSI_CANT_GET_ITEM_BECAUSE_WEIGHT = 52,
  499. // You can't have this item because you will exceed the weight limit.
  500. MSI_CANT_GET_ITEM_BECAUSE_COUNT = 220,
  501. // You can't put this item on.
  502. MSI_CAN_NOT_EQUIP_ITEM = 372,
  503. // You cannot use this item while sitting.
  504. MSI_CANT_USE_WHEN_SITDOWN = 663,
  505. // The party member was not summoned because you are not the party leader.
  506. MSI_CANNOT_PARTYCALL = 1221,
  507. // There is no party member to summon in the current map.
  508. MSI_NO_PARTYMEM_ON_THISMAP = 1222,
  509. // The mercenary contract has expired.
  510. MSI_MER_FINISH = 1266,
  511. // The mercenary has died.
  512. MSI_MER_DIE = 1267,
  513. // This skill cannot be used within this area.
  514. MSI_IMPOSSIBLE_SKILL_AREA = 1334,
  515. // This item cannot be used within this area.
  516. MSI_IMPOSSIBLE_USEITEM_AREA = 1335,
  517. // This character's equipment information is not open to the public.
  518. MSI_OPEN_EQUIPEDITEM_REFUSED = 1357,
  519. // Item can only be used when Mado Gear is mounted.
  520. MSI_USESKILL_FAIL_MADOGEAR = 1435,
  521. // Only available when cart is mounted.
  522. MSI_USESKILL_FAIL_CART = 1519,
  523. // Cannot create rune stone more than the maximum amount.
  524. MSI_RUNESTONE_MAKEERROR_OVERCOUNT = 1563,
  525. // Combination of item is not possible in conversion.
  526. MSI_SKILL_RECIPE_NOTEXIST = 1570,
  527. // Please ensure an extra space in your inventory.
  528. MSI_SKILL_INVENTORY_KINDCNT_OVER = 1572,
  529. // Successful.
  530. MSI_SKILL_SUCCESS = 1574,
  531. // Failed.
  532. MSI_SKILL_FAIL = 1575,
  533. // Items cannot be used in materials cannot be emotional.
  534. MSI_SKILL_FAIL_MATERIAL_IDENTITY = 1581,
  535. // [Bow] must be equipped.
  536. MSI_FAIL_NEED_EQUIPPED_BOW = 1691,
  537. #if (PACKETVER >= 20130807 && PACKETVER <= 20130814) && !defined(PACKETVER_ZERO)
  538. // %d seconds left until you can use
  539. MSI_ITEM_REUSE_LIMIT_SECOND = 1863,
  540. // Any work in progress (NPC dialog, manufacturing ...) quit and try again.
  541. MSI_BUSY = 1924,
  542. // While boarding reins is not available for items.
  543. MSI_FAIELD_RIDING_OVERLAPPED = 1932,
  544. // It is only possible to change the party leader while on the same map.
  545. MSI_PARTY_MASTER_CHANGE_SAME_MAP = 2095,
  546. // Merge items available does not exist.
  547. MSI_NOT_EXIST_MERGE_ITEM = 2184,
  548. // This bullet is not suitable for the weapon you are equipping.
  549. MSI_WRONG_BULLET = 2494,
  550. #else
  551. // %d seconds left until you can use
  552. MSI_ITEM_REUSE_LIMIT_SECOND = 1862,
  553. // Any work in progress (NPC dialog, manufacturing ...) quit and try again.
  554. MSI_BUSY = 1923,
  555. // While boarding reins is not available for items.
  556. MSI_FAIELD_RIDING_OVERLAPPED = 1931,
  557. // It is only possible to change the party leader while on the same map.
  558. MSI_PARTY_MASTER_CHANGE_SAME_MAP = 2094,
  559. // Merge items available does not exist.
  560. MSI_NOT_EXIST_MERGE_ITEM = 2183,
  561. // This bullet is not suitable for the weapon you are equipping.
  562. MSI_WRONG_BULLET = 2493,
  563. #endif
  564. // [Gatling Gun] weapon class must be equipped.
  565. MSI_FAIL_NEED_EQUIPPED_GUN_GATLING = 2554,
  566. // [Shotgun] weapon class must be equipped.
  567. MSI_FAIL_NEED_EQUIPPED_GUN_SHOTGUN = 2555,
  568. // [Rifle] weapon class must be equipped.
  569. MSI_FAIL_NEED_EQUIPPED_GUN_RIFLE = 2556,
  570. // [Revolver] weapon class must be equipped.
  571. MSI_FAIL_NEED_EQUIPPED_GUN_HANDGUN = 2557,
  572. // [Silver Bullet] must be equipped.
  573. MSI_FAIL_NEED_EQUIPPED_PROPERTY_SAINT_BULLET = 2558,
  574. // [Holy Water] must be equipped.
  575. MSI_FAIL_NEED_EQUIPPED_GUN_GRANADE = 2561,
  576. // [Grenade Launcher] weapon class must be equipped.
  577. MSI_IMPOSSIBLE_CHANGE_GUILD_MASTER_IN_SIEGE_TIME = 2963,
  578. // You have to wait for one day before delegating a new Guild leader
  579. MSI_IMPOSSIBLE_CHANGE_GUILD_MASTER_NOT_TIME = 2964,
  580. // This item has been set for Swap Equipment.
  581. MSI_SWAP_EQUIPITEM_UNREGISTER_FIRST = 3015,
  582. // Possession limit is over 70%, or you have less than 10 free inventory space.
  583. MSI_PICKUP_FAILED_ITEMCREATE = 3022,
  584. // Currently there is no attendance check event.
  585. MSI_CHECK_ATTENDANCE_NOT_EVENT = 3474,
  586. // The total amount of items to sell exceeds the amount of Zeny you can have. \nPlease modify the quantity and price.
  587. MSI_MERCHANTSHOP_TOTA_LOVER_ZENY_ERR = 3826,
  588. // It weighs more than 70%. Decrease the Weight and try again.
  589. MSI_ENCHANT_FAILED_OVER_WEIGHT = 3837,
  590. // Enchantment successful!
  591. MSI_ENCHANT_SUCCESS = 3857,
  592. // Enchantment failed!
  593. MSI_ENCHANT_FAILED = 3858,
  594. };
  595. enum e_personalinfo : uint8_t {
  596. PINFO_BASIC = 0,
  597. PINFO_PREMIUM,
  598. PINFO_SERVER,
  599. PINFO_CAFE,
  600. PINFO_MAX,
  601. };
  602. enum e_damage_type : uint8_t {
  603. DMG_NORMAL = 0, /// damage [ damage: total damage, div: amount of hits, damage2: assassin dual-wield damage ]
  604. DMG_PICKUP_ITEM, /// pick up item
  605. DMG_SIT_DOWN, /// sit down
  606. DMG_STAND_UP, /// stand up
  607. DMG_ENDURE, /// damage (endure)
  608. DMG_SPLASH, /// (splash?)
  609. DMG_SINGLE, /// (skill?)
  610. DMG_REPEAT, /// (repeat damage?)
  611. DMG_MULTI_HIT, /// multi-hit damage
  612. DMG_MULTI_HIT_ENDURE, /// multi-hit damage (endure)
  613. DMG_CRITICAL, /// critical hit
  614. DMG_LUCY_DODGE, /// lucky dodge
  615. DMG_TOUCH, /// (touch skill?)
  616. DMG_MULTI_HIT_CRITICAL, /// multi-hit with critical
  617. DMG_SPLASH_ENDURE, /// splash against target with endure status
  618. };
  619. enum class e_pet_evolution_result : uint32 {
  620. FAIL_UNKNOWN = 0x0,
  621. FAIL_NOTEXIST_CALLPET = 0x1,
  622. FAIL_NOT_PETEGG = 0x2,
  623. FAIL_RECIPE = 0x3,
  624. FAIL_MATERIAL = 0x4,
  625. FAIL_RG_FAMILIAR = 0x5,
  626. SUCCESS = 0x6
  627. };
  628. enum e_config_type : uint32 {
  629. CONFIG_OPEN_EQUIPMENT_WINDOW = 0,
  630. CONFIG_CALL,
  631. CONFIG_PET_AUTOFEED,
  632. CONFIG_HOMUNCULUS_AUTOFEED
  633. };
  634. enum e_memorial_dungeon_command : uint16 {
  635. COMMAND_MEMORIALDUNGEON_DESTROY_FORCE = 0x3,
  636. };
  637. enum e_exitem_add_result : uint8 {
  638. EXITEM_ADD_SUCCEED,
  639. EXITEM_ADD_FAILED_OVERWEIGHT,
  640. EXITEM_ADD_FAILED_CLOSED,
  641. EXITEM_ADD_FAILED_OVERCOUNT,
  642. EXITEM_ADD_FAILED_EACHITEM_OVERCOUNT,
  643. };
  644. enum e_dynamicnpc_result : int32{
  645. DYNAMICNPC_RESULT_SUCCESS,
  646. DYNAMICNPC_RESULT_UNKNOWN,
  647. DYNAMICNPC_RESULT_UNKNOWNNPC,
  648. DYNAMICNPC_RESULT_DUPLICATE,
  649. DYNAMICNPC_RESULT_OUTOFTIME
  650. };
  651. enum e_siege_teleport_result : uint8 {
  652. SIEGE_TP_SUCCESS = 0,
  653. SIEGE_TP_NOT_ENOUGH_ZENY = 1,
  654. SIEGE_TP_INVALID_MODE = 2
  655. };
  656. enum e_ack_remember_warppoint_result : uint8 {
  657. WARPPOINT_SUCCESS = 0,
  658. WARPPOINT_LOW_LEVEL = 1,
  659. WARPPOINT_NOT_LEARNED = 2
  660. };
  661. enum e_notify_mapinfo_result : uint8 {
  662. NOTIFY_MAPINFO_CANT_TP = 0,
  663. NOTIFY_MAPINFO_CANT_MEMO = 1,
  664. NOTIFY_MAPINFO_CANT_USE_SKILL = 2,
  665. NOTIFY_MAPINFO_CANT_USE_ITEM = 3,
  666. };
  667. enum e_ack_itemrefining : uint8 {
  668. ITEMREFINING_SUCCESS = 0,
  669. ITEMREFINING_FAILURE = 1,
  670. ITEMREFINING_DOWNGRADE = 2,
  671. ITEMREFINING_FAILURE2 = 3
  672. };
  673. enum e_refuse_enter_room : uint8 {
  674. ENTERROOM_FULL = 0,
  675. ENTERROOM_WRONG_PASSWORD = 1,
  676. ENTERROOM_KICKED = 2,
  677. ENTERROOM_SUCCESS = 3,
  678. ENTERROOM_NO_ZENY = 4,
  679. ENTERROOM_TOO_LOW_LEVEL = 5,
  680. ENTERROOM_TOO_HIGH_LEVEL = 6,
  681. ENTERROOM_UNSUITABLE_JOB = 7
  682. };
  683. enum e_create_chatroom : uint8 {
  684. CREATEROOM_SUCCESS = 0,
  685. CREATEROOM_LIMIT_EXCEEDED = 1,
  686. CREATEROOM_ALREADY_EXISTS = 2
  687. };
  688. enum e_status_chatroom : uint8 {
  689. STATUSROOM_PRIVATE = 0,
  690. STATUSROOM_PUBLIC,
  691. STATUSROOM_ARENA,
  692. STATUSROOM_PK_ZONE
  693. };
  694. enum e_action_failure : uint8 {
  695. ARROWFAIL_NO_AMMO = 0,
  696. ARROWFAIL_WEIGHT_LIMIT = 1,
  697. ARROWFAIL_WEIGHT_LIMIT2 = 2,
  698. ARROWFAIL_SUCCESS = 3
  699. };
  700. enum e_notify_effect : uint8 {
  701. NOTIFYEFFECT_BASE_LEVEL_UP = 0,
  702. NOTIFYEFFECT_JOB_LEVEL_UP = 1,
  703. NOTIFYEFFECT_REFINE_FAILURE = 2,
  704. NOTIFYEFFECT_REFINE_SUCCESS = 3,
  705. NOTIFYEFFECT_GAME_OVER = 4,
  706. NOTIFYEFFECT_PHARMACY_SUCCESS = 5,
  707. NOTIFYEFFECT_PHARMACY_FAILURE = 6,
  708. NOTIFYEFFECT_SUPER_NOVICE_BASE_LEVEL_UP = 7,
  709. NOTIFYEFFECT_SUPER_NOVICE_JOB_LEVEL_UP = 8,
  710. NOTIFYEFFECT_TAEKWON_BASE_LEVEL_UP = 9,
  711. };
  712. enum e_pc_purchase_result_frommc : uint8 {
  713. PURCHASEMC_SUCCESS = 0,
  714. PURCHASEMC_NO_ZENY = 1,
  715. PURCHASEMC_OVERWEIGHT = 2,
  716. PURCHASEMC_OUT_OF_STOCK = 4,
  717. PURCHASEMC_TRADING = 5,
  718. PURCHASEMC_STORE_INCORRECT = 6,
  719. PURCHASEMC_NO_SALES_INFO = 7,
  720. };
  721. enum e_ack_openstore2 : uint8 {
  722. // Success
  723. OPENSTORE2_SUCCESS = 0,
  724. // (Pop-up) Failed to open stalls. (MSI_MERCHANTSHOP_MAKING_FAIL / 2639)
  725. OPENSTORE2_FAILED = 1,
  726. // 2 is unused
  727. #if PACKETVER >= 20170419
  728. // Unable to open a shop at the current location. (MSI_MERCHANTSHOP_FAIL_POSITION / 3229)
  729. OPENSTORE2_NOVENDING = 3,
  730. #endif
  731. };
  732. enum e_ack_whisper : uint8 {
  733. ACKWHISPER_SUCCESS = 0,
  734. ACKWHISPER_TARGET_OFFLINE = 1,
  735. ACKWHISPER_IGNORED = 2,
  736. ACKWHISPER_ALL_IGNORED = 3
  737. };
  738. enum e_ack_additem_to_cart : uint8 {
  739. ADDITEM_TO_CART_FAIL_WEIGHT = 0,
  740. ADDITEM_TO_CART_FAIL_COUNT = 1
  741. };
  742. enum e_changestate_pet : uint8 {
  743. CHANGESTATEPET_INIT = 0,
  744. CHANGESTATEPET_INTIMACY = 1,
  745. CHANGESTATEPET_HUNGER = 2,
  746. CHANGESTATEPET_ACCESSORY = 3,
  747. CHANGESTATEPET_PERFORMANCE = 4,
  748. CHANGESTATEPET_HAIRSTYLE = 5,
  749. CHANGESTATEPET_UPDATE_EGG = 6,
  750. };
  751. int32 clif_setip(const char* ip);
  752. void clif_setbindip(const char* ip);
  753. void clif_setport(uint16 port);
  754. uint32 clif_getip(void);
  755. uint32 clif_refresh_ip(void);
  756. uint16 clif_getport(void);
  757. void clif_authok(map_session_data *sd);
  758. void clif_authrefuse(int32 fd, uint8 error_code);
  759. void clif_authfail_fd(int32 fd, int32 type);
  760. void clif_charselectok(int32 id, uint8 ok);
  761. void clif_dropflooritem(struct flooritem_data* fitem, bool canShowEffect);
  762. void clif_clearflooritem( flooritem_data& fitem, map_session_data* tsd = nullptr );
  763. void clif_clearunit_single( uint32 GID, clr_type type, map_session_data& tsd );
  764. void clif_clearunit_area( block_list& bl, clr_type type );
  765. void clif_clearunit_delayed(struct block_list* bl, clr_type type, t_tick tick);
  766. int32 clif_spawn(struct block_list *bl, bool walking = false); //area
  767. void clif_walkok( map_session_data& sd );
  768. void clif_move( struct unit_data& ud ); //area
  769. void clif_changemap( map_session_data& sd, int16 m, uint16 x, uint16 y );
  770. void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint16 y, uint32 ip, uint16 port );
  771. void clif_blown(struct block_list *bl); // area
  772. void clif_slide(block_list& bl, int32 x, int32 y); // area
  773. void clif_fixpos( block_list& bl );
  774. void clif_npcbuysell( map_session_data& sd, npc_data& nd );
  775. void clif_buylist( map_session_data& sd, npc_data& nd );
  776. void clif_selllist( map_session_data& sd );
  777. void clif_npc_market_open( map_session_data& sd, npc_data& nd );
  778. void clif_parse_NPCMarketClosed(int32 fd, map_session_data *sd);
  779. void clif_parse_NPCMarketPurchase(int32 fd, map_session_data *sd);
  780. void clif_scriptmes( map_session_data& sd, uint32 npcid, const char *mes );
  781. void clif_scriptnext( map_session_data& sd, uint32 npcid );
  782. void clif_scriptclose( map_session_data& sd, uint32 npcid );
  783. void clif_scriptclear( map_session_data& sd, int32 npcid ); //self
  784. void clif_scriptmenu( map_session_data& sd, uint32 npcid, const char* mes );
  785. void clif_scriptinput( map_session_data& sd, uint32 npcid );
  786. void clif_scriptinputstr( map_session_data& sd, uint32 npcid );
  787. void clif_cutin( map_session_data& sd, const char* image, int32 type );
  788. void clif_viewpoint( map_session_data& sd, uint32 npc_id, int32 type, uint16 x, uint16 y, int32 id, uint32 color );
  789. void clif_additem(map_session_data *sd, int32 n, int32 amount, unsigned char fail); // self
  790. void clif_dropitem( map_session_data& sd, int32 index, int32 amount );
  791. void clif_delitem( map_session_data& sd, int32 index, int32 amount, int16 reason );
  792. void clif_update_hp(map_session_data &sd);
  793. void clif_updatestatus( map_session_data& sd, _sp type );
  794. void clif_changemanner( map_session_data& sd );
  795. int32 clif_damage(block_list& src, block_list& dst, t_tick tick, int32 sdelay, int32 ddelay, int64 sdamage, int32 div, enum e_damage_type type, int64 sdamage2, bool spdamage); // area
  796. void clif_takeitem(block_list& src, block_list& dst);
  797. void clif_sitting(block_list& bl);
  798. void clif_standing(block_list& bl);
  799. void clif_sprite_change(struct block_list *bl, int32 id, int32 type, int32 val, int32 val2, enum send_target target);
  800. void clif_changelook(struct block_list *bl,int32 type,int32 val); // area
  801. void clif_changetraplook(struct block_list *bl,int32 val); // area
  802. void clif_refreshlook(struct block_list *bl,int32 id,int32 type,int32 val,enum send_target target); //area specified in 'target'
  803. void clif_arrowequip( map_session_data& sd );
  804. void clif_arrow_fail( map_session_data& sd, e_action_failure type );
  805. void clif_arrow_create_list( map_session_data& sd );
  806. void clif_statusupack( map_session_data& sd, int32 type, bool success, int32 val = 0 );
  807. void clif_equipitemack( map_session_data& sd, uint8 flag, int32 index, int32 pos = 0 ); // self
  808. void clif_unequipitemack( map_session_data& sd, uint16 server_index, int32 pos, bool success );
  809. void clif_misceffect( block_list& bl, e_notify_effect type );
  810. void clif_changeoption_target(struct block_list* bl, struct block_list* target);
  811. #define clif_changeoption(bl) clif_changeoption_target(bl, nullptr) // area
  812. void clif_changeoption2( block_list& bl );
  813. void clif_useitemack(map_session_data *sd,int32 index,int32 amount,bool ok); // self
  814. void clif_GlobalMessage( block_list& bl, const char* message, enum send_target target );
  815. void clif_createchat( map_session_data& sd, e_create_chatroom flag );
  816. void clif_dispchat( const chat_data& cd );
  817. void clif_joinchatfail( map_session_data& sd, e_refuse_enter_room result );
  818. void clif_joinchatok(map_session_data& sd,chat_data& cd);
  819. void clif_addchat( chat_data& cd, map_session_data& sd );
  820. void clif_chat_role( chat_data& cd, map_session_data& sd );
  821. void clif_clearchat(chat_data &cd);
  822. void clif_chat_leave( chat_data& cd, map_session_data& sd, bool kicked );
  823. void clif_changechatstatus(chat_data& cd);
  824. void clif_refresh_storagewindow(map_session_data *sd);
  825. void clif_refresh(map_session_data *sd); // self
  826. void clif_emotion( block_list& bl, emotion_type type );
  827. void clif_talkiebox(struct block_list* bl, const char* talkie);
  828. void clif_wedding_effect( block_list& bl );
  829. void clif_divorced( map_session_data& sd, const char* name );
  830. void clif_callpartner(map_session_data& sd);
  831. void clif_playBGM( map_session_data& sd, const char* name );
  832. void clif_soundeffect( struct block_list& bl, const char* name, int32 type, enum send_target target );
  833. void clif_parse_ActionRequest_sub( map_session_data& sd, uint8 action_type, int32 target_id, t_tick tick );
  834. void clif_parse_LoadEndAck(int32 fd,map_session_data *sd);
  835. void clif_hotkeys_send(map_session_data *sd, int32 tab);
  836. // trade
  837. void clif_traderequest(map_session_data& sd, const char* name);
  838. void clif_traderesponse( map_session_data& sd, e_ack_trade_response result );
  839. void clif_tradeadditem(map_session_data* sd, map_session_data* tsd, int32 index, int32 amount);
  840. void clif_tradeitemok(map_session_data& sd, int32 index, e_exitem_add_result result);
  841. void clif_tradedeal_lock( map_session_data& sd, bool who );
  842. void clif_tradecancelled( map_session_data& sd );
  843. void clif_tradecompleted( map_session_data& sd );
  844. void clif_tradeundo( map_session_data& sd );
  845. // storage
  846. void clif_storagelist(map_session_data* sd, struct item* items, int32 items_length, const char *storename);
  847. void clif_updatestorageamount( map_session_data& sd, uint16 amount, uint16 max_amount );
  848. void clif_storageitemadded(map_session_data* sd, struct item* i, int32 index, int32 amount);
  849. void clif_storageitemremoved( map_session_data& sd, uint16 index, uint32 amount );
  850. void clif_storageclose( map_session_data& sd );
  851. int32 clif_insight(struct block_list *bl,va_list ap); // map_forallinmovearea callback
  852. int32 clif_outsight(struct block_list *bl,va_list ap); // map_forallinmovearea callback
  853. void clif_class_change( block_list& bl, int32 class_, enum send_target target = AREA, map_session_data* sd = nullptr );
  854. void clif_skillinfoblock(map_session_data *sd);
  855. void clif_skillup( map_session_data& sd, uint16 skill_id, uint16 lv, uint16 range, bool upgradable );
  856. void clif_skillinfo( map_session_data& sd, uint16 skill_id );
  857. void clif_addskill(map_session_data& sd, uint16 skill_id);
  858. void clif_deleteskill(map_session_data& sd, uint16 skill_id, bool skip_infoblock = false);
  859. void clif_skillcasting(struct block_list* bl, int32 src_id, int32 dst_id, int32 dst_x, int32 dst_y, uint16 skill_id, uint16 skill_lv, int32 property, int32 casttime);
  860. void clif_skillcastcancel( block_list& bl );
  861. void clif_skill_fail( map_session_data& sd, uint16 skill_id, enum useskill_fail_cause cause = USESKILL_FAIL_LEVEL, int32 btype = 0, t_itemid itemId = 0 );
  862. void clif_skill_cooldown( map_session_data &sd, uint16 skill_id, t_tick tick );
  863. int32 clif_skill_damage( block_list& src, block_list& dst, t_tick tick, int32 sdelay, int32 ddelay, int64 sdamage, int32 div, uint16 skill_id, uint16 skill_lv, e_damage_type type );
  864. //int32 clif_skill_damage2(struct block_list *src,struct block_list *dst,t_tick tick,int32 sdelay,int32 ddelay,int32 damage,int32 div,uint16 skill_id,uint16 skill_lv,enum e_damage_type type);
  865. bool clif_skill_nodamage( block_list* src, block_list& dst, uint16 skill_id, int32 heal, bool success = true );
  866. void clif_skill_poseffect( block_list& bl, uint16 skill_id, uint16 skill_lv, uint16 x, uint16 y, t_tick tick );
  867. void clif_skill_estimation( map_session_data& sd, mob_data& md );
  868. void clif_skill_warppoint( map_session_data& sd, uint16 skill_id, uint16 skill_lv, std::vector<std::string>& maps );
  869. void clif_skill_memomessage( map_session_data& sd, e_ack_remember_warppoint_result result );
  870. void clif_skill_teleportmessage( map_session_data& sd, e_notify_mapinfo_result result );
  871. void clif_skill_produce_mix_list( map_session_data& sd, int32 skill_id, int32 trigger );
  872. void clif_cooking_list( map_session_data& sd, int32 trigger, uint16 skill_id, int32 qty, int32 list_type );
  873. void clif_produceeffect(map_session_data* sd,int32 flag, t_itemid nameid);
  874. void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit, enum send_target target, bool visible);
  875. void clif_skill_delunit( skill_unit& unit );
  876. void clif_skillunit_update( block_list& bl);
  877. void clif_skill_unit_test(struct block_list *bl, int16 x, int16 y, int32 unit_id, int16 range, int16 skill_lv);
  878. void clif_autospell( map_session_data& sd, uint16 skill_lv );
  879. void clif_devotion(struct block_list *src, map_session_data *tsd);
  880. void clif_spiritball( struct block_list *bl, struct block_list* target = nullptr, enum send_target send_target = AREA );
  881. void clif_soulball( map_session_data *sd, struct block_list* target = nullptr, enum send_target send_target = AREA );
  882. void clif_servantball( map_session_data& sd, struct block_list* target = nullptr, enum send_target send_target = AREA );
  883. void clif_abyssball( map_session_data& sd, struct block_list* target = nullptr, enum send_target send_target = AREA );
  884. void clif_combo_delay( block_list& bl, t_tick wait );
  885. void clif_bladestop( block_list& src, uint32 target_id, bool active );
  886. void clif_changemapcell( int16 m, int16 x, int16 y, int16 type, send_target target = ALL_SAMEMAP, block_list* tbl = nullptr );
  887. #define clif_status_load(bl, type, flag) clif_status_change((bl), (type), (flag), 0, 0, 0, 0)
  888. void clif_status_change(struct block_list *bl, int32 type, int32 flag, t_tick tick, int32 val1, int32 val2, int32 val3);
  889. void clif_efst_status_change(struct block_list *bl, int32 tid, enum send_target target, int32 type, t_tick tick, int32 val1, int32 val2, int32 val3);
  890. void clif_efst_status_change_sub(struct block_list *tbl, struct block_list *bl, enum send_target target);
  891. void clif_wis_message(map_session_data* sd, const char* nick, const char* mes, size_t mes_len, int32 gmlvl);
  892. void clif_wis_end( map_session_data& sd, e_ack_whisper result );
  893. void clif_solved_charname( map_session_data& sd, uint32 charid, const char* name );
  894. void clif_name( struct block_list* src, struct block_list *bl, send_target target );
  895. #define clif_name_self(bl) clif_name( (bl), (bl), SELF )
  896. #define clif_name_area(bl) clif_name( (bl), (bl), AREA )
  897. void clif_use_card(map_session_data *sd,int32 idx);
  898. void clif_insert_card( map_session_data& sd, int32 idx_equip, int32 idx_card, bool failure );
  899. void clif_inventorylist(map_session_data *sd);
  900. void clif_equiplist(map_session_data *sd);
  901. void clif_cart_additem(map_session_data *sd,int32 n,int32 amount);
  902. void clif_cart_additem_ack( map_session_data& sd, e_ack_additem_to_cart flag );
  903. void clif_cart_delitem( map_session_data& sd, int32 index, int32 amount );
  904. void clif_cartlist(map_session_data *sd);
  905. void clif_clearcart(int32 fd);
  906. void clif_item_identify_list(map_session_data *sd);
  907. void clif_item_identified( map_session_data& sd, int32 idx, bool failure );
  908. void clif_item_repair_list( map_session_data& sd, map_session_data& dstsd, uint16 lv );
  909. void clif_item_repaireffect( map_session_data& sd, int32 idx, bool failure );
  910. void clif_item_damaged( map_session_data& sd, uint16 position );
  911. void clif_item_refine_list( map_session_data& sd );
  912. void clif_hat_effects( map_session_data& sd, block_list& bl, enum send_target target );
  913. void clif_hat_effect_single( map_session_data& sd, uint16 effectId, bool enable );
  914. void clif_item_skill(map_session_data *sd,uint16 skill_id,uint16 skill_lv);
  915. void clif_mvp_effect( map_session_data& sd );
  916. void clif_mvp_item(map_session_data *sd, t_itemid nameid);
  917. void clif_mvp_exp( map_session_data& sd, t_exp exp );
  918. void clif_mvp_noitem( map_session_data& sd );
  919. void clif_changed_dir(block_list& bl, enum send_target target);
  920. // vending
  921. void clif_openvendingreq( map_session_data& sd, uint16 num );
  922. void clif_showvendingboard( map_session_data& sd, enum send_target target = AREA_WOS, struct block_list* tbl = nullptr );
  923. void clif_closevendingboard(struct block_list* bl, int32 fd);
  924. void clif_vendinglist( map_session_data& sd, map_session_data& vsd );
  925. void clif_buyvending( map_session_data& sd, uint16 index, uint16 amount, e_pc_purchase_result_frommc result );
  926. void clif_openvending( map_session_data& sd );
  927. void clif_openvending_ack(map_session_data& sd, e_ack_openstore2 result);
  928. void clif_vendingreport( map_session_data& sd, uint16 index, uint16 amount, uint32 char_id, int32 zeny );
  929. void clif_movetoattack( map_session_data& sd, block_list& bl );
  930. // party
  931. void clif_party_created( map_session_data& sd, int32 result );
  932. void clif_party_member_info( struct party_data& party, map_session_data& sd );
  933. void clif_party_info( struct party_data& party, map_session_data *sd = nullptr );
  934. void clif_party_invite( map_session_data& sd, map_session_data& tsd );
  935. void clif_party_invite_reply( map_session_data& sd, const char* nick, enum e_party_invite_reply reply );
  936. void clif_party_option(struct party_data *p,map_session_data *sd,int32 flag);
  937. void clif_party_withdraw( map_session_data& sd, uint32 account_id, const char* name, enum e_party_member_withdraw result, enum send_target target );
  938. void clif_party_message( struct party_data& party, uint32 account_id, const char* mes, size_t len );
  939. void clif_party_xy( map_session_data& sd );
  940. void clif_party_xy_single( map_session_data& sd, map_session_data& tsd );
  941. void clif_party_hp( map_session_data& sd );
  942. void clif_hpmeter_single( map_session_data& sd, uint32 id, uint32 hp, uint32 maxhp );
  943. void clif_party_job_and_level( map_session_data& sd );
  944. void clif_party_dead( map_session_data& sd );
  945. // guild
  946. void clif_guild_created( map_session_data& sd, int32 flag );
  947. void clif_guild_belonginfo( map_session_data& sd );
  948. void clif_guild_masterormember(map_session_data& sd);
  949. void clif_guild_basicinfo( map_session_data& sd );
  950. void clif_guild_allianceinfo(map_session_data& sd);
  951. void clif_guild_memberlist( map_session_data& sd );
  952. void clif_guild_skillinfo( map_session_data& sd );
  953. void clif_guild_send_onlineinfo(map_session_data *sd); //[LuzZza]
  954. void clif_guild_memberlogin_notice(const struct mmo_guild &g,int32 idx,int32 flag);
  955. void clif_guild_invite( map_session_data& sd, const struct mmo_guild& g );
  956. void clif_guild_inviteack( map_session_data& sd, int32 flag );
  957. void clif_guild_leave( map_session_data& sd, const char* name, uint32 char_id, const char* mes );
  958. void clif_guild_expulsion( map_session_data& sd, const char* name, uint32 char_id, const char* mes );
  959. void clif_guild_positionchanged(const struct mmo_guild &g,int32 idx);
  960. void clif_guild_memberpositionchanged(const struct mmo_guild &g,int32 idx);
  961. void clif_guild_emblem(const map_session_data &sd, const struct mmo_guild &g);
  962. void clif_guild_emblem_area(struct block_list* bl);
  963. void clif_guild_notice( map_session_data& sd );
  964. void clif_guild_message( const struct mmo_guild& g, const char* mes, size_t len );
  965. void clif_guild_reqalliance(map_session_data& sd,uint32 account_id,const char *name);
  966. void clif_guild_allianceack(map_session_data& sd, uint8 flag);
  967. void clif_guild_delalliance(map_session_data& sd,uint32 guild_id,uint32 flag);
  968. void clif_guild_oppositionack(map_session_data& sd,uint8 flag);
  969. void clif_guild_broken( map_session_data& sd, int32 flag );
  970. void clif_guild_xy( map_session_data& sd );
  971. void clif_guild_xy_single( map_session_data& sd, map_session_data& tsd );
  972. void clif_guild_xy_remove( map_session_data& sd );
  973. void clif_guild_castle_list(map_session_data& sd);
  974. void clif_guild_castle_teleport_res(map_session_data& sd, enum e_siege_teleport_result result);
  975. void clif_guild_position_selected(map_session_data& sd);
  976. // Battleground
  977. void clif_bg_hp(map_session_data *sd);
  978. void clif_bg_xy(map_session_data *sd);
  979. void clif_bg_xy_remove(map_session_data *sd);
  980. void clif_bg_message(struct s_battleground_data *bg, int32 src_id, const char *name, const char *mes, size_t len);
  981. void clif_bg_updatescore(int16 m);
  982. void clif_bg_updatescore_single(map_session_data *sd);
  983. void clif_sendbgemblem_area(map_session_data *sd);
  984. void clif_sendbgemblem_single(int32 fd, map_session_data *sd);
  985. // Battleground Queue
  986. void clif_bg_queue_apply_result(e_bg_queue_apply_ack result, const char *name, map_session_data *sd);
  987. void clif_bg_queue_apply_notify(const char *name, map_session_data *sd);
  988. void clif_bg_queue_entry_init(map_session_data *sd);
  989. void clif_bg_queue_lobby_notify(const char *name, map_session_data *sd);
  990. void clif_bg_queue_ack_lobby(bool result, const char *name, const char *lobbyname, map_session_data *sd);
  991. // Instancing
  992. void clif_instance_create( int32 instance_id, size_t num );
  993. void clif_instance_changewait(int32 instance_id, int32 num);
  994. void clif_instance_status(int32 instance_id, uint32 limit1, uint32 limit2);
  995. void clif_instance_changestatus(int32 instance_id, e_instance_notify type, uint32 limit);
  996. void clif_parse_MemorialDungeonCommand(int32 fd, map_session_data *sd);
  997. void clif_instance_info( map_session_data& sd );
  998. // Custom Fonts
  999. void clif_font(map_session_data *sd);
  1000. // atcommand
  1001. void clif_displaymessage(const int32 fd, const char* mes);
  1002. void clif_disp_message(struct block_list* src, const char* mes, size_t len, enum send_target target);
  1003. void clif_broadcast(struct block_list* bl, const char* mes, size_t len, int32 type, enum send_target target);
  1004. void clif_broadcast2(struct block_list* bl, const char* mes, size_t len, unsigned long fontColor, int16 fontType, int16 fontSize, int16 fontAlign, int16 fontY, enum send_target target);
  1005. void clif_heal( map_session_data& sd, int32 type, uint32 val );
  1006. void clif_resurrection( block_list& bl );
  1007. void clif_map_property(struct block_list *bl, enum map_property property, enum send_target t);
  1008. void clif_pvpset(map_session_data *sd, int32 pvprank, int32 pvpnum,int32 type);
  1009. void clif_map_property_mapall(int32 map, enum map_property property);
  1010. void clif_refine( map_session_data& sd, uint16 index, e_ack_itemrefining result );
  1011. void clif_upgrademessage( map_session_data* sd, int32 result, t_itemid item_id );
  1012. //petsystem
  1013. void clif_catch_process( map_session_data& sd );
  1014. void clif_pet_roulette( map_session_data& sd, bool success );
  1015. void clif_sendegg(map_session_data *sd);
  1016. void clif_send_petstatus( map_session_data& sd, pet_data& pd );
  1017. void clif_send_petdata( map_session_data* sd, pet_data& pd, e_changestate_pet data_type );
  1018. void clif_pet_emotion( pet_data& pd, int32 param );
  1019. void clif_pet_food( map_session_data& sd, int32 foodid, bool success );
  1020. void clif_pet_autofeed_status(map_session_data* sd, bool force);
  1021. //friends list
  1022. void clif_friendslist_toggle( map_session_data& sd, const s_friend& f, bool online );
  1023. int32 clif_friendslist_toggle_sub( map_session_data* tsd, va_list ap );
  1024. void clif_friendslist_send( map_session_data& sd );
  1025. void clif_friendslist_reqack(map_session_data *sd, map_session_data *f_sd, int32 type);
  1026. void clif_weather(int16 m); // [Valaris]
  1027. void clif_specialeffect(struct block_list* bl, int32 type, enum send_target target); // special effects [Valaris]
  1028. void clif_specialeffect_single(struct block_list* bl, int32 type, int32 fd);
  1029. void clif_specialeffect_remove(struct block_list* bl_src, int32 effect, enum send_target e_target, struct block_list* bl_target);
  1030. void clif_messagecolor_target(struct block_list *bl, unsigned long color, const char *msg, bool rgb2bgr, enum send_target type, map_session_data *sd);
  1031. #define clif_messagecolor(bl, color, msg, rgb2bgr, type) clif_messagecolor_target(bl, color, msg, rgb2bgr, type, nullptr) // Mob/Npc color talk [SnakeDrak]
  1032. void clif_specialeffect_value(struct block_list* bl, int32 effect_id, int32 num, send_target target);
  1033. void clif_GM_kickack(map_session_data *sd, int32 id);
  1034. void clif_GM_kick(map_session_data *sd,map_session_data *tsd);
  1035. void clif_manner_message(map_session_data* sd, uint32 type);
  1036. void clif_GM_silence( map_session_data& sd, map_session_data& tsd, bool muted );
  1037. void clif_disp_overhead_(struct block_list *bl, const char* mes, enum send_target flag);
  1038. #define clif_disp_overhead(bl, mes) clif_disp_overhead_(bl, mes, AREA)
  1039. void clif_get_weapon_view(map_session_data* sd, t_itemid *rhand, t_itemid *lhand);
  1040. void clif_party_xy_remove(map_session_data *sd); //Fix for minimap [Kevin]
  1041. void clif_gospel_info( map_session_data& sd, int32 type );
  1042. void clif_feel_req(int32 fd, map_session_data *sd, uint16 skill_lv);
  1043. void clif_starskill(map_session_data* sd, const char* mapname, int32 monster_id, unsigned char star, unsigned char result);
  1044. void clif_feel_info(map_session_data* sd, unsigned char feel_level, unsigned char type);
  1045. void clif_hate_info(map_session_data *sd, unsigned char hate_level,int32 class_, unsigned char type);
  1046. void clif_mission_info(map_session_data *sd, int32 mob_id, unsigned char progress);
  1047. void clif_feel_hate_reset(map_session_data *sd);
  1048. // [blackhole89]
  1049. void clif_hominfo(map_session_data *sd, struct homun_data *hd, int32 flag);
  1050. void clif_homskillinfoblock( homun_data& hd );
  1051. void clif_homskillup( homun_data& hd, uint16 skill_id );
  1052. void clif_hom_food( map_session_data& sd, int32 foodid, bool success );
  1053. void clif_send_homdata( homun_data& hd, e_hom_state2 state );
  1054. void clif_homunculus_updatestatus(map_session_data& sd, _sp type);
  1055. void clif_configuration( map_session_data* sd, enum e_config_type type, bool enabled );
  1056. void clif_viewequip_ack( map_session_data& sd, map_session_data& tsd );
  1057. void clif_equipcheckbox( map_session_data& sd );
  1058. void clif_msg( map_session_data& sd, e_clif_messages msg_id );
  1059. void clif_msg_value( map_session_data& sd, e_clif_messages msg_id, int32 value );
  1060. void clif_msg_skill( map_session_data& sd, uint16 skill_id, e_clif_messages msg_id );
  1061. void clif_msg_color( map_session_data& sd, e_clif_messages msg_id, uint32 color );
  1062. //quest system [Kevin] [Inkfish]
  1063. void clif_quest_send_list(map_session_data * sd);
  1064. void clif_quest_send_mission(map_session_data * sd);
  1065. void clif_quest_add(map_session_data * sd, struct quest * qd);
  1066. void clif_quest_delete(map_session_data * sd, int32 quest_id);
  1067. void clif_quest_update_status(map_session_data * sd, int32 quest_id, bool active);
  1068. void clif_quest_update_objective(map_session_data * sd, struct quest * qd);
  1069. void clif_quest_show_event(map_session_data *sd, struct block_list *bl, e_questinfo_types effect, e_questinfo_markcolor color);
  1070. void clif_displayexp(map_session_data *sd, t_exp exp, char type, bool quest, bool lost);
  1071. int32 clif_send(const void* buf, int32 len, struct block_list* bl, enum send_target type);
  1072. void do_init_clif(void);
  1073. void do_final_clif(void);
  1074. // MAIL SYSTEM
  1075. enum mail_send_result : uint8_t {
  1076. WRITE_MAIL_SUCCESS = 0x0,
  1077. WRITE_MAIL_FAILED = 0x1,
  1078. WRITE_MAIL_FAILED_CNT = 0x2,
  1079. WRITE_MAIL_FAILED_ITEM = 0x3,
  1080. WRITE_MAIL_FAILED_CHECK_CHARACTER_NAME = 0x4,
  1081. WRITE_MAIL_FAILED_WHISPEREXREGISTER = 0x5,
  1082. };
  1083. void clif_Mail_window(int32 fd, int32 flag);
  1084. void clif_Mail_read(map_session_data *sd, int32 mail_id);
  1085. void clif_mail_delete(map_session_data* sd, struct mail_message *msg, bool success);
  1086. void clif_Mail_return(int32 fd, int32 mail_id, int16 fail);
  1087. void clif_Mail_send(map_session_data* sd, enum mail_send_result result);
  1088. void clif_Mail_new(map_session_data* sd, int32 mail_id, const char *sender, const char *title);
  1089. void clif_Mail_refreshinbox(map_session_data *sd,enum mail_inbox_type type,int64 mailID);
  1090. void clif_mail_getattachment(map_session_data* sd, struct mail_message *msg, uint8 result, enum mail_attachment_type type);
  1091. void clif_Mail_Receiver_Ack(map_session_data* sd, uint32 char_id, int16 class_, uint32 level, const char* name);
  1092. void clif_mail_removeitem(map_session_data* sd, bool success, int32 index, int32 amount);
  1093. // AUCTION SYSTEM
  1094. void clif_Auction_openwindow(map_session_data *sd);
  1095. void clif_Auction_results(map_session_data *sd, int16 count, int16 pages, uint8 *buf);
  1096. void clif_Auction_message(int32 fd, unsigned char flag);
  1097. void clif_Auction_close(int32 fd, unsigned char flag);
  1098. void clif_parse_Auction_cancelreg(int32 fd, map_session_data *sd);
  1099. void clif_bossmapinfo( map_session_data& sd, mob_data* md, e_bossmap_info flag );
  1100. void clif_cashshop_show( map_session_data& sd, npc_data& nd );
  1101. // ADOPTION
  1102. void clif_Adopt_reply(map_session_data *sd, int32 type);
  1103. void clif_Adopt_request(map_session_data *sd, map_session_data *src, int32 p_id);
  1104. // MERCENARIES
  1105. void clif_mercenary_info(map_session_data *sd);
  1106. void clif_mercenary_skillblock(map_session_data *sd);
  1107. void clif_mercenary_updatestatus(map_session_data *sd, int32 type);
  1108. // RENTAL SYSTEM
  1109. void clif_rental_time( map_session_data* sd, t_itemid nameid, int32 seconds );
  1110. void clif_rental_expired( map_session_data* sd, int32 index, t_itemid nameid );
  1111. // BOOK READING
  1112. void clif_readbook(int32 fd, int32 book_id, int32 page);
  1113. // Show Picker
  1114. void clif_party_show_picker(map_session_data * sd, struct item * item_data);
  1115. // Progress Bar [Inkfish]
  1116. void clif_progressbar(map_session_data * sd, unsigned long color, uint32 second);
  1117. void clif_progressbar_abort(map_session_data * sd);
  1118. void clif_progressbar_npc(struct npc_data *nd, map_session_data* sd);
  1119. #define clif_progressbar_npc_area(nd) clif_progressbar_npc((nd),nullptr)
  1120. void clif_PartyBookingRegisterAck(map_session_data *sd, int32 flag);
  1121. void clif_PartyBookingDeleteAck(map_session_data* sd, int32 flag);
  1122. void clif_PartyBookingSearchAck(int32 fd, struct party_booking_ad_info** results, int32 count, bool more_result);
  1123. void clif_PartyBookingUpdateNotify(map_session_data* sd, struct party_booking_ad_info* pb_ad);
  1124. void clif_PartyBookingDeleteNotify(map_session_data* sd, int32 index);
  1125. void clif_PartyBookingInsertNotify(map_session_data* sd, struct party_booking_ad_info* pb_ad);
  1126. /* Bank System [Yommy/Hercules] */
  1127. void clif_parse_BankDeposit (int32 fd, map_session_data *sd);
  1128. void clif_parse_BankWithdraw (int32 fd, map_session_data *sd);
  1129. void clif_parse_BankCheck (int32 fd, map_session_data *sd);
  1130. void clif_parse_BankOpen (int32 fd, map_session_data *sd);
  1131. void clif_parse_BankClose (int32 fd, map_session_data *sd);
  1132. void clif_showdigit(map_session_data* sd, unsigned char type, int32 value);
  1133. /// Buying Store System
  1134. void clif_buyingstore_open(map_session_data* sd);
  1135. void clif_buyingstore_open_failed(map_session_data* sd, uint16 result, uint32 weight);
  1136. void clif_buyingstore_myitemlist( map_session_data& sd );
  1137. void clif_buyingstore_entry( map_session_data& sd, struct block_list* tbl = nullptr );
  1138. void clif_buyingstore_disappear_entry( map_session_data& sd, struct block_list* tbl = nullptr );
  1139. void clif_buyingstore_itemlist( map_session_data& sd, map_session_data& pl_sd );
  1140. void clif_buyingstore_trade_failed_buyer(map_session_data* sd, int16 result);
  1141. void clif_buyingstore_update_item(map_session_data* sd, t_itemid nameid, uint16 amount, uint32 char_id, int32 zeny);
  1142. void clif_buyingstore_delete_item(map_session_data* sd, int16 index, uint16 amount, int32 price);
  1143. void clif_buyingstore_trade_failed_seller(map_session_data* sd, int16 result, t_itemid nameid);
  1144. /// Search Store System
  1145. void clif_search_store_info_ack( map_session_data& sd );
  1146. void clif_search_store_info_failed(map_session_data& sd, e_searchstore_failure reason);
  1147. void clif_open_search_store_info(map_session_data& sd);
  1148. void clif_search_store_info_click_ack(map_session_data& sd, int16 x, int16 y);
  1149. /// Cash Shop
  1150. void clif_cashshop_result( map_session_data* sd, t_itemid item_id, uint16 result );
  1151. void clif_cashshop_open( map_session_data* sd, int32 tab );
  1152. void clif_display_pinfo( map_session_data& sd );
  1153. /// Roulette
  1154. void clif_roulette_open(map_session_data* sd);
  1155. void clif_parse_roulette_open(int32 fd, map_session_data *sd);
  1156. void clif_parse_roulette_info(int32 fd, map_session_data *sd);
  1157. void clif_parse_roulette_close(int32 fd, map_session_data *sd);
  1158. void clif_parse_roulette_generate(int32 fd, map_session_data *sd);
  1159. void clif_parse_roulette_item(int32 fd, map_session_data *sd);
  1160. void clif_elementalconverter_list( map_session_data& sd );
  1161. void clif_millenniumshield( block_list& bl, int16 shields );
  1162. void clif_magicdecoy_list( map_session_data& sd, uint16 skill_lv, int16 x, int16 y );
  1163. void clif_poison_list( map_session_data& sd, uint16 skill_lv );
  1164. void clif_autoshadowspell_list( map_session_data& sd );
  1165. int32 clif_skill_itemlistwindow( map_session_data *sd, uint16 skill_id, uint16 skill_lv );
  1166. void clif_elemental_info(map_session_data *sd);
  1167. void clif_elemental_updatestatus(map_session_data& sd, _sp type);
  1168. void clif_spiritcharm( map_session_data& sd );
  1169. void clif_snap( struct block_list *bl, int16 x, int16 y );
  1170. void clif_monster_hp_bar( struct mob_data* md, int32 fd );
  1171. // Clan System
  1172. void clif_clan_basicinfo( map_session_data& sd );
  1173. void clif_clan_message( struct clan &clan, const char *mes, size_t len );
  1174. void clif_clan_onlinecount( struct clan& clan );
  1175. void clif_clan_leave( map_session_data& sd );
  1176. // Bargain Tool
  1177. void clif_sale_start(struct sale_item_data* sale_item, struct block_list* bl, enum send_target target);
  1178. void clif_sale_end(struct sale_item_data* sale_item, struct block_list* bl, enum send_target target);
  1179. void clif_sale_amount(struct sale_item_data* sale_item, struct block_list* bl, enum send_target target);
  1180. void clif_sale_open(map_session_data* sd);
  1181. // Refine UI
  1182. void clif_refineui_open( map_session_data* sd );
  1183. /**
  1184. * Color Table
  1185. **/
  1186. enum clif_colors {
  1187. COLOR_DEFAULT,
  1188. COLOR_RED,
  1189. COLOR_WHITE,
  1190. COLOR_YELLOW,
  1191. COLOR_CYAN,
  1192. COLOR_LIGHT_GREEN,
  1193. COLOR_LIGHT_YELLOW,
  1194. COLOR_MAX
  1195. };
  1196. extern unsigned long color_table[COLOR_MAX];
  1197. void clif_channel_msg(struct Channel *channel, const char *msg, unsigned long color);
  1198. #define clif_menuskill_clear(sd) (sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0;
  1199. void clif_update_rankingpoint( map_session_data& sd, e_rank rankingtype, uint32 point );
  1200. void clif_crimson_marker( map_session_data& sd, struct block_list& bl, bool remove );
  1201. void clif_showscript(struct block_list* bl, const char* message, enum send_target flag);
  1202. void clif_party_leaderchanged(map_session_data *sd, int32 prev_leader_aid, int32 new_leader_aid);
  1203. void clif_account_name(int32 fd, uint32 account_id, const char* accname);
  1204. void clif_notify_bindOnEquip( map_session_data& sd, int16 index );
  1205. void clif_merge_item_open( map_session_data& sd );
  1206. void clif_broadcast_obtain_special_item(const char *char_name, t_itemid nameid, t_itemid container, enum BROADCASTING_SPECIAL_ITEM_OBTAIN type);
  1207. void clif_dressing_room( map_session_data& sd );
  1208. void clif_navigateTo(map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id );
  1209. void clif_SelectCart(map_session_data *sd);
  1210. /// Achievement System
  1211. void clif_achievement_list_all(map_session_data *sd);
  1212. void clif_achievement_update(map_session_data *sd, struct achievement *ach, int32 count);
  1213. void clif_achievement_reward_ack(int32 fd, unsigned char result, int32 ach_id);
  1214. /// Attendance System
  1215. enum in_ui_type : int8 {
  1216. IN_UI_MACRO_REGISTER = 2,
  1217. IN_UI_MACRO_DETECTOR,
  1218. IN_UI_ATTENDANCE = 5
  1219. };
  1220. enum out_ui_type : int8 {
  1221. OUT_UI_BANK = 0,
  1222. OUT_UI_STYLIST,
  1223. OUT_UI_CAPTCHA,
  1224. OUT_UI_MACRO,
  1225. OUT_UI_TIP = 5,
  1226. OUT_UI_QUEST,
  1227. OUT_UI_ATTENDANCE,
  1228. OUT_UI_ENCHANTGRADE,
  1229. OUT_UI_ENCHANT = 10,
  1230. };
  1231. void clif_ui_open( map_session_data& sd, enum out_ui_type ui_type, int32 data );
  1232. void clif_attendence_response( map_session_data *sd, int32 data );
  1233. void clif_weight_limit( map_session_data* sd );
  1234. void clif_guild_storage_log( map_session_data& sd, std::vector<struct guild_log_entry>& log, enum e_guild_storage_log result );
  1235. void clif_camerainfo( map_session_data* sd, bool show, float range = 0.0f, float rotation = 0.0f, float latitude = 0.0f );
  1236. /// Equip Switch System
  1237. void clif_equipswitch_list( map_session_data* sd );
  1238. void clif_equipswitch_add( map_session_data* sd,uint16 index, uint32 pos, uint8 flag );
  1239. void clif_equipswitch_remove( map_session_data* sd, uint16 index, uint32 pos, bool failed );
  1240. void clif_equipswitch_reply( map_session_data* sd, bool failed );
  1241. /// Pet evolution
  1242. void clif_pet_evolution_result( map_session_data* sd, e_pet_evolution_result result );
  1243. void clif_parse_skill_toid( map_session_data* sd, uint16 skill_id, uint16 skill_lv, int32 target_id );
  1244. void clif_inventory_expansion_info( map_session_data* sd );
  1245. // Barter System
  1246. void clif_barter_open( map_session_data& sd, struct npc_data& nd );
  1247. void clif_barter_extended_open( map_session_data& sd, struct npc_data& nd );
  1248. void clif_summon_init(struct mob_data& md);
  1249. void clif_summon_hp_bar(struct mob_data& md);
  1250. // Laphine System
  1251. void clif_laphine_synthesis_open( map_session_data *sd, std::shared_ptr<s_laphine_synthesis> synthesis );
  1252. void clif_laphine_upgrade_open( map_session_data* sd, std::shared_ptr<s_laphine_upgrade> upgrade );
  1253. // Reputation System
  1254. void clif_reputation_type( map_session_data& sd, int64 type, int64 points );
  1255. void clif_reputation_list( map_session_data& sd );
  1256. // Item Reform UI
  1257. void clif_item_reform_open( map_session_data& sd, t_itemid item );
  1258. // Item Enchant UI
  1259. void clif_enchantwindow_open( map_session_data& sd, uint64 clientLuaIndex );
  1260. // Enchanting Shadow / Shadow Scar Spirit
  1261. void clif_enchantingshadow_spirit(unit_data &ud);
  1262. void clif_broadcast_refine_result(map_session_data& sd, t_itemid itemId, int8 level, bool success);
  1263. // Captcha Register
  1264. void clif_captcha_upload_request(map_session_data &sd);
  1265. void clif_captcha_upload_end(map_session_data &sd);
  1266. // Captcha Preview
  1267. void clif_captcha_preview_response(map_session_data &sd, std::shared_ptr<s_captcha_data> cd);
  1268. // Macro Detector
  1269. void clif_macro_detector_request(map_session_data &sd);
  1270. void clif_macro_detector_request_show(map_session_data &sd);
  1271. void clif_macro_detector_status(map_session_data &sd, e_macro_detect_status stype);
  1272. // Macro Reporter
  1273. void clif_macro_reporter_select(map_session_data &sd, const std::vector<uint32> &aid_list);
  1274. void clif_macro_reporter_status(map_session_data &sd, e_macro_report_status stype);
  1275. enum e_macro_checker_result : int16{
  1276. MACROCHECKER_NOGM = 0,
  1277. MACROCHECKER_MAPFLAG,
  1278. MACROCHECKER_COOLDOWN,
  1279. MACROCHECKER_UNKNOWN_MAP,
  1280. MACROCHECKER_SUCCESS
  1281. };
  1282. void clif_macro_checker( map_session_data& sd, e_macro_checker_result result );
  1283. void clif_dynamicnpc_result( map_session_data& sd, e_dynamicnpc_result result );
  1284. void clif_set_dialog_align(map_session_data& sd, int32 npcid, e_say_dialog_align align);
  1285. void clif_set_npc_window_size(map_session_data& sd, int32 width, int32 height);
  1286. void clif_set_npc_window_pos(map_session_data& sd, int32 x, int32 y);
  1287. void clif_set_npc_window_pos_percent(map_session_data& sd, int32 x, int32 y);
  1288. void clif_noask_sub( map_session_data& sd, map_session_data& tsd, int32 type );
  1289. void clif_specialpopup(map_session_data& sd, int32 id);
  1290. #endif /* CLIF_HPP */