fix
This commit is contained in:
parent
32fd8b15d1
commit
8f2bdd549f
File diff suppressed because one or more lines are too long
160
def.go
160
def.go
@ -441,20 +441,6 @@ const (
|
||||
cmdParseModeMarkDown = 2
|
||||
cmdParseModeHTML = 3
|
||||
|
||||
objTypeUser = 1
|
||||
objTypeGuild = 2
|
||||
objTypeMessage = 3
|
||||
objTypeWar = 4
|
||||
objTypeWarReport = 5
|
||||
objTypeJob = 6
|
||||
objTypeItem = 7
|
||||
objTypeCastle = 8
|
||||
objTypeFair = 9
|
||||
objTypeUnion = 10
|
||||
objTypeTribute = 11
|
||||
objTypeExperience = 12
|
||||
objTypeQuest = 13
|
||||
|
||||
castleDeer = 1
|
||||
castleDragon = 2
|
||||
castleHighnest = 3
|
||||
@ -463,152 +449,6 @@ 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
|
||||
|
||||
cacheObjSubType[`job_pillage`] = 601
|
||||
cacheObjSubType[`job_tribute`] = 602
|
||||
cacheObjSubType[`job_status`] = 603
|
||||
cacheObjSubType[`job_gwithdraw`] = 604
|
||||
cacheObjSubType[`job_gstock`] = 605
|
||||
cacheObjSubType[`job_rescan_msg`] = 606
|
||||
cacheObjSubType[`job_set_done`] = 607
|
||||
cacheObjSubType[`job_msg_client`] = 608
|
||||
cacheObjSubType[`job_msg_refresh`] = 609
|
||||
cacheObjSubType[`job_backup_export`] = 610
|
||||
cacheObjSubType[`job_backup_import`] = 611
|
||||
cacheObjSubType[`job_gdeposit`] = 612
|
||||
cacheObjSubType[`job_gdeposit_fwd`] = 613
|
||||
cacheObjSubType[`job_save_res`] = 614
|
||||
cacheObjSubType[`job_vault_user_status`] = 615
|
||||
cacheObjSubType[`job_vault_item_status`] = 616
|
||||
cacheObjSubType[`job_msg_fwd`] = 617 // rename to objSubTypeJobMsgFwd
|
||||
cacheObjSubType[`job_set_def`] = 618
|
||||
cacheObjSubType[`job_msg_del`] = 619
|
||||
cacheObjSubType[`job_get_hammer_time`] = 620
|
||||
|
||||
cacheObjSubType[`item_res`] = 701
|
||||
cacheObjSubType[`item_alch`] = 702
|
||||
cacheObjSubType[`item_misc`] = 703
|
||||
cacheObjSubType[`item_recipe`] = 704
|
||||
cacheObjSubType[`item_part`] = 705
|
||||
cacheObjSubType[`item_other`] = 706
|
||||
|
||||
*/
|
||||
objSubTypeCastle = 801
|
||||
objSubTypeFair = 901
|
||||
objSubTypeUnion = 1001
|
||||
objSubTypeTribute = 1101
|
||||
objSubTypeExperience = 1201
|
||||
objSubTypeQuestForest = 1301
|
||||
objSubTypeQuestSwamp = 1302
|
||||
objSubTypeQuestValley = 1303
|
||||
|
||||
objJobStatusCallBack = -1
|
||||
objJobStatusNew = 0
|
||||
objJobStatusPillageGo = 1
|
||||
|
2
obj.go
2
obj.go
@ -647,7 +647,7 @@ func addObjXP(userID64 int64, expNow int64, expLvl int64, level int64, date time
|
||||
}
|
||||
|
||||
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
|
||||
VALUES (` + strconv.Itoa(objTypeExperience) + `,` + strconv.Itoa(objSubTypeExperience) + `);`)
|
||||
VALUES (` + strconv.FormatInt(codeObjType[`xp`], 10) + `,` + strconv.FormatInt(codeObSubjType[`xp`], 10) + `);`)
|
||||
logOnError(err, "addObjXP : exec insert obj")
|
||||
if err != nil {
|
||||
err2 := tx.Rollback()
|
||||
|
Loading…
Reference in New Issue
Block a user