This commit is contained in:
shoopea 2020-01-02 19:36:40 +08:00
parent 80ffef4a66
commit 598bc59c3b

284
def.go
View File

@ -463,147 +463,149 @@ const (
castleShark = 6
castleWolf = 7
objSubTypeUser = 101
objSubTypeGuild = 201
cacheObjSubType[`msg`] = 301
cacheObjSubType[`msg_war`] = 302 // from Chat Wars Reports (not done)
objSubTypeMessageMiniWar = 303 // FIXME DELETE
cacheObjSubType[`msg_guild_war`] = 304 // from Chat Wars Reports (not done)
cacheObjSubType[`msg_report_req`] = 305 // /report (done)
cacheObjSubType[`msg_report_ack`] = 306 // result from /report (done)
cacheObjSubType[`msg_g_report_req`] = 307 // /g_report (done)
cacheObjSubType[`msg_g_report_ack`] = 308 // result from /g_report (not done)
cacheObjSubType[`msg_quest_res`] = 309 // result from going to quest (not done)
cacheObjSubType[`msg_duel_fight`] = 310 // result from going to duel fight (done)
cacheObjSubType[`msg_hero_req`] = 311 // /hero (done)
cacheObjSubType[`msg_hero_ack`] = 312 // result from /hero (not done)
cacheObjSubType[`msg_me_req`] = 313 // 🏅Me (done)
cacheObjSubType[`msg_me_ack`] = 314 // result from 🏅Me (done)
cacheObjSubType[`msg_inv_req`] = 315 // /inv (done)
cacheObjSubType[`msg_inv_ack`] = 316 // result from /inv (not done)
cacheObjSubType[`msg_pillage_inc`] = 317 // random incoming pillage (done)
cacheObjSubType[`msg_pillage_go`] = 318 // ack from /go (done)
cacheObjSubType[`msg_pillage_timeout`] = 319 // ack from lack of /go (done)
cacheObjSubType[`msg_pillage_win`] = 320 // pillage successfully intercepted (done)
cacheObjSubType[`msg_pillage_loss`] = 321 // pillage not intercepted (done)
cacheObjSubType[`msg_tribute_inc`] = 322 // request for a /pledge (not done)
cacheObjSubType[`msg_tribute_ack`] = 323 // pledge accepted (not done)
cacheObjSubType[`msg_auction_announce`] = 324 // from Boris and Co, Ltd (done)
cacheObjSubType[`msg_auction_upd_req`] = 325 // /l_123456 msg (not done)
cacheObjSubType[`msg_auction_upd_ack`] = 326 // result from /l_123456 (not done)
cacheObjSubType[`msg_time_ack`] = 327 // result from /time (done)
cacheObjSubType[`msg_time_req`] = 328 // /time (done)
cacheObjSubType[`msg_go`] = 329 // /go (done)
cacheObjSubType[`msg_pledge`] = 330 // /pledge (done)
cacheObjSubType[`msg_go_quest_req`] = 331 // 🌲Forest or 🍄Swamp or ⛰Valley (not done)
cacheObjSubType[`msg_fast_fight`] = 332 // ▶Fast fight (not done)
cacheObjSubType[`msg_go_arena`] = 333 // 📯Arena (not done)
cacheObjSubType[`msg_top`] = 334 // any /topXX (not done)
cacheObjSubType[`msg_menu`] = 335 // main menu (not done)
cacheObjSubType[`msg_buy_req`] = 336 // /wtb_xx (done)
cacheObjSubType[`msg_sell_req`] = 337 // /wts_xx (done)
cacheObjSubType[`msg_orderbook_req`] = 338 // /t_xx (done)
cacheObjSubType[`msg_orderbook_acl`] = 339 // orderbook summary (not done)
cacheObjSubType[`msg_withdraw_req`] = 340 // /g_withdraw (done)
cacheObjSubType[`msg_withdraw_code`] = 341 // code to receive (done)
cacheObjSubType[`msg_withdraw_rcv`] = 342 // Withdraw "received" msg (done)
cacheObjSubType[`msg_stock_req`] = 343 // /stock (done)
cacheObjSubType[`msg_stock_ack`] = 344 // result from /stock (not done)
cacheObjSubType[`msg_misc_req`] = 345 // /misc (done)
cacheObjSubType[`msg_misc_ack`] = 346 // result from /misc (not done)
cacheObjSubType[`msg_union_war`] = 347 // from Chat Wars Reports (not done)
cacheObjSubType[`msg_tureport_req`] = 348 // /tu_report (not done)
cacheObjSubType[`msg_tureport_ack`] = 349 // result from /tu_report (not done)
cacheObjSubType[`msg_timeout`] = 350 // generic timeout for action
cacheObjSubType[`msg_go_quest_ack`] = 351 // confirm quest destination/busyness (done)
cacheObjSubType[`msg_groles_req`] = 352 // /g_roles (done)
cacheObjSubType[`msg_groles_ack`] = 353 // result from /g_roles (done)
cacheObjSubType[`msg_gstock_res_req`] = 354 // /g_stock_res (done)
cacheObjSubType[`msg_gstock_alch_req`] = 355 // /g_stock_alch (done)
cacheObjSubType[`msg_gstock_misc_req`] = 356 // /g_stock_misc (done)
cacheObjSubType[`msg_gstock_rec_req`] = 357 // /g_stock_rec (done)
cacheObjSubType[`msg_gstock_part_req`] = 358 // /g_stock_parts (done)
cacheObjSubType[`msg_gstock_oth_req`] = 359 // /g_stock_other (done)
cacheObjSubType[`msg_gstock_any_ack`] = 360 // result from any /g_stock_xxx (done)
cacheObjSubType[`msg_gstock_req`] = 361 // /g_stock (done)
cacheObjSubType[`msg_gstock_ack`] = 362 // result from /g_stock (done)
cacheObjSubType[`msg_busy`] = 363 // too busy now
cacheObjSubType[`msg_res_stock_req`] = 364 // 📦Resources or /stock (done)
cacheObjSubType[`msg_alch_stock_req`] = 365 // ⚗Alchemy (done)
cacheObjSubType[`msg_misc_stock_req`] = 366 // 🗃Misc or /misc (done)
cacheObjSubType[`msg_equip_stock_req`] = 367 // 🏷Equipment (done)
cacheObjSubType[`msg_craft_stock_req`] = 368 // ⚒Crafting (done)
cacheObjSubType[`msg_stock_empty`] = 369 // [empty] (done)
cacheObjSubType[`msg_stock_any_ack`] = 370 // list of stock (done)
cacheObjSubType[`msg_g_deposit_req`] = 371 // /g_deposit xx y (done)
cacheObjSubType[`msg_g_deposit_ack`] = 372 // Deposited successfully: xx (y) (done)
cacheObjSubType[`msg_castle_attack_req`] = 373 // Attack (done)
cacheObjSubType[`msg_castle_attack_ack`] = 374 // Read for attack, select target (done)
cacheObjSubType[`msg_castle_target_req`] = 375 // Castle selection (done)
cacheObjSubType[`msg_castle_target_ack`] = 376 // Castle confirmation (done)
cacheObjSubType[`msg_castle_def_req`] = 377 // Defend (done)
cacheObjSubType[`msg_castle_def_ack`] = 378 // Defend confirmation (done)
cacheObjSubType[`msg_back`] = 379 // Back (done)
cacheObjSubType[`msg_castle_req`] = 380 // Castle (done)
cacheObjSubType[`msg_castle_ack`] = 381 // Castle msg (not done)
cacheObjSubType[`msg_exchange_req`] = 382 // ⚖Exchange (done)
cacheObjSubType[`msg_exchange_ack`] = 383 // List of deals (done)
cacheObjSubType[`msg_equip_req`] = 384 // /on_item (done)
cacheObjSubType[`msg_equip_ack`] = 385 // Item equipped (done)
cacheObjSubType[`msg_unequip_req`] = 386 // /off_item (done)
cacheObjSubType[`msg_unequip_ack`] = 387 // Item unequipped (done)
cacheObjSubType[`msg_no_stamina`] = 388 // Not enough stamina. (done)
cacheObjSubType[`msg_orderbook_search`] = 389 // /t <something>
cacheObjSubType[`msg_quest_req`] = 390 // quest
cacheObjSubType[`msg_quest_ack`] = 391 // forest/swamp/valley/arena
cacheObjSubType[`msg_battle`] = 392 // wind is howling
cacheObjSubType[`msg_order_cancel_req`] = 393 // /rm_xxx
cacheObjSubType[`msg_order_cancel_ack`] = 394 // Cancelling order
cacheObjSubType[`msg_stamina_restored`] = 395 // Stamina Restored
cacheObjSubType[`msg_top`]Req = 396
cacheObjSubType[`msg_quest_res_ambush`] = 397 // result from going to quest with ambush (not done)
cacheObjSubType[`msg_heal_up`] = 398 // you should heal up first (done)
cacheObjSubType[`msg_arena_fight_ack`] = 399 // thirsty for blood ... (done)
cacheObjSubType[`msg_go_arena`]Ack = 400 // Welcome to Arena! (done)
cacheObjSubType[`msg_withdraw_nack`] = 401 // not enought items (done)
cacheObjSubType[`msg_pillage_defeat`] = 402 // You tried stopping (done)
cacheObjSubType[`msg_level_up_req`] = 403 // /level_up
cacheObjSubType[`msg_level_up_ack`] = 404
objSubTypeJobPillage = 601
objSubTypeJobTribute = 602
objSubTypeJobStatus = 603
objSubTypeJobGWithdraw = 604
objSubTypeJobGStock = 605
objSubTypeJobRescanMsg = 606
objSubTypeJobSetJobDone = 607
objSubTypeJobMsgClient = 608
objSubTypeJobMsgRefresh = 609
objSubTypeJobBackupExport = 610
objSubTypeJobBackupImport = 611
objSubTypeJobGDeposit = 612
objSubTypeJobGDepositForward = 613
objSubTypeJobSaveRes = 614
objSubTypeJobVaultUserStatus = 615
objSubTypeJobVaultItemStatus = 616
objSubTypeJobFwdMsg = 617 // rename to objSubTypeJobMsgFwd
objSubTypeJobSetDef = 618
objSubTypeJobMsgDel = 619
objSubTypeJobGetHammerTime = 620
objSubTypeItemResource = 701
objSubTypeItemAlch = 702
objSubTypeItemMisc = 703
objSubTypeItemRecipe = 704
objSubTypeItemPart = 705
objSubTypeItemOther = 706
objSubTypeItemUnique = 707
objSubTypeCastle = 801
objSubTypeFair = 901
objSubTypeUnion = 1001
objSubTypeTribute = 1101
objSubTypeExperience = 1201
objSubTypeQuestForest = 1301
objSubTypeQuestSwamp = 1302
objSubTypeQuestValley = 1303
objSubTypeUser = 101
objSubTypeGuild = 201
/*
cacheObjSubType[`msg`] = 301
cacheObjSubType[`msg_war`] = 302 // from Chat Wars Reports (not done)
objSubTypeMessageMiniWar = 303 // FIXME DELETE
cacheObjSubType[`msg_guild_war`] = 304 // from Chat Wars Reports (not done)
cacheObjSubType[`msg_report_req`] = 305 // /report (done)
cacheObjSubType[`msg_report_ack`] = 306 // result from /report (done)
cacheObjSubType[`msg_g_report_req`] = 307 // /g_report (done)
cacheObjSubType[`msg_g_report_ack`] = 308 // result from /g_report (not done)
cacheObjSubType[`msg_quest_res`] = 309 // result from going to quest (not done)
cacheObjSubType[`msg_duel_fight`] = 310 // result from going to duel fight (done)
cacheObjSubType[`msg_hero_req`] = 311 // /hero (done)
cacheObjSubType[`msg_hero_ack`] = 312 // result from /hero (not done)
cacheObjSubType[`msg_me_req`] = 313 // 🏅Me (done)
cacheObjSubType[`msg_me_ack`] = 314 // result from 🏅Me (done)
cacheObjSubType[`msg_inv_req`] = 315 // /inv (done)
cacheObjSubType[`msg_inv_ack`] = 316 // result from /inv (not done)
cacheObjSubType[`msg_pillage_inc`] = 317 // random incoming pillage (done)
cacheObjSubType[`msg_pillage_go`] = 318 // ack from /go (done)
cacheObjSubType[`msg_pillage_timeout`] = 319 // ack from lack of /go (done)
cacheObjSubType[`msg_pillage_win`] = 320 // pillage successfully intercepted (done)
cacheObjSubType[`msg_pillage_loss`] = 321 // pillage not intercepted (done)
cacheObjSubType[`msg_tribute_inc`] = 322 // request for a /pledge (not done)
cacheObjSubType[`msg_tribute_ack`] = 323 // pledge accepted (not done)
cacheObjSubType[`msg_auction_announce`] = 324 // from Boris and Co, Ltd (done)
cacheObjSubType[`msg_auction_upd_req`] = 325 // /l_123456 msg (not done)
cacheObjSubType[`msg_auction_upd_ack`] = 326 // result from /l_123456 (not done)
cacheObjSubType[`msg_time_ack`] = 327 // result from /time (done)
cacheObjSubType[`msg_time_req`] = 328 // /time (done)
cacheObjSubType[`msg_go`] = 329 // /go (done)
cacheObjSubType[`msg_pledge`] = 330 // /pledge (done)
cacheObjSubType[`msg_go_quest_req`] = 331 // 🌲Forest or 🍄Swamp or ⛰Valley (not done)
cacheObjSubType[`msg_fast_fight`] = 332 // ▶Fast fight (not done)
cacheObjSubType[`msg_go_arena`] = 333 // 📯Arena (not done)
cacheObjSubType[`msg_top`] = 334 // any /topXX (not done)
cacheObjSubType[`msg_menu`] = 335 // main menu (not done)
cacheObjSubType[`msg_buy_req`] = 336 // /wtb_xx (done)
cacheObjSubType[`msg_sell_req`] = 337 // /wts_xx (done)
cacheObjSubType[`msg_orderbook_req`] = 338 // /t_xx (done)
cacheObjSubType[`msg_orderbook_acl`] = 339 // orderbook summary (not done)
cacheObjSubType[`msg_withdraw_req`] = 340 // /g_withdraw (done)
cacheObjSubType[`msg_withdraw_code`] = 341 // code to receive (done)
cacheObjSubType[`msg_withdraw_rcv`] = 342 // Withdraw "received" msg (done)
cacheObjSubType[`msg_stock_req`] = 343 // /stock (done)
cacheObjSubType[`msg_stock_ack`] = 344 // result from /stock (not done)
cacheObjSubType[`msg_misc_req`] = 345 // /misc (done)
cacheObjSubType[`msg_misc_ack`] = 346 // result from /misc (not done)
cacheObjSubType[`msg_union_war`] = 347 // from Chat Wars Reports (not done)
cacheObjSubType[`msg_tureport_req`] = 348 // /tu_report (not done)
cacheObjSubType[`msg_tureport_ack`] = 349 // result from /tu_report (not done)
cacheObjSubType[`msg_timeout`] = 350 // generic timeout for action
cacheObjSubType[`msg_go_quest_ack`] = 351 // confirm quest destination/busyness (done)
cacheObjSubType[`msg_groles_req`] = 352 // /g_roles (done)
cacheObjSubType[`msg_groles_ack`] = 353 // result from /g_roles (done)
cacheObjSubType[`msg_gstock_res_req`] = 354 // /g_stock_res (done)
cacheObjSubType[`msg_gstock_alch_req`] = 355 // /g_stock_alch (done)
cacheObjSubType[`msg_gstock_misc_req`] = 356 // /g_stock_misc (done)
cacheObjSubType[`msg_gstock_rec_req`] = 357 // /g_stock_rec (done)
cacheObjSubType[`msg_gstock_part_req`] = 358 // /g_stock_parts (done)
cacheObjSubType[`msg_gstock_oth_req`] = 359 // /g_stock_other (done)
cacheObjSubType[`msg_gstock_any_ack`] = 360 // result from any /g_stock_xxx (done)
cacheObjSubType[`msg_gstock_req`] = 361 // /g_stock (done)
cacheObjSubType[`msg_gstock_ack`] = 362 // result from /g_stock (done)
cacheObjSubType[`msg_busy`] = 363 // too busy now
cacheObjSubType[`msg_res_stock_req`] = 364 // 📦Resources or /stock (done)
cacheObjSubType[`msg_alch_stock_req`] = 365 // ⚗Alchemy (done)
cacheObjSubType[`msg_misc_stock_req`] = 366 // 🗃Misc or /misc (done)
cacheObjSubType[`msg_equip_stock_req`] = 367 // 🏷Equipment (done)
cacheObjSubType[`msg_craft_stock_req`] = 368 // ⚒Crafting (done)
cacheObjSubType[`msg_stock_empty`] = 369 // [empty] (done)
cacheObjSubType[`msg_stock_any_ack`] = 370 // list of stock (done)
cacheObjSubType[`msg_g_deposit_req`] = 371 // /g_deposit xx y (done)
cacheObjSubType[`msg_g_deposit_ack`] = 372 // Deposited successfully: xx (y) (done)
cacheObjSubType[`msg_castle_attack_req`] = 373 // Attack (done)
cacheObjSubType[`msg_castle_attack_ack`] = 374 // Read for attack, select target (done)
cacheObjSubType[`msg_castle_target_req`] = 375 // Castle selection (done)
cacheObjSubType[`msg_castle_target_ack`] = 376 // Castle confirmation (done)
cacheObjSubType[`msg_castle_def_req`] = 377 // Defend (done)
cacheObjSubType[`msg_castle_def_ack`] = 378 // Defend confirmation (done)
cacheObjSubType[`msg_back`] = 379 // Back (done)
cacheObjSubType[`msg_castle_req`] = 380 // Castle (done)
cacheObjSubType[`msg_castle_ack`] = 381 // Castle msg (not done)
cacheObjSubType[`msg_exchange_req`] = 382 // ⚖Exchange (done)
cacheObjSubType[`msg_exchange_ack`] = 383 // List of deals (done)
cacheObjSubType[`msg_equip_req`] = 384 // /on_item (done)
cacheObjSubType[`msg_equip_ack`] = 385 // Item equipped (done)
cacheObjSubType[`msg_unequip_req`] = 386 // /off_item (done)
cacheObjSubType[`msg_unequip_ack`] = 387 // Item unequipped (done)
cacheObjSubType[`msg_no_stamina`] = 388 // Not enough stamina. (done)
cacheObjSubType[`msg_orderbook_search`] = 389 // /t <something>
cacheObjSubType[`msg_quest_req`] = 390 // quest
cacheObjSubType[`msg_quest_ack`] = 391 // forest/swamp/valley/arena
cacheObjSubType[`msg_battle`] = 392 // wind is howling
cacheObjSubType[`msg_order_cancel_req`] = 393 // /rm_xxx
cacheObjSubType[`msg_order_cancel_ack`] = 394 // Cancelling order
cacheObjSubType[`msg_stamina_restored`] = 395 // Stamina Restored
cacheObjSubType[`msg_top`]Req = 396
cacheObjSubType[`msg_quest_res_ambush`] = 397 // result from going to quest with ambush (not done)
cacheObjSubType[`msg_heal_up`] = 398 // you should heal up first (done)
cacheObjSubType[`msg_arena_fight_ack`] = 399 // thirsty for blood ... (done)
cacheObjSubType[`msg_go_arena`]Ack = 400 // Welcome to Arena! (done)
cacheObjSubType[`msg_withdraw_nack`] = 401 // not enought items (done)
cacheObjSubType[`msg_pillage_defeat`] = 402 // You tried stopping (done)
cacheObjSubType[`msg_level_up_req`] = 403 // /level_up
cacheObjSubType[`msg_level_up_ack`] = 404
*/
objSubTypeJobPillage = 601
objSubTypeJobTribute = 602
objSubTypeJobStatus = 603
objSubTypeJobGWithdraw = 604
objSubTypeJobGStock = 605
objSubTypeJobRescanMsg = 606
objSubTypeJobSetJobDone = 607
objSubTypeJobMsgClient = 608
objSubTypeJobMsgRefresh = 609
objSubTypeJobBackupExport = 610
objSubTypeJobBackupImport = 611
objSubTypeJobGDeposit = 612
objSubTypeJobGDepositForward = 613
objSubTypeJobSaveRes = 614
objSubTypeJobVaultUserStatus = 615
objSubTypeJobVaultItemStatus = 616
objSubTypeJobFwdMsg = 617 // rename to objSubTypeJobMsgFwd
objSubTypeJobSetDef = 618
objSubTypeJobMsgDel = 619
objSubTypeJobGetHammerTime = 620
objSubTypeItemResource = 701
objSubTypeItemAlch = 702
objSubTypeItemMisc = 703
objSubTypeItemRecipe = 704
objSubTypeItemPart = 705
objSubTypeItemOther = 706
objSubTypeItemUnique = 707
objSubTypeCastle = 801
objSubTypeFair = 901
objSubTypeUnion = 1001
objSubTypeTribute = 1101
objSubTypeExperience = 1201
objSubTypeQuestForest = 1301
objSubTypeQuestSwamp = 1302
objSubTypeQuestValley = 1303
objJobStatusCallBack = -1
objJobStatusNew = 0